Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Add beginnings of ieee 802.11 generic stuff



details:   https://anonhg.NetBSD.org/src/rev/07c3b2a458be
branches:  trunk
changeset: 481154:07c3b2a458be
user:      chopps <chopps%NetBSD.org@localhost>
date:      Sun Jan 23 23:50:13 2000 +0000

description:
Add beginnings of ieee 802.11 generic stuff

diffstat:

 sys/net/Makefile       |  10 +++++-----
 sys/net/if_ieee80211.h |  48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 5 deletions(-)

diffs (74 lines):

diff -r 8dae31f70803 -r 07c3b2a458be sys/net/Makefile
--- a/sys/net/Makefile  Sun Jan 23 23:49:48 2000 +0000
+++ b/sys/net/Makefile  Sun Jan 23 23:50:13 2000 +0000
@@ -1,13 +1,13 @@
-#      $NetBSD: Makefile,v 1.5 1999/07/01 08:12:47 itojun Exp $
+#      $NetBSD: Makefile,v 1.6 2000/01/23 23:50:13 chopps Exp $
 
 KDIR=  /sys/net
 INCSDIR= /usr/include/net
 
 INCS=  bpf.h bpfdesc.h ethertypes.h if.h if_arc.h if_arp.h if_atm.h if_dl.h \
-       if_ether.h if_fddi.h if_gre.h if_hippi.h if_llc.h if_media.h if_ppp.h \
-       if_pppvar.h if_slvar.h if_sppp.h if_stripvar.h if_token.h if_tun.h \
-       if_types.h netisr.h pfil.h ppp-comp.h ppp_defs.h radix.h raw_cb.h \
-       route.h slcompress.h slip.h zlib.h
+       if_ether.h if_fddi.h if_gre.h if_hippi.h if_ieee80211.h if_llc.h \
+       if_media.h if_ppp.h if_pppvar.h if_slvar.h if_sppp.h if_stripvar.h \
+       if_token.h if_tun.h if_types.h netisr.h pfil.h ppp-comp.h ppp_defs.h \
+       radix.h raw_cb.h route.h slcompress.h slip.h zlib.h
 INCS+= pfkeyv2.h if_gif.h
 
 .include <bsd.kinc.mk>
diff -r 8dae31f70803 -r 07c3b2a458be sys/net/if_ieee80211.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/net/if_ieee80211.h    Sun Jan 23 23:50:13 2000 +0000
@@ -0,0 +1,48 @@
+/*     $NetBSD: if_ieee80211.h,v 1.1 2000/01/23 23:50:14 chopps Exp $  */
+
+/*
+ * generic definitions for IEEE 802.11 frames
+ */
+struct ieee80211_frame {
+       u_int8_t        i_fc[2];
+       u_int8_t        i_dur[2];
+       u_int8_t        i_addr1[ETHER_ADDR_LEN];
+       u_int8_t        i_addr2[ETHER_ADDR_LEN];
+       u_int8_t        i_addr3[ETHER_ADDR_LEN];
+       u_int8_t        i_seq[2];
+       /* possibly followed by addr4[ETHER_ADDR_LEN]; */
+};
+
+#define        IEEE80211_FC0_VERSION_MASK              0x03
+#define        IEEE80211_FC0_VERSION_0                 0x00
+#define        IEEE80211_FC0_TYPE_MASK                 0x0c
+#define        IEEE80211_FC0_TYPE_MGT                  0x00
+#define        IEEE80211_FC0_TYPE_CTL                  0x04
+#define        IEEE80211_FC0_TYPE_DATA                 0x08
+#define        IEEE80211_FC0_SUBTYPE_MASK              0xf0
+#define        IEEE80211_FC0_SUBTYPE_ASSOC_REQ         0x00
+#define        IEEE80211_FC0_SUBTYPE_ASSOC_RESP        0x10
+#define        IEEE80211_FC0_SUBTYPE_REASSOC_REQ       0x20
+#define        IEEE80211_FC0_SUBTYPE_REASSOC_RESP      0x30
+#define        IEEE80211_FC0_SUBTYPE_PROBE_REQ         0x40
+#define        IEEE80211_FC0_SUBTYPE_PROBE_RESP        0x50
+#define        IEEE80211_FC0_SUBTYPE_BEACON            0x80
+#define        IEEE80211_FC0_SUBTYPE_DISASSOC          0xa0
+#define        IEEE80211_FC0_SUBTYPE_AUTH_REQ          0xb0
+#define        IEEE80211_FC0_SUBTYPE_AUTH_RESP         /* XXX */
+#define        IEEE80211_FC0_SUBTYPE_ATIM              /* XXX */
+#define        IEEE80211_FC0_SUBTYPE_PS_POLL           /* XXX */
+#define        IEEE80211_FC0_SUBTYPE_RTS               /* XXX */
+#define        IEEE80211_FC0_SUBTYPE_CTS               /* XXX */
+#define        IEEE80211_FC0_SUBTYPE_ACK               /* XXX */
+
+#define        IEEE80211_FC1_RCVFROM_MASK              0x03
+#define        IEEE80211_FC1_RCVFROM_TERMINAL          0x00
+#define        IEEE80211_FC1_RCVFROM_AP                0x01
+#define        IEEE80211_FC1_RCVFROM_AP2AP             0x02
+
+#define        IEEE80211_NWID_LEN      32
+
+/* nwid is u_int8_t array of IEEE80211_NWID_LEN pointed at by ifr.ifr_data */
+#define        SIOCS80211NWID          _IOWR('i', 230, struct ifreq)
+#define        SIOCG80211NWID          _IOWR('i', 231, struct ifreq)



Home | Main Index | Thread Index | Old Index