Source-Changes-HG archive

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

[src/trunk]: src/sys/net add following two ioctls to handle WEP key for IEEE ...



details:   https://anonhg.NetBSD.org/src/rev/8d90c500e410
branches:  trunk
changeset: 495085:8d90c500e410
user:      onoe <onoe%NetBSD.org@localhost>
date:      Fri Jul 21 04:47:40 2000 +0000

description:
add following two ioctls to handle WEP key for IEEE 802.11 wireless
LAN drivers: SIOCS80211NWKEY and SIOCG80211NWKEY.

diffstat:

 sys/net/if.c           |   3 ++-
 sys/net/if_ieee80211.h |  15 ++++++++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diffs (44 lines):

diff -r 7ff22ba51f45 -r 8d90c500e410 sys/net/if.c
--- a/sys/net/if.c      Fri Jul 21 03:14:15 2000 +0000
+++ b/sys/net/if.c      Fri Jul 21 04:47:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.68 2000/07/20 22:00:48 pk Exp $       */
+/*     $NetBSD: if.c,v 1.69 2000/07/21 04:47:40 onoe Exp $     */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -1154,6 +1154,7 @@
 
        case SIOCSDRVSPEC:  
        case SIOCS80211NWID:
+       case SIOCS80211NWKEY:
                /* XXX:  need to pass proc pointer through to driver... */
                if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
                        return (error);
diff -r 7ff22ba51f45 -r 8d90c500e410 sys/net/if_ieee80211.h
--- a/sys/net/if_ieee80211.h    Fri Jul 21 03:14:15 2000 +0000
+++ b/sys/net/if_ieee80211.h    Fri Jul 21 04:47:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ieee80211.h,v 1.4 2000/07/05 02:35:53 onoe Exp $    */
+/*     $NetBSD: if_ieee80211.h,v 1.5 2000/07/21 04:47:40 onoe Exp $    */
 
 
 #ifndef _NET_IF_IEEE80211_H_
@@ -120,4 +120,17 @@
 #define        SIOCS80211NWID          _IOWR('i', 230, struct ifreq)
 #define        SIOCG80211NWID          _IOWR('i', 231, struct ifreq)
 
+/* the first member must be matched with struct ifreq */
+struct ieee80211_nwkey {
+       char            i_name[IFNAMSIZ];       /* if_name, e.g. "wi0" */
+       int             i_wepon;                /* wep enabled flag */
+       int             i_defkid;               /* default encrypt key id */
+       struct {
+               int             i_keylen;
+               u_int8_t        *i_keydat;
+       }               i_key[IEEE80211_WEP_NKID];
+};
+#define        SIOCS80211NWKEY          _IOW('i', 232, struct ieee80211_nwkey)
+#define        SIOCG80211NWKEY         _IOWR('i', 233, struct ieee80211_nwkey)
+
 #endif /* !_NET_IF_IEEE80211_H_ */



Home | Main Index | Thread Index | Old Index