Source-Changes-HG archive

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

[src/trunk]: src/sys Add SIOCGIFDLT, which will fetch the data link type (DLT...



details:   https://anonhg.NetBSD.org/src/rev/54face0ca04d
branches:  trunk
changeset: 500805:54face0ca04d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Dec 18 21:05:03 2000 +0000

description:
Add SIOCGIFDLT, which will fetch the data link type (DLT_* constant)
for a given network interface.

diffstat:

 sys/net/if.c     |  6 +++++-
 sys/sys/sockio.h |  3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 4c7414d24cbb -r 54face0ca04d sys/net/if.c
--- a/sys/net/if.c      Mon Dec 18 21:03:34 2000 +0000
+++ b/sys/net/if.c      Mon Dec 18 21:05:03 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.79 2000/12/18 18:54:47 thorpej Exp $  */
+/*     $NetBSD: if.c,v 1.80 2000/12/18 21:05:04 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -1087,6 +1087,10 @@
                ifr->ifr_mtu = ifp->if_mtu;
                break;
 
+       case SIOCGIFDLT:
+               ifr->ifr_dlt = ifp->if_dlt;
+               break;
+
        case SIOCSIFFLAGS:
                if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
                        return (error);
diff -r 4c7414d24cbb -r 54face0ca04d sys/sys/sockio.h
--- a/sys/sys/sockio.h  Mon Dec 18 21:03:34 2000 +0000
+++ b/sys/sys/sockio.h  Mon Dec 18 21:05:03 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sockio.h,v 1.14 2000/08/10 11:48:41 ad Exp $   */
+/*     $NetBSD: sockio.h,v 1.15 2000/12/18 21:05:03 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993, 1994
@@ -105,5 +105,6 @@
 #define        SIOCIFCREATE     _IOW('i', 122, struct ifreq)   /* create clone if */
 #define        SIOCIFDESTROY    _IOW('i', 121, struct ifreq)   /* destroy clone if */
 #define        SIOCIFGCLONERS  _IOWR('i', 120, struct if_clonereq) /* get cloners */
+#define        SIOCGIFDLT      _IOWR('i', 119, struct ifreq)   /* get DLT */
 
 #endif /* !_SYS_SOCKIO_H_ */



Home | Main Index | Thread Index | Old Index