DAWN/src/include/msghandler.h
Ian Clowes 22b25a4726 memory: Tighten up some memory handling to help spot errors
Set pointers to NULL after free() to help force out memory handling errors.
Add some extra memory / resource tracking to try and chase out latent
bugs / leaks Fixed a couple of memory traces that were misreporting.

Signed-off-by: Ian Clowes <clowes_ian@hotmail.com>
2022-01-06 09:10:40 +01:00

46 lines
934 B
C

#ifndef __DAWN_MSGHANDLER_H
#define __DAWN_MSGHANDLER_H
#include <libubox/blobmsg_json.h>
#include "datastorage.h"
/**
* Parse to probe request.
* @param msg
* @param prob_req
* @return
*/
probe_entry *parse_to_probe_req(struct blob_attr* msg);
/**
* Dump a client array into the database.
* @param msg - message to parse.
* @param do_kick - use the automatic kick function when updating the clients.
* @param id - ubus id.
* @return
*/
int parse_to_clients(struct blob_attr* msg, int do_kick, uint32_t id);
/**
* Parse to hostapd notify.
* Notify are such notifications like:
* + Disassociation
* + Deauthentication
* + ...
* @param msg
* @param notify_req
* @return
*/
int parse_to_hostapd_notify(struct blob_attr* msg, hostapd_notify_entry* notify_req);
/**
* Handle network messages.
* @param msg
* @return
*/
int handle_network_msg(char* msg);
int handle_deauth_req(struct blob_attr* msg);
#endif