Module Name:    src
Committed By:   ozaki-r
Date:           Tue Jun 21 03:07:55 UTC 2016

Modified Files:
        src/sys/net: if.h
        src/sys/sys: mbuf.h

Log Message:
Introduce if_index_t


To generate a diff of this commit:
cvs rdiff -u -r1.211 -r1.212 src/sys/net/if.h
cvs rdiff -u -r1.165 -r1.166 src/sys/sys/mbuf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if.h
diff -u src/sys/net/if.h:1.211 src/sys/net/if.h:1.212
--- src/sys/net/if.h:1.211	Mon Jun 20 08:24:36 2016
+++ src/sys/net/if.h	Tue Jun 21 03:07:54 2016
@@ -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 callout;
 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 @@ typedef struct ifnet {
 	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. */

Index: src/sys/sys/mbuf.h
diff -u src/sys/sys/mbuf.h:1.165 src/sys/sys/mbuf.h:1.166
--- src/sys/sys/mbuf.h:1.165	Sun Jun 12 10:14:12 2016
+++ src/sys/sys/mbuf.h	Tue Jun 21 03:07:54 2016
@@ -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 m_hdr {
 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 */

Reply via email to