blob: c9f46d50794c788190ed870392b83e1f30a1385f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
/*++
Copyright (c) 1991 Microsoft Corporation
Module Name:
net_stat.h
Abstract:
This file defines the IOCTL interface to the TCP/IP drivers used by
the netstat program.
Author:
Mike Massa (mikemas) Jan 31, 1992
Revision History:
Who When What
-------- -------- ----------------------------------------------
mikemas 01-31-92 created
Notes:
--*/
/*
* /usr/projects/spare/PBRAIN/SCCS/pbrainG/dev/src/include/sys/snet/0/s.net_stat.h
* @(#)net_stat.h 1.9
*
* Last delta created 12:04:31 3/6/90
* This file extracted 16:49:18 12/23/91
*
* MV 08/06/88 Mods for Generic Ethernet Driver (GENERICE).
*
* MV 18/07/88 To get over limits on STREAMS ioctl size, we now
* get connection information send up in separate
* messages, with the number of connections to expect
* passed up (along with protocol stats) in the initial
* ioctl.
*/
/*
* TCP statistics.
*/
struct tcp_stat
{
long net; /* net to get stats on, 0L -> all nets */
/* protocol statistics */
int tcp_small; /* incomplete headers */
int tcp_cksum; /* header checksum errors */
/* connection information */
int tcp_conns; /* number of active TCBs */
};
#define MAX_TCB 32 /* max. no. of tcp_conns in a message */
/*
* Per-Connection (TCB) Data.
*/
struct tcp_conn
{
long tcp_addr; /* TCB address */
int tcp_rcvq; /* packets on receive queue */
int tcp_sndq; /* packets on send queue */
long tcp_laddr; /* local address */
long tcp_faddr; /* foreign address */
short tcp_lport; /* local port */
short tcp_fport; /* foreign port */
int tcp_state; /* connection state */
};
/* possible values for tcp_state */
#define CLOSED 0 /* connection not in use */
#define LISTEN 1 /* listening for requests */
#define SYN_SEND 2 /* sent SYN, awaiting ACK */
#define SYN_RECV 3 /* received SYN, not ACKed */
#define ESTABLISHED 4 /* connection established */
#define FIN_WAIT_1 5 /* sent FIN, awaiting ACK */
#define FIN_WAIT_2 6 /* sent FIN, got ACK not FIN */
#define CLOSE_WAIT 7 /* received FIN, not ACKed */
#define LAST_ACK 8 /* waiting for final ACK */
/*
* UDP statistics.
*/
struct udp_stat
{
long net; /* net to get stats on, 0L -> all nets */
/* protocol statistics */
int udp_small; /* packets smaller than minimum */
int udp_cksum; /* header checksum errors */
int udp_header; /* bad data length fields */
/* connection information */
int udp_conns; /* number of active UCBs */
};
#define MAX_UCB 32 /* max. no. of udp_conns in a message */
/*
* Per-Connection (UCB) Data.
*/
struct udp_conn
{
long udp_addr; /* UCB address */
int udp_rcvq; /* packets on receive queue */
int udp_sndq; /* packets on send queue */
long udp_laddr; /* local address */
int udp_lport; /* local port */
long udp_faddr; /* foreign address */
int udp_fport; /* foreign port */
};
/*
* IP statistics
*/
struct ip_stat
{
long net; /* net to get stats on, 0L -> all nets */
int ip_small; /* packets smaller than minimum */
int ip_cksum; /* header checksum errors */
int ip_header; /* bad data length fields */
};
#ifndef GENERICE
/*
* Ethernet statistics
*/
struct eth_stat
{
long eth_tx; /* packets transmitted */
long eth_rx; /* packets received */
long eth_lost; /* packets discarded */
int eth_crc; /* CRC error packets */
int eth_align; /* alignment error packets */
int eth_res; /* 82586 resource errors */
int eth_over; /* overrun error packets */
};
#endif /*~GENERICE*/
/*
* Ioctl(2) commands for Network Devices.
*/
#define NET_STAT ('N'<<8|1) /* generic statistics gathering */
#define NET_RESET ('N'<<8|2) /* generic statistics reset */
|