Updated: October 28, 2024 |
Register as an event monitor
#include <wpa_ctrl.h>
int wpa_ctrl_attach(struct wpa_ctrl *ctrl)
This function registers the caller as a monitor for WPA control interface events. After a successful wpa_ctrl_attach() call, the control connection starts receiving event messages that can be read with wpa_ctrl_recv().
When you no longer need to receive events, you should unregister with wpa_ctrl_detach(). This other function must be called before closing the connnection with wpa_ctrl_close().