From: Marcel Holtmann Date: Mon, 4 May 2009 08:48:42 +0000 (-0700) Subject: add support for parsing ERP information element X-Git-Tag: v0.9.14~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc4d1484a18a2f67df901126123177ea94e8037b;p=thirdparty%2Fiw.git add support for parsing ERP information element --- diff --git a/scan.c b/scan.c index 91e94ed..d4a4832 100644 --- a/scan.c +++ b/scan.c @@ -80,11 +80,27 @@ static void print_ign(unsigned char type, unsigned char len, unsigned char *data /* ignore for now, not too useful */ } +static void print_erp(unsigned char type, unsigned char len, unsigned char *data) +{ + if (data[0] == 0x00) + return; + + printf("\tERP:"); + if (data[0] & 0x01) + printf(" NonERP_Present"); + if (data[0] & 0x02) + printf(" Use_Protection"); + if (data[0] & 0x04) + printf(" Barker_Preamble_Mode"); + printf("\n"); +} + static const printfn ieprinters[] = { [0] = print_ssid, [1] = print_supprates, [3] = print_ds, [5] = print_ign, + [42] = print_erp, [50] = print_supprates, };