X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=wlantest%2Fwlantest.c;h=abe97d18fbd0103f9c4b1988a64ade3e0b7d45bd;hb=711e3cab0756623335af83599253971c468f0545;hp=a2141414a4ac08ea82866964d2b63bbaa4520544;hpb=0187c41d88b372e90eff37e3c29b78423e3f170e;p=mech_eap.git diff --git a/wlantest/wlantest.c b/wlantest/wlantest.c index a214141..abe97d1 100644 --- a/wlantest/wlantest.c +++ b/wlantest/wlantest.c @@ -1,6 +1,6 @@ /* * wlantest - IEEE 802.11 protocol monitoring and testing tool - * Copyright (c) 2010-2013, Jouni Malinen + * Copyright (c) 2010-2015, Jouni Malinen * * This software may be distributed under the terms of the BSD license. * See README for more details. @@ -21,7 +21,7 @@ static void wlantest_terminate(int sig, void *signal_ctx) static void usage(void) { - printf("wlantest [-cddhqqFt] [-i] [-r] " + printf("wlantest [-cddhqqFNt] [-i] [-r] " "[-p]\n" " [-I] [-R] " "[-P]\n" @@ -210,10 +210,16 @@ static int add_ptk_file(struct wlantest *wt, const char *ptk_file) if (p == NULL) break; if (ptk_len < 48) { - os_memcpy(p->ptk.tk1, ptk, ptk_len); + os_memcpy(p->ptk.tk, ptk, ptk_len); + p->ptk.tk_len = ptk_len; p->ptk_len = 32 + ptk_len; } else { - os_memcpy(&p->ptk, ptk, ptk_len); + os_memcpy(p->ptk.kck, ptk, 16); + p->ptk.kck_len = 16; + os_memcpy(p->ptk.kek, ptk + 16, 16); + p->ptk.kek_len = 16; + os_memcpy(p->ptk.tk, ptk + 32, ptk_len - 32); + p->ptk.tk_len = ptk_len - 32; p->ptk_len = ptk_len; } dl_list_add(&wt->ptk, &p->list); @@ -344,7 +350,7 @@ int main(int argc, char *argv[]) wlantest_init(&wt); for (;;) { - c = getopt(argc, argv, "cdf:Fhi:I:L:n:p:P:qr:R:tT:w:W:"); + c = getopt(argc, argv, "cdf:Fhi:I:L:n:Np:P:qr:R:tT:w:W:"); if (c < 0) break; switch (c) { @@ -377,6 +383,9 @@ int main(int argc, char *argv[]) case 'n': wt.pcapng_file = optarg; break; + case 'N': + wt.pcap_no_buffer = 1; + break; case 'p': add_passphrase(&wt, optarg); break;