2016-03-04 10:20:20 +01:00
|
|
|
/*
|
|
|
|
* Common hostapd/wpa_supplicant ctrl iface code.
|
|
|
|
* Copyright (c) 2002-2013, Jouni Malinen <j@w1.fi>
|
|
|
|
* Copyright (c) 2015, Qualcomm Atheros, Inc.
|
|
|
|
*
|
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
|
|
|
*/
|
|
|
|
#ifndef CONTROL_IFACE_COMMON_H
|
|
|
|
#define CONTROL_IFACE_COMMON_H
|
|
|
|
|
|
|
|
#include "utils/list.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct wpa_ctrl_dst - Data structure of control interface monitors
|
|
|
|
*
|
|
|
|
* This structure is used to store information about registered control
|
|
|
|
* interface monitors into struct wpa_supplicant.
|
|
|
|
*/
|
|
|
|
struct wpa_ctrl_dst {
|
|
|
|
struct dl_list list;
|
2016-03-04 10:20:23 +01:00
|
|
|
struct sockaddr_storage addr;
|
2016-03-04 10:20:20 +01:00
|
|
|
socklen_t addrlen;
|
|
|
|
int debug_level;
|
|
|
|
int errors;
|
|
|
|
};
|
|
|
|
|
|
|
|
void sockaddr_print(int level, const char *msg, struct sockaddr_storage *sock,
|
|
|
|
socklen_t socklen);
|
|
|
|
|
2016-03-04 10:20:23 +01:00
|
|
|
int ctrl_iface_attach(struct dl_list *ctrl_dst, struct sockaddr_storage *from,
|
2016-03-04 10:20:20 +01:00
|
|
|
socklen_t fromlen);
|
2016-03-04 10:20:23 +01:00
|
|
|
int ctrl_iface_detach(struct dl_list *ctrl_dst, struct sockaddr_storage *from,
|
2016-03-04 10:20:20 +01:00
|
|
|
socklen_t fromlen);
|
2016-03-04 10:20:23 +01:00
|
|
|
int ctrl_iface_level(struct dl_list *ctrl_dst, struct sockaddr_storage *from,
|
2016-03-04 10:20:20 +01:00
|
|
|
socklen_t fromlen, const char *level);
|
|
|
|
|
|
|
|
#endif /* CONTROL_IFACE_COMMON_H */
|