1 | #ifndef _IPRTRMIB_H
|
---|
2 | #define _IPRTRMIB_H
|
---|
3 | #if __GNUC__ >=3
|
---|
4 | #pragma GCC system_header
|
---|
5 | #endif
|
---|
6 |
|
---|
7 | #include <ipifcons.h>
|
---|
8 | #ifdef __cplusplus
|
---|
9 | extern "C" {
|
---|
10 | #endif
|
---|
11 | #ifndef ANY_SIZE
|
---|
12 | #define ANY_SIZE 1
|
---|
13 | #endif
|
---|
14 | #define MAXLEN_PHYSADDR 8
|
---|
15 | #define MAXLEN_IFDESCR 256
|
---|
16 | #ifndef MAX_INTERFACE_NAME_LEN
|
---|
17 | #define MAX_INTERFACE_NAME_LEN 256
|
---|
18 | #endif
|
---|
19 | #define MIB_IPNET_TYPE_OTHER 1
|
---|
20 | #define MIB_IPNET_TYPE_INVALID 2
|
---|
21 | #define MIB_IPNET_TYPE_DYNAMIC 3
|
---|
22 | #define MIB_IPNET_TYPE_STATIC 4
|
---|
23 | #define MIB_TCP_RTO_OTHER 1
|
---|
24 | #define MIB_TCP_RTO_CONSTANT 2
|
---|
25 | #define MIB_TCP_RTO_RSRE 3
|
---|
26 | #define MIB_TCP_RTO_VANJ 4
|
---|
27 | #define MIB_TCP_STATE_CLOSED 1
|
---|
28 | #define MIB_TCP_STATE_LISTEN 2
|
---|
29 | #define MIB_TCP_STATE_SYN_SENT 3
|
---|
30 | #define MIB_TCP_STATE_SYN_RCVD 4
|
---|
31 | #define MIB_TCP_STATE_ESTAB 5
|
---|
32 | #define MIB_TCP_STATE_FIN_WAIT1 6
|
---|
33 | #define MIB_TCP_STATE_FIN_WAIT2 7
|
---|
34 | #define MIB_TCP_STATE_CLOSE_WAIT 8
|
---|
35 | #define MIB_TCP_STATE_CLOSING 9
|
---|
36 | #define MIB_TCP_STATE_LAST_ACK 10
|
---|
37 | #define MIB_TCP_STATE_TIME_WAIT 11
|
---|
38 | #define MIB_TCP_STATE_DELETE_TCB 12
|
---|
39 | #define MIB_USE_CURRENT_TTL ((DWORD)-1)
|
---|
40 | #define MIB_USE_CURRENT_FORWARDING ((DWORD)-1)
|
---|
41 | #define MIB_TCP_MAXCONN_DYNAMIC ((DWORD)-1)
|
---|
42 | typedef enum {
|
---|
43 | TCP_TABLE_BASIC_LISTENER,
|
---|
44 | TCP_TABLE_BASIC_CONNECTIONS,
|
---|
45 | TCP_TABLE_BASIC_ALL,
|
---|
46 | TCP_TABLE_OWNER_PID_LISTENER,
|
---|
47 | TCP_TABLE_OWNER_PID_CONNECTIONS,
|
---|
48 | TCP_TABLE_OWNER_PID_ALL,
|
---|
49 | TCP_TABLE_OWNER_MODULE_LISTENER,
|
---|
50 | TCP_TABLE_OWNER_MODULE_CONNECTIONS,
|
---|
51 | TCP_TABLE_OWNER_MODULE_ALL
|
---|
52 | } TCP_TABLE_CLASS, *PTCP_TABLE_CLASS;
|
---|
53 | typedef struct {
|
---|
54 | DWORD dwAddr;
|
---|
55 | DWORD dwIndex;
|
---|
56 | DWORD dwMask;
|
---|
57 | DWORD dwBCastAddr;
|
---|
58 | DWORD dwReasmSize;
|
---|
59 | unsigned short unused1;
|
---|
60 | unsigned short wType;
|
---|
61 | } MIB_IPADDRROW, *PMIB_IPADDRROW;
|
---|
62 | typedef struct {
|
---|
63 | DWORD dwNumEntries;
|
---|
64 | MIB_IPADDRROW table[ANY_SIZE];
|
---|
65 | } MIB_IPADDRTABLE, *PMIB_IPADDRTABLE;
|
---|
66 | typedef struct {
|
---|
67 | DWORD dwForwardDest;
|
---|
68 | DWORD dwForwardMask;
|
---|
69 | DWORD dwForwardPolicy;
|
---|
70 | DWORD dwForwardNextHop;
|
---|
71 | DWORD dwForwardIfIndex;
|
---|
72 | DWORD dwForwardType;
|
---|
73 | DWORD dwForwardProto;
|
---|
74 | DWORD dwForwardAge;
|
---|
75 | DWORD dwForwardNextHopAS;
|
---|
76 | DWORD dwForwardMetric1;
|
---|
77 | DWORD dwForwardMetric2;
|
---|
78 | DWORD dwForwardMetric3;
|
---|
79 | DWORD dwForwardMetric4;
|
---|
80 | DWORD dwForwardMetric5;
|
---|
81 | } MIB_IPFORWARDROW, *PMIB_IPFORWARDROW;
|
---|
82 | typedef struct {
|
---|
83 | DWORD dwNumEntries;
|
---|
84 | MIB_IPFORWARDROW table[ANY_SIZE];
|
---|
85 | } MIB_IPFORWARDTABLE, *PMIB_IPFORWARDTABLE;
|
---|
86 | typedef struct {
|
---|
87 | DWORD dwIndex;
|
---|
88 | DWORD dwPhysAddrLen;
|
---|
89 | BYTE bPhysAddr[MAXLEN_PHYSADDR];
|
---|
90 | DWORD dwAddr;
|
---|
91 | DWORD dwType;
|
---|
92 | } MIB_IPNETROW, *PMIB_IPNETROW;
|
---|
93 | typedef struct {
|
---|
94 | DWORD dwNumEntries;
|
---|
95 | MIB_IPNETROW table[ANY_SIZE];
|
---|
96 | } MIB_IPNETTABLE, *PMIB_IPNETTABLE;
|
---|
97 | typedef struct {
|
---|
98 | DWORD dwMsgs;
|
---|
99 | DWORD dwErrors;
|
---|
100 | DWORD dwDestUnreachs;
|
---|
101 | DWORD dwTimeExcds;
|
---|
102 | DWORD dwParmProbs;
|
---|
103 | DWORD dwSrcQuenchs;
|
---|
104 | DWORD dwRedirects;
|
---|
105 | DWORD dwEchos;
|
---|
106 | DWORD dwEchoReps;
|
---|
107 | DWORD dwTimestamps;
|
---|
108 | DWORD dwTimestampReps;
|
---|
109 | DWORD dwAddrMasks;
|
---|
110 | DWORD dwAddrMaskReps;
|
---|
111 | } MIBICMPSTATS, *PMIBICMPSTATS;
|
---|
112 | typedef struct {
|
---|
113 | MIBICMPSTATS icmpInStats;
|
---|
114 | MIBICMPSTATS icmpOutStats;
|
---|
115 | } MIBICMPINFO, *PMIBICMPINFO;
|
---|
116 | typedef struct {
|
---|
117 | MIBICMPINFO stats;
|
---|
118 | } MIB_ICMP, *PMIB_ICMP;
|
---|
119 | typedef struct {
|
---|
120 | WCHAR wszName[MAX_INTERFACE_NAME_LEN];
|
---|
121 | DWORD dwIndex;
|
---|
122 | DWORD dwType;
|
---|
123 | DWORD dwMtu;
|
---|
124 | DWORD dwSpeed;
|
---|
125 | DWORD dwPhysAddrLen;
|
---|
126 | BYTE bPhysAddr[MAXLEN_PHYSADDR];
|
---|
127 | DWORD dwAdminStatus;
|
---|
128 | DWORD dwOperStatus;
|
---|
129 | DWORD dwLastChange;
|
---|
130 | DWORD dwInOctets;
|
---|
131 | DWORD dwInUcastPkts;
|
---|
132 | DWORD dwInNUcastPkts;
|
---|
133 | DWORD dwInDiscards;
|
---|
134 | DWORD dwInErrors;
|
---|
135 | DWORD dwInUnknownProtos;
|
---|
136 | DWORD dwOutOctets;
|
---|
137 | DWORD dwOutUcastPkts;
|
---|
138 | DWORD dwOutNUcastPkts;
|
---|
139 | DWORD dwOutDiscards;
|
---|
140 | DWORD dwOutErrors;
|
---|
141 | DWORD dwOutQLen;
|
---|
142 | DWORD dwDescrLen;
|
---|
143 | BYTE bDescr[MAXLEN_IFDESCR];
|
---|
144 | } MIB_IFROW, *PMIB_IFROW;
|
---|
145 | typedef struct {
|
---|
146 | DWORD dwNumEntries;
|
---|
147 | MIB_IFROW table[ANY_SIZE];
|
---|
148 | } MIB_IFTABLE, *PMIB_IFTABLE;
|
---|
149 | typedef struct {
|
---|
150 | DWORD dwForwarding;
|
---|
151 | DWORD dwDefaultTTL;
|
---|
152 | DWORD dwInReceives;
|
---|
153 | DWORD dwInHdrErrors;
|
---|
154 | DWORD dwInAddrErrors;
|
---|
155 | DWORD dwForwDatagrams;
|
---|
156 | DWORD dwInUnknownProtos;
|
---|
157 | DWORD dwInDiscards;
|
---|
158 | DWORD dwInDelivers;
|
---|
159 | DWORD dwOutRequests;
|
---|
160 | DWORD dwRoutingDiscards;
|
---|
161 | DWORD dwOutDiscards;
|
---|
162 | DWORD dwOutNoRoutes;
|
---|
163 | DWORD dwReasmTimeout;
|
---|
164 | DWORD dwReasmReqds;
|
---|
165 | DWORD dwReasmOks;
|
---|
166 | DWORD dwReasmFails;
|
---|
167 | DWORD dwFragOks;
|
---|
168 | DWORD dwFragFails;
|
---|
169 | DWORD dwFragCreates;
|
---|
170 | DWORD dwNumIf;
|
---|
171 | DWORD dwNumAddr;
|
---|
172 | DWORD dwNumRoutes;
|
---|
173 | } MIB_IPSTATS, *PMIB_IPSTATS;
|
---|
174 | typedef struct {
|
---|
175 | DWORD dwRtoAlgorithm;
|
---|
176 | DWORD dwRtoMin;
|
---|
177 | DWORD dwRtoMax;
|
---|
178 | DWORD dwMaxConn;
|
---|
179 | DWORD dwActiveOpens;
|
---|
180 | DWORD dwPassiveOpens;
|
---|
181 | DWORD dwAttemptFails;
|
---|
182 | DWORD dwEstabResets;
|
---|
183 | DWORD dwCurrEstab;
|
---|
184 | DWORD dwInSegs;
|
---|
185 | DWORD dwOutSegs;
|
---|
186 | DWORD dwRetransSegs;
|
---|
187 | DWORD dwInErrs;
|
---|
188 | DWORD dwOutRsts;
|
---|
189 | DWORD dwNumConns;
|
---|
190 | } MIB_TCPSTATS, *PMIB_TCPSTATS;
|
---|
191 | typedef struct {
|
---|
192 | DWORD dwState;
|
---|
193 | DWORD dwLocalAddr;
|
---|
194 | DWORD dwLocalPort;
|
---|
195 | DWORD dwRemoteAddr;
|
---|
196 | DWORD dwRemotePort;
|
---|
197 | } MIB_TCPROW, *PMIB_TCPROW;
|
---|
198 | typedef struct {
|
---|
199 | DWORD dwNumEntries;
|
---|
200 | MIB_TCPROW table[ANY_SIZE];
|
---|
201 | } MIB_TCPTABLE, *PMIB_TCPTABLE;
|
---|
202 | typedef struct {
|
---|
203 | DWORD dwState;
|
---|
204 | DWORD dwLocalAddr;
|
---|
205 | DWORD dwLocalPort;
|
---|
206 | DWORD dwRemoteAddr;
|
---|
207 | DWORD dwRemotePort;
|
---|
208 | DWORD dwOwningPid;
|
---|
209 | } MIB_TCPROW_OWNER_PID, *PMIB_TCPROW_OWNER_PID;
|
---|
210 | typedef struct {
|
---|
211 | DWORD dwNumEntries;
|
---|
212 | MIB_TCPROW_OWNER_PID table[ANY_SIZE];
|
---|
213 | } MIB_TCPTABLE_OWNER_PID, *PMIB_TCPTABLE_OWNER_PID;
|
---|
214 | typedef struct {
|
---|
215 | DWORD dwInDatagrams;
|
---|
216 | DWORD dwNoPorts;
|
---|
217 | DWORD dwInErrors;
|
---|
218 | DWORD dwOutDatagrams;
|
---|
219 | DWORD dwNumAddrs;
|
---|
220 | } MIB_UDPSTATS, *PMIB_UDPSTATS;
|
---|
221 | typedef struct {
|
---|
222 | DWORD dwLocalAddr;
|
---|
223 | DWORD dwLocalPort;
|
---|
224 | } MIB_UDPROW, *PMIB_UDPROW;
|
---|
225 | typedef struct {
|
---|
226 | DWORD dwNumEntries;
|
---|
227 | MIB_UDPROW table[ANY_SIZE];
|
---|
228 | } MIB_UDPTABLE, *PMIB_UDPTABLE;
|
---|
229 | typedef struct {
|
---|
230 | UCHAR ucLocalAddr[16];
|
---|
231 | DWORD dwLocalScopeId;
|
---|
232 | DWORD dwLocalPort;
|
---|
233 | UCHAR ucRemoteAddr[16];
|
---|
234 | DWORD dwRemoteScopeId;
|
---|
235 | DWORD dwRemotePort;
|
---|
236 | DWORD dwState;
|
---|
237 | DWORD dwOwningPid;
|
---|
238 | } MIB_TCP6ROW_OWNER_PID, *PMIB_TCP6ROW_OWNER_PID;
|
---|
239 | typedef struct {
|
---|
240 | DWORD dwNumEntries;
|
---|
241 | MIB_TCP6ROW_OWNER_PID table[ANY_SIZE];
|
---|
242 | } MIB_TCP6TABLE_OWNER_PID, *PMIB_TCP6TABLE_OWNER_PID;
|
---|
243 | #ifdef __cplusplus
|
---|
244 | }
|
---|
245 | #endif
|
---|
246 | #endif /* _IPRTRMIB_H */
|
---|