diff options
author | kevlo <kevlo@FreeBSD.org> | 2014-02-17 01:36:53 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2014-02-17 01:36:53 +0000 |
commit | ecbaab7887ad759827a12115b1111cfa50a6f092 (patch) | |
tree | 1919e764c93c5049f1d8a0091180676c061a19d8 /tools | |
parent | 4bb58e4f5d8dbf6ff38d1652c421414f9dae8cf4 (diff) | |
download | FreeBSD-src-ecbaab7887ad759827a12115b1111cfa50a6f092.zip FreeBSD-src-ecbaab7887ad759827a12115b1111cfa50a6f092.tar.gz |
MFC r260444:
Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED.
The origin of WEP comes from IEEE Std 802.11-1997 where it defines
whether the frame body of MAC frame has been encrypted using WEP
algorithm or not.
IEEE Std. 802.11-2007 changes WEP to Protected Frame, indicates
whether the frame is protected by a cryptographic encapsulation
algorithm.
Reviewed by: adrian, rpaulo
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/net80211/stumbler/stumbler.c | 2 | ||||
-rw-r--r-- | tools/tools/net80211/w00t/ap/ap.c | 4 | ||||
-rw-r--r-- | tools/tools/net80211/w00t/assoc/assoc.c | 4 | ||||
-rw-r--r-- | tools/tools/net80211/w00t/expand/expand.c | 4 | ||||
-rw-r--r-- | tools/tools/net80211/w00t/prga/prga.c | 6 | ||||
-rw-r--r-- | tools/tools/net80211/w00t/redir/redir.c | 6 | ||||
-rw-r--r-- | tools/tools/net80211/wesside/wesside/wesside.c | 17 | ||||
-rw-r--r-- | tools/tools/net80211/wlaninject/wlaninject.c | 2 |
8 files changed, 23 insertions, 22 deletions
diff --git a/tools/tools/net80211/stumbler/stumbler.c b/tools/tools/net80211/stumbler/stumbler.c index b649c30..0e8d8be 100644 --- a/tools/tools/net80211/stumbler/stumbler.c +++ b/tools/tools/net80211/stumbler/stumbler.c @@ -711,7 +711,7 @@ int get_packet_info(struct ieee80211_frame* wh, else if (type == IEEE80211_FC0_TYPE_DATA && stype == IEEE80211_FC0_SUBTYPE_DATA) { - if (wh->i_fc[1] & IEEE80211_FC1_WEP) { + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { unsigned char* iv; node->wep = CRYPT_WEP; diff --git a/tools/tools/net80211/w00t/ap/ap.c b/tools/tools/net80211/w00t/ap/ap.c index 65f7adb..836f588 100644 --- a/tools/tools/net80211/w00t/ap/ap.c +++ b/tools/tools/net80211/w00t/ap/ap.c @@ -509,7 +509,7 @@ void read_real_data(struct params *p, struct ieee80211_frame *wh, int len) memcpy(dst, wh->i_addr3, 6); - if (wh->i_fc[1] & IEEE80211_FC1_WEP) { + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { if (!p->wep_len) { printf("Got wep but i aint wep\n"); return; @@ -737,7 +737,7 @@ void read_tap(struct params *p) wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA; wh->i_fc[1] |= IEEE80211_FC1_DIR_FROMDS; if (p->wep_len) - wh->i_fc[1] |= IEEE80211_FC1_WEP; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED; /* LLC & SNAP */ ptr = (char*) (wh+1); diff --git a/tools/tools/net80211/w00t/assoc/assoc.c b/tools/tools/net80211/w00t/assoc/assoc.c index 79aaef6..345c315 100644 --- a/tools/tools/net80211/w00t/assoc/assoc.c +++ b/tools/tools/net80211/w00t/assoc/assoc.c @@ -368,7 +368,7 @@ void generic_process(struct ieee80211_frame *wh, struct params *p, int len) ptr = (char*) (wh + 1); - if (wh->i_fc[1] & IEEE80211_FC1_WEP) { + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { if (!p->wep_len) { char srca[3*6]; char dsta[3*6]; @@ -676,7 +676,7 @@ void read_tap(struct params *p) wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA; wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS; if (p->wep_len) - wh->i_fc[1] |= IEEE80211_FC1_WEP; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED; /* LLC & SNAP */ ptr = (char*) (wh+1); diff --git a/tools/tools/net80211/w00t/expand/expand.c b/tools/tools/net80211/w00t/expand/expand.c index f2827d9..64bff99 100644 --- a/tools/tools/net80211/w00t/expand/expand.c +++ b/tools/tools/net80211/w00t/expand/expand.c @@ -99,7 +99,7 @@ int wanted(struct params *p, struct ieee80211_frame *wh, int len) if (memcmp(bssid, p->ap, 6) != 0) return 0; - if (!(wh->i_fc[1] & IEEE80211_FC1_WEP)) { + if (!(wh->i_fc[1] & IEEE80211_FC1_PROTECTED)) { printf("Got non WEP packet...\n"); return 0; } @@ -197,7 +197,7 @@ void send_mcast(struct params *p, unsigned char x) wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA; wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_DATA; wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS; - wh->i_fc[1] |= IEEE80211_FC1_WEP; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED; wh->i_dur[0] = 0x69; diff --git a/tools/tools/net80211/w00t/prga/prga.c b/tools/tools/net80211/w00t/prga/prga.c index 173dde7..c75d20f 100644 --- a/tools/tools/net80211/w00t/prga/prga.c +++ b/tools/tools/net80211/w00t/prga/prga.c @@ -190,7 +190,7 @@ void get_prga(struct params *p) if (memcmp(p->ap, bssid, 6) != 0) return; - if (!(wh->i_fc[1] & IEEE80211_FC1_WEP)) { + if (!(wh->i_fc[1] & IEEE80211_FC1_PROTECTED)) { printf("Packet not WEP!\n"); return; } @@ -281,7 +281,7 @@ void send_frag(struct params *p) /* 802.11 */ wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA; wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_DATA; - wh->i_fc[1] |= IEEE80211_FC1_WEP; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED; wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS; if (!last) wh->i_fc[1] |= IEEE80211_FC1_MORE_FRAG; @@ -527,7 +527,7 @@ void read_tap(struct params *p) wh = (struct ieee80211_frame*) p->packet; wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA; wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_DATA; - wh->i_fc[1] |= IEEE80211_FC1_WEP; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED; wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS; wh->i_dur[0] = 0x69; diff --git a/tools/tools/net80211/w00t/redir/redir.c b/tools/tools/net80211/w00t/redir/redir.c index 9be363e..ad574ea 100644 --- a/tools/tools/net80211/w00t/redir/redir.c +++ b/tools/tools/net80211/w00t/redir/redir.c @@ -140,7 +140,7 @@ int wanted(struct params *p, struct ieee80211_frame *wh, int len) if (memcmp(bssid, p->ap, 6) != 0) return 0; - if (!(wh->i_fc[1] & IEEE80211_FC1_WEP)) { + if (!(wh->i_fc[1] & IEEE80211_FC1_PROTECTED)) { printf("Got non WEP packet...\n"); return 0; } @@ -268,7 +268,7 @@ void send_header(struct params *p, struct queue *q) wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA; wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_DATA; wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS; - wh->i_fc[1] |= IEEE80211_FC1_WEP; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED; wh->i_fc[1] |= IEEE80211_FC1_MORE_FRAG; wh->i_dur[0] = 0x69; @@ -345,7 +345,7 @@ void send_data(struct params *p) wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA; wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_DATA; wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS; - wh->i_fc[1] |= IEEE80211_FC1_WEP; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED; wh->i_dur[0] = 0x69; diff --git a/tools/tools/net80211/wesside/wesside/wesside.c b/tools/tools/net80211/wesside/wesside/wesside.c index 76f539e..5d63dc4 100644 --- a/tools/tools/net80211/wesside/wesside/wesside.c +++ b/tools/tools/net80211/wesside/wesside/wesside.c @@ -1093,13 +1093,13 @@ void stuff_for_us(struct ieee80211_frame* wh, int len) { int dlen; dlen = len - sizeof(*wh) - 4 -4; - if (!( wh->i_fc[1] & IEEE80211_FC1_WEP)) { + if (!( wh->i_fc[1] & IEEE80211_FC1_PROTECTED)) { time_print("WARNING: Got NON wep packet from %s dlen %d stype=%x\n", mac2str(wh->i_addr2), dlen, stype); return; } - assert (wh->i_fc[1] & IEEE80211_FC1_WEP); + assert (wh->i_fc[1] & IEEE80211_FC1_PROTECTED); if ((dlen == 36 || dlen == PADDED_ARPLEN) && rtrmac == (unsigned char*) 1) { rtrmac = (unsigned char *) malloc(6); @@ -1577,7 +1577,8 @@ void stuff_for_net(struct ieee80211_frame* wh, int rd) { } // wep data! - if ( (wh->i_fc[1] & IEEE80211_FC1_WEP) && dlen > (4+8+4)) { + if ( (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) && + dlen > (4+8+4)) { got_wep(wh, rd); } } @@ -1768,7 +1769,7 @@ void prepare_fragstate(struct frag_state* fs, int pad) { fs->wh.i_fc[0] |= IEEE80211_FC0_TYPE_DATA; fs->wh.i_fc[1] |= IEEE80211_FC1_DIR_TODS | IEEE80211_FC1_MORE_FRAG | - IEEE80211_FC1_WEP; + IEEE80211_FC1_PROTECTED; memset(&fs->data[8+8+20], 0, pad); } @@ -1858,7 +1859,7 @@ void flood_inet(tx) { fill_basic(wh); wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA; - wh->i_fc[1] |= IEEE80211_FC1_WEP | IEEE80211_FC1_DIR_TODS; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED | IEEE80211_FC1_DIR_TODS; memset(wh->i_addr3, 0xff, 6); body = (unsigned char*) wh + sizeof(*wh); @@ -1880,7 +1881,7 @@ void flood_inet(tx) { fill_basic(wh); wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA; - wh->i_fc[1] |= IEEE80211_FC1_WEP | IEEE80211_FC1_DIR_TODS; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED | IEEE80211_FC1_DIR_TODS; memcpy(wh->i_addr3, rtrmac, 6); body = (unsigned char*) wh + sizeof(*wh); @@ -1975,7 +1976,7 @@ void send_arp(int tx, unsigned short op, unsigned char* srcip, fill_basic(wh); wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA; - wh->i_fc[1] |= IEEE80211_FC1_WEP | IEEE80211_FC1_DIR_TODS; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED | IEEE80211_FC1_DIR_TODS; memset(wh->i_addr3, 0xff, 6); body = (unsigned char*) wh + sizeof(*wh); @@ -2254,7 +2255,7 @@ void read_tap() { fill_basic(wh); wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA; - wh->i_fc[1] |= IEEE80211_FC1_WEP | IEEE80211_FC1_DIR_TODS; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED | IEEE80211_FC1_DIR_TODS; memcpy(wh->i_addr2, eh->ether_shost, 6); memcpy(wh->i_addr3, eh->ether_dhost, 6); diff --git a/tools/tools/net80211/wlaninject/wlaninject.c b/tools/tools/net80211/wlaninject/wlaninject.c index 7527e94..215182a 100644 --- a/tools/tools/net80211/wlaninject/wlaninject.c +++ b/tools/tools/net80211/wlaninject/wlaninject.c @@ -600,7 +600,7 @@ int main(int argc, char *argv[]) break; case 'w': - wh->i_fc[1] |= IEEE80211_FC1_WEP; + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED; break; case 'o': |