mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
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>
46 lines
934 B
C
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
|