Source-Changes-HG archive

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

[src/trunk]: src/sys Introduce if_index_t



details:   https://anonhg.NetBSD.org/src/rev/db6ba6fa9134
branches:  trunk
changeset: 816195:db6ba6fa9134
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Tue Jun 21 03:07:54 2016 +0000

description:
Introduce if_index_t

diffstat:

 sys/net/if.h   |  6 ++++--
 sys/sys/mbuf.h |  4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 568ba3739d58 -r db6ba6fa9134 sys/net/if.h
--- a/sys/net/if.h      Tue Jun 21 02:14:11 2016 +0000
+++ b/sys/net/if.h      Tue Jun 21 03:07:54 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.211 2016/06/20 08:24:36 knakahara Exp $       */
+/*     $NetBSD: if.h,v 1.212 2016/06/21 03:07:54 ozaki-r Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -231,6 +231,8 @@
 struct krwlock;
 struct if_percpuq;
 
+typedef unsigned short if_index_t;
+
 typedef struct ifnet {
        void    *if_softc;              /* lower-level data for this if */
        /* DEPRECATED. Keep it to avoid breaking kvm(3) users */
@@ -239,7 +241,7 @@
        char    if_xname[IFNAMSIZ];     /* external name (name + unit) */
        int     if_pcount;              /* number of promiscuous listeners */
        struct bpf_if *if_bpf;          /* packet filter structure */
-       u_short if_index;               /* numeric abbreviation for this if */
+       if_index_t      if_index;       /* numeric abbreviation for this if */
        short   if_timer;               /* time 'til if_slowtimo called */
        short   if_flags;               /* up/down, broadcast, etc. */
        short   if_extflags;            /* if_output MP-safe, etc. */
diff -r 568ba3739d58 -r db6ba6fa9134 sys/sys/mbuf.h
--- a/sys/sys/mbuf.h    Tue Jun 21 02:14:11 2016 +0000
+++ b/sys/sys/mbuf.h    Tue Jun 21 03:07:54 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbuf.h,v 1.165 2016/06/12 10:14:12 ozaki-r Exp $       */
+/*     $NetBSD: mbuf.h,v 1.166 2016/06/21 03:07:54 ozaki-r Exp $       */
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -180,7 +180,7 @@
 struct pkthdr {
        union {
                void            *ctx;           /* for M_GETCTX/M_SETCTX */
-               uint16_t        index;          /* rcv interface index */
+               if_index_t      index;          /* rcv interface index */
        } _rcvif;
 #define rcvif_index            _rcvif.index
        SLIST_HEAD(packet_tags, m_tag) tags;    /* list of packet tags */



Home | Main Index | Thread Index | Old Index