5
#include <sys/socket.h>
22
unsigned long int mem_start;
23
unsigned long int mem_end;
24
unsigned short int base_addr;
32
char ifrn_name[IFNAMSIZ];
35
struct sockaddr ifru_addr;
36
struct sockaddr ifru_destaddr;
37
struct sockaddr ifru_broadaddr;
38
struct sockaddr ifru_netmask;
39
struct sockaddr ifru_hwaddr;
43
struct ifmap ifru_map;
44
char ifru_slave[IFNAMSIZ];
45
char ifru_newname[IFNAMSIZ];
49
#define ifr_name ifr_ifrn.ifrn_name
50
#define ifr_addr ifr_ifru.ifru_addr
51
#define ifr_destaddr ifr_ifru.ifru_destaddr
52
#define ifr_broadaddr ifr_ifru.ifru_broadaddr
53
#define ifr_netmask ifr_ifru.ifru_netmask
54
#define ifr_hwaddr ifr_ifru.ifru_hwaddr
55
#define ifr_flags ifr_ifru.ifru_flags
56
#define ifr_ivalue ifr_ifru.ifru_ivalue
57
#define ifr_mtu ifr_ifru.ifru_mtu
58
#define ifr_map ifr_ifru.ifru_map
59
#define ifr_slave ifr_ifru.ifru_slave
60
#define ifr_newname ifr_ifru.ifru_newname
61
#define ifr_data ifr_ifru.ifru_data
67
struct ifreq* ifcu_req;
70
#define ifc_buf ifc_ifcu.ifcu_buf
71
#define ifc_req ifc_ifcu.ifcu_req
73
#define IF_NAMESIZE abort(0);
75
unsigned if_nametoindex(const char *a);
76
char *if_indextoname(unsigned int a, char *b);
77
struct if_nameindex *if_nameindex();
78
void if_freenameindex(struct if_nameindex *a);
81
#define IFF_BROADCAST 0x2
83
#define IFF_LOOPBACK 0x8
84
#define IFF_POINTOPOINT 0x10
85
#define IFF_NOTRAILERS 0x20
86
#define IFF_RUNNING 0x40
87
#define IFF_NOARP 0x80
88
#define IFF_PROMISC 0x100
89
#define IFF_ALLMULTI 0x200
90
#define IFF_MASTER 0x400
91
#define IFF_SLAVE 0x800
92
#define IFF_MULTICAST 0x1000
93
#define IFF_PORTSEL 0x2000
94
#define IFF_AUTOMEDIA 0x4000
95
#define IFF_DYNAMIC 0x8000
96
#define IFF_LOWER_UP 0x10000
97
#define IFF_DORMANT 0x20000
98
#define IFF_ECHO 0x40000
99
#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)