Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Apr 2017 14:41:39 +0000 (UTC)
From:      Tai-hwa Liang <avatar@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316644 - in head/sys: amd64/linux amd64/linux32 i386/linux
Message-ID:  <201704081441.v38Efdb1099242@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avatar
Date: Sat Apr  8 14:41:39 2017
New Revision: 316644
URL: https://svnweb.freebsd.org/changeset/base/316644

Log:
  Trying to be more compatible with Linux if.h definitions:
  	- renaming l_ifreq::ifru_metric to l_ifreq::ifru_ivalue;
  	- adding a definition for ifr_ifindex which points to l_ifreq::ifru_ivalue.
  
  A quick search indicates that Linux already got the above changes since 2.1.14.
  
  Reviewed by:	kib, marcel, dchagin
  MFC after:	1 week

Modified:
  head/sys/amd64/linux/linux.h
  head/sys/amd64/linux32/linux.h
  head/sys/i386/linux/linux.h

Modified: head/sys/amd64/linux/linux.h
==============================================================================
--- head/sys/amd64/linux/linux.h	Sat Apr  8 14:16:42 2017	(r316643)
+++ head/sys/amd64/linux/linux.h	Sat Apr  8 14:41:39 2017	(r316644)
@@ -412,7 +412,7 @@ struct l_ifreq {
 		struct l_sockaddr	ifru_netmask;
 		struct l_sockaddr	ifru_hwaddr;
 		l_short		ifru_flags[1];
-		l_int		ifru_metric;
+		l_int		ifru_ivalue;
 		l_int		ifru_mtu;
 		struct l_ifmap	ifru_map;
 		char		ifru_slave[LINUX_IFNAMSIZ];
@@ -422,6 +422,7 @@ struct l_ifreq {
 
 #define	ifr_name	ifr_ifrn.ifrn_name	/* Interface name */
 #define	ifr_hwaddr	ifr_ifru.ifru_hwaddr	/* MAC address */
+#define	ifr_ifindex	ifr_ifru.ifru_ivalue	/* Interface index */
 
 struct l_ifconf {
 	int	ifc_len;

Modified: head/sys/amd64/linux32/linux.h
==============================================================================
--- head/sys/amd64/linux32/linux.h	Sat Apr  8 14:16:42 2017	(r316643)
+++ head/sys/amd64/linux32/linux.h	Sat Apr  8 14:41:39 2017	(r316644)
@@ -503,7 +503,7 @@ struct l_ifreq {
 		struct l_sockaddr	ifru_netmask;
 		struct l_sockaddr	ifru_hwaddr;
 		l_short		ifru_flags[1];
-		l_int		ifru_metric;
+		l_int		ifru_ivalue;
 		l_int		ifru_mtu;
 		struct l_ifmap	ifru_map;
 		char		ifru_slave[LINUX_IFNAMSIZ];
@@ -513,6 +513,7 @@ struct l_ifreq {
 
 #define	ifr_name	ifr_ifrn.ifrn_name	/* Interface name */
 #define	ifr_hwaddr	ifr_ifru.ifru_hwaddr	/* MAC address */
+#define	ifr_ifindex	ifr_ifru.ifru_ivalue	/* Interface index */
 
 struct l_ifconf {
 	int	ifc_len;

Modified: head/sys/i386/linux/linux.h
==============================================================================
--- head/sys/i386/linux/linux.h	Sat Apr  8 14:16:42 2017	(r316643)
+++ head/sys/i386/linux/linux.h	Sat Apr  8 14:41:39 2017	(r316644)
@@ -482,7 +482,7 @@ struct l_ifreq {
 		struct l_sockaddr	ifru_netmask;
 		struct l_sockaddr	ifru_hwaddr;
 		l_short		ifru_flags[1];
-		l_int		ifru_metric;
+		l_int		ifru_ivalue;
 		l_int		ifru_mtu;
 		struct l_ifmap	ifru_map;
 		char		ifru_slave[LINUX_IFNAMSIZ];
@@ -492,6 +492,7 @@ struct l_ifreq {
 
 #define	ifr_name	ifr_ifrn.ifrn_name	/* Interface name */
 #define	ifr_hwaddr	ifr_ifru.ifru_hwaddr	/* MAC address */
+#define	ifr_ifindex	ifr_ifru.ifru_ivalue	/* Interface index */
 
 /*
  * poll()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704081441.v38Efdb1099242>