1 | /**
|
---|
2 | * This file has no copyright assigned and is placed in the Public Domain.
|
---|
3 | * This file is part of the mingw-w64 runtime package.
|
---|
4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
---|
5 | */
|
---|
6 | #ifndef _INC_TCPMIB
|
---|
7 | #define _INC_TCPMIB
|
---|
8 |
|
---|
9 | #ifndef ANY_SIZE
|
---|
10 | #define ANY_SIZE 1
|
---|
11 | #endif
|
---|
12 |
|
---|
13 | #if (_WIN32_WINNT >= 0x0600)
|
---|
14 |
|
---|
15 | #ifdef __cplusplus
|
---|
16 | extern "C" {
|
---|
17 | #endif
|
---|
18 |
|
---|
19 | /* As I read msdn on Vista the defines above were moved into
|
---|
20 | typedef enum { MIB_..., } MIB_TCP_STATE;
|
---|
21 | We simply typedef it to int. */
|
---|
22 | typedef int MIB_TCP_STATE;
|
---|
23 |
|
---|
24 | typedef enum _TCP_CONNECTION_OFFLOAD_STATE {
|
---|
25 | TcpConnectionOffloadStateInHost = 0,
|
---|
26 | TcpConnectionOffloadStateOffloading = 1,
|
---|
27 | TcpConnectionOffloadStateOffloaded = 2,
|
---|
28 | TcpConnectionOffloadStateUploading = 3,
|
---|
29 | TcpConnectionOffloadStateMax = 4
|
---|
30 | } TCP_CONNECTION_OFFLOAD_STATE;
|
---|
31 |
|
---|
32 | typedef struct _MIB_TCP6ROW {
|
---|
33 | MIB_TCP_STATE State;
|
---|
34 | IN6_ADDR LocalAddr;
|
---|
35 | DWORD dwLocalScopeId;
|
---|
36 | DWORD dwLocalPort;
|
---|
37 | IN6_ADDR RemoteAddr;
|
---|
38 | DWORD dwRemoteScopeId;
|
---|
39 | DWORD dwRemotePort;
|
---|
40 | } MIB_TCP6ROW, *PMIB_TCP6ROW;
|
---|
41 |
|
---|
42 | typedef struct _MIB_TCP6TABLE {
|
---|
43 | DWORD dwNumEntries;
|
---|
44 | MIB_TCP6ROW table[ANY_SIZE];
|
---|
45 | } MIB_TCP6TABLE, *PMIB_TCP6TABLE;
|
---|
46 |
|
---|
47 | typedef struct _MIB_TCP6ROW2 {
|
---|
48 | IN6_ADDR LocalAddr;
|
---|
49 | DWORD dwLocalScopeId;
|
---|
50 | DWORD dwLocalPort;
|
---|
51 | IN6_ADDR RemoteAddr;
|
---|
52 | DWORD dwRemoteScopeId;
|
---|
53 | DWORD dwRemotePort;
|
---|
54 | MIB_TCP_STATE State;
|
---|
55 | DWORD dwOwningPid;
|
---|
56 | TCP_CONNECTION_OFFLOAD_STATE dwOffloadState;
|
---|
57 | } MIB_TCP6ROW2, *PMIB_TCP6ROW2;
|
---|
58 |
|
---|
59 | typedef struct _MIB_TCP6TABLE2 {
|
---|
60 | DWORD dwNumEntries;
|
---|
61 | MIB_TCP6ROW2 table[ANY_SIZE];
|
---|
62 | } MIB_TCP6TABLE2, *PMIB_TCP6TABLE2;
|
---|
63 |
|
---|
64 | typedef struct _MIB_TCPROW2 {
|
---|
65 | DWORD dwState;
|
---|
66 | DWORD dwLocalAddr;
|
---|
67 | DWORD dwLocalPort;
|
---|
68 | DWORD dwRemoteAddr;
|
---|
69 | DWORD dwRemotePort;
|
---|
70 | DWORD dwOwningPid;
|
---|
71 | TCP_CONNECTION_OFFLOAD_STATE dwOffloadState;
|
---|
72 | } MIB_TCPROW2, *PMIB_TCPROW2;
|
---|
73 |
|
---|
74 | typedef struct _MIB_TCPTABLE2 {
|
---|
75 | DWORD dwNumEntries;
|
---|
76 | MIB_TCPROW2 table[ANY_SIZE];
|
---|
77 | } MIB_TCPTABLE2, *PMIB_TCPTABLE2;
|
---|
78 |
|
---|
79 | #ifdef __cplusplus
|
---|
80 | }
|
---|
81 | #endif
|
---|
82 |
|
---|
83 | #endif /*(_WIN32_WINNT >= 0x0600)*/
|
---|
84 |
|
---|
85 | #endif /*_INC_TCPMIB*/
|
---|