Skip to content

Commit 7e26e9f

Browse files
committed
added ifreq->ifr_ifindex + SIOCGIFINDEX definitions
1 parent 059189c commit 7e26e9f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/net/if.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ struct ifreq {
145145
struct sockaddr ifru_broadaddr;
146146
struct sockaddr ifru_netmask;
147147
short ifru_flags;
148+
short ifru_ifindex;
148149
long ifru_metric;
149150
long ifru_mtu;
150151
struct ifstat ifru_stats;
@@ -156,6 +157,7 @@ struct ifreq {
156157
#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
157158
#define ifr_netmask ifr_ifru.ifru_netmask /* netmask */
158159
#define ifr_flags ifr_ifru.ifru_flags /* flags */
160+
#define ifr_ifindex ifr_ifru.ifru_ifindex /* ifindex */
159161
#define ifr_metric ifr_ifru.ifru_metric /* metric */
160162
#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
161163
#define ifr_stats ifr_ifru.ifru_stats /* statistics */

include/sockios.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
#define SIOCADDRT (('S' << 8) | 30) /* add routing table entry */
4848
#define SIOCDELRT (('S' << 8) | 31) /* delete routing table entry */
4949

50+
#define SIOCGIFINDEX (('S' << 8) | 32)
51+
#define SIOGIFINDEX SIOCGIFINDEX
52+
5053
/* ARP cache control calls */
5154
#define SIOCDARP (('S' << 8) | 40) /* delete ARP table entry */
5255
#define SIOCGARP (('S' << 8) | 41) /* get ARP table entry */

0 commit comments

Comments
 (0)