include: strmif.idl should import unknwn.idl.
[wine] / include / tcpmib.h
1 /*
2  * Copyright (C) 2003 Juan Lang
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 #ifndef __WINE_TCPMIB_H
19 #define __WINE_TCPMIB_H
20
21 #define TCPIP_OWNING_MODULE_SIZE 16
22
23
24 /* TCP tables */
25
26 typedef enum
27 {
28     MIB_TCP_STATE_CLOSED = 1,
29     MIB_TCP_STATE_LISTEN = 2,
30     MIB_TCP_STATE_SYN_SENT = 3,
31     MIB_TCP_STATE_SYN_RCVD = 4,
32     MIB_TCP_STATE_ESTAB = 5,
33     MIB_TCP_STATE_FIN_WAIT1 = 6,
34     MIB_TCP_STATE_FIN_WAIT2 = 7,
35     MIB_TCP_STATE_CLOSE_WAIT = 8,
36     MIB_TCP_STATE_CLOSING = 9,
37     MIB_TCP_STATE_LAST_ACK = 10,
38     MIB_TCP_STATE_TIME_WAIT = 11,
39     MIB_TCP_STATE_DELETE_TCB = 12,
40 } MIB_TCP_STATE;
41
42 typedef enum
43 {
44     TcpConnectionOffloadStateInHost,
45     TcpConnectionOffloadStateOffloading,
46     TcpConnectionOffloadStateOffloaded,
47     TcpConnectionOffloadStateUploading,
48     TcpConnectionOffloadStateMax,
49 } TCP_CONNECTION_OFFLOAD_STATE, *PTCP_CONNECTION_OFFLOAD_STATE;
50
51 typedef struct _MIB_TCPROW
52 {
53     union
54     {
55         DWORD         dwState;
56         MIB_TCP_STATE State;
57     } DUMMYUNIONNAME;
58     DWORD dwLocalAddr;
59     DWORD dwLocalPort;
60     DWORD dwRemoteAddr;
61     DWORD dwRemotePort;
62 } MIB_TCPROW, *PMIB_TCPROW;
63
64 typedef struct _MIB_TCPTABLE
65 {
66     DWORD      dwNumEntries;
67     MIB_TCPROW table[1];
68 } MIB_TCPTABLE, *PMIB_TCPTABLE;
69
70 typedef struct _MIB_TCPROW_OWNER_PID
71 {
72     DWORD dwState;
73     DWORD dwLocalAddr;
74     DWORD dwLocalPort;
75     DWORD dwRemoteAddr;
76     DWORD dwRemotePort;
77     DWORD dwOwningPid;
78 } MIB_TCPROW_OWNER_PID, *PMIB_TCPROW_OWNER_PID;
79
80 typedef struct _MIB_TCPTABLE_OWNER_PID
81 {
82     DWORD                dwNumEntries;
83     MIB_TCPROW_OWNER_PID table[1];
84 } MIB_TCPTABLE_OWNER_PID, *PMIB_TCPTABLE_OWNER_PID;
85
86 typedef struct _MIB_TCPROW2
87 {
88     DWORD dwState;
89     DWORD dwLocalAddr;
90     DWORD dwLocalPort;
91     DWORD dwRemoteAddr;
92     DWORD dwRemotePort;
93     DWORD dwOwningPid;
94     TCP_CONNECTION_OFFLOAD_STATE dwOffloadState;
95 } MIB_TCPROW2, *PMIB_TCPROW2;
96
97 typedef struct _MIB_TCPTABLE2
98 {
99     DWORD       dwNumEntries;
100     MIB_TCPROW2 table[1];
101 } MIB_TCPTABLE2, *PMIB_TCPTABLE2;
102
103
104 /* TCP stats */
105
106 typedef enum
107 {
108     TcpRtoAlgorithmOther = 0,
109     TcpRtoAlgorithmConstant = 1,
110     TcpRtoAlgorithmRsre = 2,
111     TcpRtoAlgorithmVanj = 3,
112
113     MIB_TCP_RTO_OTHER = 1,
114     MIB_TCP_RTO_CONSTANT = 2,
115     MIB_TCP_RTO_RSRE = 3,
116     MIB_TCP_RTO_VANJ = 4,
117 } TCP_RTO_ALGORITHM, *PTCP_RTO_ALGORITHM;
118
119 typedef struct _MIB_TCPSTATS
120 {
121     union
122     {
123         DWORD             dwRtoAlgorithm;
124         TCP_RTO_ALGORITHM RtoAlgorithm;
125     } DUMMYUNIONNAME;
126     DWORD dwRtoMin;
127     DWORD dwRtoMax;
128     DWORD dwMaxConn;
129     DWORD dwActiveOpens;
130     DWORD dwPassiveOpens;
131     DWORD dwAttemptFails;
132     DWORD dwEstabResets;
133     DWORD dwCurrEstab;
134     DWORD dwInSegs;
135     DWORD dwOutSegs;
136     DWORD dwRetransSegs;
137     DWORD dwInErrs;
138     DWORD dwOutRsts;
139     DWORD dwNumConns;
140 } MIB_TCPSTATS, *PMIB_TCPSTATS;
141
142 #endif /* __WINE_TCPMIB_H */