about summary refs log tree commit diff stats
path: root/test/src/test_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/test_misc.c')
-rw-r--r--test/src/test_misc.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/src/test_misc.c b/test/src/test_misc.c new file mode 100644 index 0000000..f103455 --- /dev/null +++ b/test/src/test_misc.c
@@ -0,0 +1,30 @@
1#include <libwifi.h>
2#include <libwifi/core/core.h>
3#include <stdio.h>
4
5void gen_macs() {
6 printf("Getting 10 random MAC addresses:\n");
7 for(int i = 0; i < 10; i++) {
8 unsigned char mac[6] = {0};
9 libwifi_random_mac(mac, NULL);
10 printf(MACSTR "\n", MAC2STR(mac));
11 }
12
13 printf("Generating 10 random MAC addresses with 00:20:91 OUI:\n");
14 for(int i = 0; i < 10; i++) {
15 unsigned char mac[6] = {0};
16 libwifi_random_mac(mac, (unsigned char *) "\x00\x20\x91");
17 printf(MACSTR "\n", MAC2STR(mac));
18 }
19 printf("\n");
20}
21
22int main() {
23 libwifi_dummy();
24
25 printf("libwifi version: %s\n\n", libwifi_get_version());
26
27 gen_macs();
28
29 return 0;
30}