Add support for logging on and off

This commit is contained in:
Pierre Pronchery 2017-09-26 21:47:56 +02:00
parent 46307e3d12
commit c668cbdad9
2 changed files with 10 additions and 0 deletions

View File

@ -70,6 +70,8 @@ typedef enum _WPACommand
WC_DISABLE_NETWORK, /* unsigned int id */
WC_ENABLE_NETWORK, /* unsigned int id */
WC_LIST_NETWORKS,
WC_LOGON,
WC_LOGOFF,
WC_REASSOCIATE,
WC_RECONFIGURE,
WC_REMOVE_NETWORK, /* unsigned int id */
@ -745,6 +747,12 @@ static int _wpa_queue(WPA * wpa, WPAChannel * channel, WPACommand command, ...)
case WC_LIST_NETWORKS:
cmd = strdup("LIST_NETWORKS");
break;
case WC_LOGON:
cmd = strdup("LOGON");
break;
case WC_LOGOFF:
cmd = strdup("LOGOFF");
break;
case WC_REASSOCIATE:
cmd = strdup("REASSOCIATE");
break;

View File

@ -62,6 +62,8 @@ int main(void)
0) != 0
|| _wpa_queue(NULL, &channel, WC_ENABLE_NETWORK, 1) != 0
|| _wpa_queue(NULL, &channel, WC_LIST_NETWORKS) != 0
|| _wpa_queue(NULL, &channel, WC_LOGON) != 0
|| _wpa_queue(NULL, &channel, WC_LOGOFF) != 0
|| _wpa_queue(NULL, &channel, WC_REASSOCIATE) != 0
|| _wpa_queue(NULL, &channel, WC_RECONFIGURE) != 0
|| _wpa_queue(NULL, &channel, WC_ENABLE_NETWORK, 1) != 0