0xHttrackers
0xHttrackers

Reputation: 43

How do I disconnect from Wi-Fi network with programming language c

I have a small project in C language and I want to implement the program, the program cuts off the WiFi network

Upvotes: 0

Views: 489

Answers (1)

Adnan Alli
Adnan Alli

Reputation: 104

You can for example disconnect through a terminal command.

e.g. in Windows OS

system("netsh wlan disconnect");

example.c

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(void)
{
    system("netsh wlan disconnect");
    system("echo Wifi disconnected!");
    return 0;
}

Upvotes: 2

Related Questions