1 struct user_net_device_stats
{
2 unsigned long long rx_packets
; /* total packets received */
3 unsigned long long tx_packets
; /* total packets transmitted */
4 unsigned long long rx_bytes
; /* total bytes received */
5 unsigned long long tx_bytes
; /* total bytes transmitted */
6 unsigned long rx_errors
; /* bad packets received */
7 unsigned long tx_errors
; /* packet transmit problems */
8 unsigned long rx_dropped
; /* no space in linux buffers */
9 unsigned long tx_dropped
; /* no space available in linux */
10 unsigned long rx_multicast
; /* multicast packets received */
11 unsigned long rx_compressed
;
12 unsigned long tx_compressed
;
13 unsigned long collisions
;
15 /* detailed rx_errors: */
16 unsigned long rx_length_errors
;
17 unsigned long rx_over_errors
; /* receiver ring buff overflow */
18 unsigned long rx_crc_errors
; /* recved pkt with crc error */
19 unsigned long rx_frame_errors
; /* recv'd frame alignment error */
20 unsigned long rx_fifo_errors
; /* recv'r fifo overrun */
21 unsigned long rx_missed_errors
; /* receiver missed packet */
22 /* detailed tx_errors */
23 unsigned long tx_aborted_errors
;
24 unsigned long tx_carrier_errors
;
25 unsigned long tx_fifo_errors
;
26 unsigned long tx_heartbeat_errors
;
27 unsigned long tx_window_errors
;
31 struct interface
*next
, *prev
;
32 char name
[IFNAMSIZ
]; /* interface name */
33 short type
; /* if type */
34 short flags
; /* various flags */
35 int metric
; /* routing metric */
36 int mtu
; /* MTU value */
37 int tx_queue_len
; /* transmit queue length */
38 struct ifmap map
; /* hardware setup */
39 struct sockaddr addr
; /* IP address */
40 struct sockaddr dstaddr
; /* P-P IP address */
41 struct sockaddr broadaddr
; /* IP broadcast address */
42 struct sockaddr netmask
; /* IP network mask */
43 struct sockaddr ipxaddr_bb
; /* IPX network address */
44 struct sockaddr ipxaddr_sn
; /* IPX network address */
45 struct sockaddr ipxaddr_e3
; /* IPX network address */
46 struct sockaddr ipxaddr_e2
; /* IPX network address */
47 struct sockaddr ddpaddr
; /* Appletalk DDP address */
48 struct sockaddr ecaddr
; /* Econet address */
57 char hwaddr
[32]; /* HW address */
59 struct user_net_device_stats stats
; /* statistics */
60 int keepalive
; /* keepalive value for SLIP */
61 int outfill
; /* outfill value for SLIP */
64 extern int if_fetch(struct interface
*ife
);
66 extern int for_all_interfaces(int (*)(struct interface
*, void *), void *);
67 extern int free_interface_list(void);
68 extern struct interface
*lookup_interface(char *name
);
69 extern int if_readlist(void);
71 extern int do_if_fetch(struct interface
*ife
);
72 extern int do_if_print(struct interface
*ife
, void *cookie
);
74 extern void ife_print(struct interface
*ptr
);
78 extern const char *if_port_text
[][4];
80 /* Defines for poor glibc2.0 users, the feature check is done at runtime */
81 #if !defined(SIOCSIFTXQLEN)
82 #define SIOCSIFTXQLEN 0x8943
83 #define SIOCGIFTXQLEN 0x8942
86 #if !defined(ifr_qlen)
87 /* Actually it is ifru_ivalue, but that is not present in 2.0 kernel headers */
88 #define ifr_qlen ifr_ifru.ifru_mtu
91 #define HAVE_TXQUEUELEN
95 #define IFF_DYNAMIC 0x8000 /* dialup device with changing addresses */