Updated: April 19, 2023 |
Get the file descriptor for the control connection
#include <wpa_ctrl.h>
int wpa_ctrl_get_fd(struct wpa_ctrl *ctrl)
This function gets the file descriptor for the control connection, assuming this connection uses a socket for IPC between the library and underlying service. The returned value can be used with the select() C Library function while waiting for multiple events.
The returned file descriptor must not be used for sending or receiving packets; instead, the library functions wpa_ctrl_request() and wpa_ctrl_recv() must be used for this.
The file descriptor of the socket underlying the control connection, or -1 if the connection doesn't use a socket