[package] libpcap: explicitely disable libnl support to prevent different build resul...
[openwrt.git] / package / hostapd / files / multicall.c
1 #include <stdio.h>
2 #include <string.h>
3 #include <stdbool.h>
4
5 extern int hostapd_main(int argc, char **argv);
6 extern int wpa_supplicant_main(int argc, char **argv);
7
8 int main(int argc, char **argv)
9 {
10 bool restart = false;
11 const char *prog = argv[0];
12
13 restart:
14 if (strstr(argv[0], "hostapd"))
15 return hostapd_main(argc, argv);
16 else if (strstr(argv[0], "wpa_supplicant"))
17 return wpa_supplicant_main(argc, argv);
18
19 if (!restart && argc > 1) {
20 argv++;
21 argc--;
22 restart = true;
23 goto restart;
24 }
25
26 fprintf(stderr, "Invalid command.\nUsage: %s wpa_supplicant|hostapd [<arguments>]\n", prog);
27 return 255;
28 }
This page took 0.050918 seconds and 5 git commands to generate.