12 unsigned int if_nametoindex (const char *);
13 char *if_indextoname (unsigned int, char *);
14 struct if_nameindex *if_nameindex (void);
15 void if_freenameindex (struct if_nameindex *);
22 #include <sys/socket.h>
25 #define IFF_BROADCAST 0x2
27 #define IFF_LOOPBACK 0x8
28 #define IFF_POINTOPOINT 0x10
29 #define IFF_NOTRAILERS 0x20
30 #define IFF_RUNNING 0x40
31 #define IFF_NOARP 0x80
32 #define IFF_PROMISC 0x100
33 #define IFF_ALLMULTI 0x200
34 #define IFF_MASTER 0x400
35 #define IFF_SLAVE 0x800
36 #define IFF_MULTICAST 0x1000
37 #define IFF_PORTSEL 0x2000
38 #define IFF_AUTOMEDIA 0x4000
39 #define IFF_DYNAMIC 0x8000
42 struct sockaddr ifa_addr;
44 struct sockaddr ifu_broadaddr;
45 struct sockaddr ifu_dstaddr;
47 struct iface *ifa_ifp;
48 struct ifaddr *ifa_next;
51 #define ifa_broadaddr ifa_ifu.ifu_broadaddr
52 #define ifa_dstaddr ifa_ifu.ifu_dstaddr
55 unsigned long int mem_start;
56 unsigned long int mem_end;
57 unsigned short int base_addr;
64 #define IFNAMSIZ IF_NAMESIZE
68 char ifrn_name[IFNAMSIZ];
71 struct sockaddr ifru_addr;
72 struct sockaddr ifru_dstaddr;
73 struct sockaddr ifru_broadaddr;
74 struct sockaddr ifru_netmask;
75 struct sockaddr ifru_hwaddr;
79 struct ifmap ifru_map;
80 char ifru_slave[IFNAMSIZ];
81 char ifru_newname[IFNAMSIZ];
86 #define ifr_name ifr_ifrn.ifrn_name
87 #define ifr_hwaddr ifr_ifru.ifru_hwaddr
88 #define ifr_addr ifr_ifru.ifru_addr
89 #define ifr_dstaddr ifr_ifru.ifru_dstaddr
90 #define ifr_broadaddr ifr_ifru.ifru_broadaddr
91 #define ifr_netmask ifr_ifru.ifru_netmask
92 #define ifr_flags ifr_ifru.ifru_flags
93 #define ifr_metric ifr_ifru.ifru_ivalue
94 #define ifr_mtu ifr_ifru.ifru_mtu
95 #define ifr_map ifr_ifru.ifru_map
96 #define ifr_slave ifr_ifru.ifru_slave
97 #define ifr_data ifr_ifru.ifru_data
98 #define ifr_ifindex ifr_ifru.ifru_ivalue
99 #define ifr_bandwidth ifr_ifru.ifru_ivalue
100 #define ifr_qlen ifr_ifru.ifru_ivalue
101 #define ifr_newname ifr_ifru.ifru_newname
102 #define _IOT_ifreq _IOT(_IOTS(char),IFNAMSIZ,_IOTS(char),16,0,0)
103 #define _IOT_ifreq_short _IOT(_IOTS(char),IFNAMSIZ,_IOTS(short),1,0,0)
104 #define _IOT_ifreq_int _IOT(_IOTS(char),IFNAMSIZ,_IOTS(int),1,0,0)
110 struct ifreq *ifcu_req;
114 #define ifc_buf ifc_ifcu.ifcu_buf
115 #define ifc_req ifc_ifcu.ifcu_req
116 #define _IOT_ifconf _IOT(_IOTS(struct ifconf),1,0,0,0,0)