44 |
#define N_MAXSLP 6 |
#define N_MAXSLP 6 |
45 |
|
|
46 |
struct _ifstat { |
struct _ifstat { |
47 |
unsigned long rx_packets; /* total packets received */ |
unsigned long rx_packets; /* total packets received */ |
48 |
unsigned long tx_packets; /* total packets transmitted */ |
unsigned long tx_packets; /* total packets transmitted */ |
49 |
unsigned long rx_bytes; /* total bytes received */ |
unsigned long rx_bytes; /* total bytes received */ |
50 |
unsigned long tx_bytes; /* total bytes transmitted */ |
unsigned long tx_bytes; /* total bytes transmitted */ |
51 |
unsigned long rx_errors; /* bad packets received */ |
unsigned long rx_errors; /* bad packets received */ |
52 |
unsigned long tx_errors; /* packet transmit problems */ |
unsigned long tx_errors; /* packet transmit problems */ |
53 |
unsigned long rx_dropped; /* no space in linux buffers */ |
unsigned long rx_dropped; /* no space in linux buffers */ |
54 |
unsigned long tx_dropped; /* no space available in linux */ |
unsigned long tx_dropped; /* no space available in linux */ |
55 |
unsigned long rx_multicast; /* multicast packets received */ |
unsigned long rx_multicast; /* multicast packets received */ |
56 |
unsigned long rx_compressed; |
unsigned long rx_compressed; |
57 |
unsigned long tx_compressed; |
unsigned long tx_compressed; |
58 |
unsigned long collisions; |
unsigned long collisions; |
59 |
|
|
60 |
/* detailed rx_errors: */ |
/* detailed rx_errors: */ |
61 |
unsigned long rx_length_errors; |
unsigned long rx_length_errors; |
62 |
unsigned long rx_over_errors; /* receiver ring buff overflow */ |
unsigned long rx_over_errors; /* receiver ring buff overflow */ |
63 |
unsigned long rx_crc_errors; /* recved pkt with crc error */ |
unsigned long rx_crc_errors; /* recved pkt with crc error */ |
64 |
unsigned long rx_frame_errors; /* recv'd frame alignment error */ |
unsigned long rx_frame_errors; /* recv'd frame alignment error */ |
65 |
unsigned long rx_fifo_errors; /* recv'r fifo overrun */ |
unsigned long rx_fifo_errors; /* recv'r fifo overrun */ |
66 |
unsigned long rx_missed_errors; /* receiver missed packet */ |
unsigned long rx_missed_errors; /* receiver missed packet */ |
67 |
/* detailed tx_errors */ |
/* detailed tx_errors */ |
68 |
unsigned long tx_aborted_errors; |
unsigned long tx_aborted_errors; |
69 |
unsigned long tx_carrier_errors; |
unsigned long tx_carrier_errors; |
70 |
unsigned long tx_fifo_errors; |
unsigned long tx_fifo_errors; |
71 |
unsigned long tx_heartbeat_errors; |
unsigned long tx_heartbeat_errors; |
72 |
unsigned long tx_window_errors; |
unsigned long tx_window_errors; |
73 |
} ifstat; |
} ifstat; |
74 |
|
|
75 |
struct interface { |
struct interface { |
76 |
struct interface *next; |
struct interface *next; |
77 |
|
|
78 |
char name[IFNAMSIZ]; /* interface name */ |
char name[IFNAMSIZ]; /* interface name */ |
79 |
short type; /* if type */ |
short type; /* if type */ |
80 |
short flags; /* various flags */ |
short flags; /* various flags */ |
81 |
int metric; /* routing metric */ |
int metric; /* routing metric */ |
82 |
int mtu; /* MTU value */ |
int mtu; /* MTU value */ |
83 |
int tx_queue_len; /* transmit queue length */ |
int tx_queue_len; /* transmit queue length */ |
84 |
struct ifmap map; /* hardware setup */ |
struct ifmap map; /* hardware setup */ |
85 |
struct sockaddr addr; /* IP address */ |
struct sockaddr addr; /* IP address */ |
86 |
struct sockaddr dstaddr; /* P-P IP address */ |
struct sockaddr dstaddr; /* P-P IP address */ |
87 |
struct sockaddr broadaddr; /* IP broadcast address */ |
struct sockaddr broadaddr; /* IP broadcast address */ |
88 |
struct sockaddr netmask; /* IP network mask */ |
struct sockaddr netmask; /* IP network mask */ |
89 |
struct sockaddr ipxaddr_bb; /* IPX network address */ |
struct sockaddr ipxaddr_bb; /* IPX network address */ |
90 |
struct sockaddr ipxaddr_sn; /* IPX network address */ |
struct sockaddr ipxaddr_sn; /* IPX network address */ |
91 |
struct sockaddr ipxaddr_e3; /* IPX network address */ |
struct sockaddr ipxaddr_e3; /* IPX network address */ |
92 |
struct sockaddr ipxaddr_e2; /* IPX network address */ |
struct sockaddr ipxaddr_e2; /* IPX network address */ |
93 |
struct sockaddr ddpaddr; /* Appletalk DDP address */ |
struct sockaddr ddpaddr; /* Appletalk DDP address */ |
94 |
struct sockaddr ecaddr; /* Econet address */ |
struct sockaddr ecaddr; /* Econet address */ |
95 |
int has_ip; |
int has_ip; |
96 |
int has_ipx_bb; |
int has_ipx_bb; |
97 |
int has_ipx_sn; |
int has_ipx_sn; |
98 |
int has_ipx_e3; |
int has_ipx_e3; |
99 |
int has_ipx_e2; |
int has_ipx_e2; |
100 |
int has_ax25; |
int has_ax25; |
101 |
int has_ddp; |
int has_ddp; |
102 |
int has_econet; |
int has_econet; |
103 |
char hwaddr[32]; /* HW address */ |
char hwaddr[32]; /* HW address */ |
104 |
int statistics_valid; |
int statistics_valid; |
105 |
struct ifstat; /* statistics */ |
struct ifstat; /* statistics */ |
106 |
int keepalive; /* keepalive value for SLIP */ |
int keepalive; /* keepalive value for SLIP */ |
107 |
int outfill; /* outfill value for SLIP */ |
int outfill; /* outfill value for SLIP */ |
108 |
}; |
}; |
109 |
|
|
110 |
/* |
/* |