1 /* This whole file is flaky */
2 /* This is all we need to compile and can't find only in linux headers.
3 * So, I did copy past here...
5 #define __u8 unsigned char
6 #define __u16 unsigned short
7 #define __u32 unsigned long /* Hum, and on Alpha ? */
8 #define __u64 unsigned long long /* Unsure about this one */
11 #define ARPHRD_ETHER 1 /* Ethernet 10Mbps */
12 #define ETH_ALEN 6 /* Octets in one ethernet addr */
15 * Interface request structure used for socket
16 * ioctl's. All interface ioctl's must have parameter
17 * definitions which begin with ifr_name. The
18 * remainder may be interface specific.
26 char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
30 struct sockaddr ifru_addr;
31 struct sockaddr ifru_dstaddr;
32 struct sockaddr ifru_broadaddr;
33 struct sockaddr ifru_netmask;
34 struct sockaddr ifru_hwaddr;
39 struct ifmap ifru_map;
41 char ifru_slave[IFNAMSIZ]; /* Just fits the size */
45 #define ifr_name ifr_ifrn.ifrn_name /* interface name */
46 #define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
47 #define ifr_addr ifr_ifru.ifru_addr /* address */
50 * Structure used in SIOCGIFCONF request.
51 * Used to retrieve interface configuration
52 * for machine (useful for programs which
53 * must know all networks accessible).
57 int ifc_len; /* size of buffer */
61 struct ifreq *ifcu_req;
64 #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
65 #define ifc_req ifc_ifcu.ifcu_req /* array of structures */
67 /* Internet address. */
72 /* Address to accept any incoming messages. */
73 #define INADDR_ANY ((unsigned long int) 0x00000000)
75 /* Structure describing an Internet (IP) socket address. */
76 #define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
78 short int sin_family; /* Address family */
79 unsigned short int sin_port; /* Port number */
80 struct in_addr sin_addr; /* Internet address */
82 /* Pad to size of `struct sockaddr'. */
83 unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) -
84 sizeof(unsigned short int) - sizeof(struct in_addr)];
87 #define ATF_COM 0x02 /* completed entry (ha valid) */
88 /* ARP ioctl request. */
90 struct sockaddr arp_pa; /* protocol address */
91 struct sockaddr arp_ha; /* hardware address */
92 int arp_flags; /* flags */
93 struct sockaddr arp_netmask; /* netmask (only for proxy arps) */