5 Copyright (c) 2013 Intel Corporation
9 #define EFI_TCP4_SERVICE_BINDING_PROTOCOL \
10 { 0x00720665, 0x67eb, 0x4a99, {0xba, 0xf7, 0xd3, 0xc3, 0x3a, 0x1c,0x7c, 0xc9}}
12 #define EFI_TCP4_PROTOCOL \
13 { 0x65530bc7, 0xa359, 0x410f, {0xb0, 0x10, 0x5a, 0xad, 0xc7, 0xec, 0x2b, 0x62}}
15 #define EFI_TCP6_SERVICE_BINDING_PROTOCOL \
16 { 0xec20eb79, 0x6c1a, 0x4664, {0x9a, 0xd, 0xd2, 0xe4, 0xcc, 0x16, 0xd6, 0x64}}
18 #define EFI_TCP6_PROTOCOL \
19 { 0x46e44855, 0xbd60, 0x4ab7, {0xab, 0xd, 0xa6, 0x79, 0xb9, 0x44, 0x7d, 0x77}}
21 INTERFACE_DECL(_EFI_TCP4
);
22 INTERFACE_DECL(_EFI_TCP6
);
25 BOOLEAN UseDefaultAddress
;
26 EFI_IPv4_ADDRESS StationAddress
;
27 EFI_IPv4_ADDRESS SubnetMask
;
29 EFI_IPv4_ADDRESS RemoteAddress
;
32 } EFI_TCP4_ACCESS_POINT
;
35 UINT32 ReceiveBufferSize
;
36 UINT32 SendBufferSize
;
38 UINT32 ConnectionTimeout
;
41 UINT32 TimeWaitTimeout
;
42 UINT32 KeepAliveProbes
;
44 UINT32 KeepAliveInterval
;
46 BOOLEAN EnableTimeStamp
;
47 BOOLEAN EnableWindowScaling
;
48 BOOLEAN EnableSelectiveAck
;
49 BOOLEAN EnablePAthMtuDiscovery
;
59 EFI_TCP4_ACCESS_POINT AccessPoint
;
61 // TCP Control Options
62 EFI_TCP4_OPTION
*ControlOption
;
63 } EFI_TCP4_CONFIG_DATA
;
69 Tcp4StateSynReceived
= 3,
70 Tcp4StateEstablished
= 4,
71 Tcp4StateFinWait1
= 5,
72 Tcp4StateFinWait2
= 6,
74 Tcp4StateTimeWait
= 8,
75 Tcp4StateCloseWait
= 9,
77 } EFI_TCP4_CONNECTION_STATE
;
81 (EFIAPI
*EFI_TCP4_GET_MODE_DATA
) (
82 IN
struct _EFI_TCP4
*This
,
83 OUT EFI_TCP4_CONNECTION_STATE
*Tcp4State OPTIONAL
,
84 OUT EFI_TCP4_CONFIG_DATA
*Tcp4ConfigData OPTIONAL
,
85 OUT EFI_IP4_MODE_DATA
*Ip4ModeData OPTIONAL
,
86 OUT EFI_MANAGED_NETWORK_CONFIG_DATA
*MnpConfigData OPTIONAL
,
87 OUT EFI_SIMPLE_NETWORK_MODE
*SnpModeData OPTIONAL
92 (EFIAPI
*EFI_TCP4_CONFIGURE
) (
93 IN
struct _EFI_TCP4
*This
,
94 IN EFI_TCP4_CONFIG_DATA
*TcpConfigData OPTIONAL
99 (EFIAPI
*EFI_TCP4_ROUTES
) (
100 IN
struct _EFI_TCP4
*This
,
101 IN BOOLEAN DeleteRoute
,
102 IN EFI_IPv4_ADDRESS
*SubnetAddress
,
103 IN EFI_IPv4_ADDRESS
*SubnetMask
,
104 IN EFI_IPv4_ADDRESS
*GatewayAddress
110 } EFI_TCP4_COMPLETION_TOKEN
;
113 EFI_TCP4_COMPLETION_TOKEN CompletionToken
;
114 } EFI_TCP4_CONNECTION_TOKEN
;
118 (EFIAPI
*EFI_TCP4_CONNECT
) (
119 IN
struct _EFI_TCP4
*This
,
120 IN EFI_TCP4_CONNECTION_TOKEN
*ConnectionToken
124 EFI_TCP4_COMPLETION_TOKEN CompletionToken
;
125 EFI_HANDLE NewChildHandle
;
126 } EFI_TCP4_LISTEN_TOKEN
;
130 (EFIAPI
*EFI_TCP4_ACCEPT
) (
131 IN
struct _EFI_TCP4
*This
,
132 IN EFI_TCP4_LISTEN_TOKEN
*ListenToken
135 #define EFI_CONNECTION_FIN EFIERR(104)
136 #define EFI_CONNECTION_RESET EFIERR(105)
137 #define EFI_CONNECTION_REFUSED EFIERR(106)
140 UINT32 FragmentLength
;
141 VOID
*FragmentBuffer
;
142 } EFI_TCP4_FRAGMENT_DATA
;
147 UINT32 FragmentCount
;
148 EFI_TCP4_FRAGMENT_DATA FragmentTable
[1];
149 } EFI_TCP4_RECEIVE_DATA
;
155 UINT32 FragmentCount
;
156 EFI_TCP4_FRAGMENT_DATA FragmentTable
[1];
157 } EFI_TCP4_TRANSMIT_DATA
;
160 EFI_TCP4_COMPLETION_TOKEN CompletionToken
;
162 EFI_TCP4_RECEIVE_DATA
*RxData
;
163 EFI_TCP4_TRANSMIT_DATA
*TxData
;
169 (EFIAPI
*EFI_TCP4_TRANSMIT
) (
170 IN
struct _EFI_TCP4
*This
,
171 IN EFI_TCP4_IO_TOKEN
*Token
176 (EFIAPI
*EFI_TCP4_RECEIVE
) (
177 IN
struct _EFI_TCP4
*This
,
178 IN EFI_TCP4_IO_TOKEN
*Token
182 EFI_TCP4_COMPLETION_TOKEN CompletionToken
;
183 BOOLEAN AbortOnClose
;
184 } EFI_TCP4_CLOSE_TOKEN
;
188 (EFIAPI
*EFI_TCP4_CLOSE
)(
189 IN
struct _EFI_TCP4
*This
,
190 IN EFI_TCP4_CLOSE_TOKEN
*CloseToken
195 (EFIAPI
*EFI_TCP4_CANCEL
)(
196 IN
struct _EFI_TCP4
*This
,
197 IN EFI_TCP4_COMPLETION_TOKEN
*Token OPTIONAL
202 (EFIAPI
*EFI_TCP4_POLL
) (
203 IN
struct _EFI_TCP4
*This
206 typedef struct _EFI_TCP4
{
207 EFI_TCP4_GET_MODE_DATA GetModeData
;
208 EFI_TCP4_CONFIGURE Configure
;
209 EFI_TCP4_ROUTES Routes
;
210 EFI_TCP4_CONNECT Connect
;
211 EFI_TCP4_ACCEPT Accept
;
212 EFI_TCP4_TRANSMIT Transmit
;
213 EFI_TCP4_RECEIVE Receive
;
214 EFI_TCP4_CLOSE Close
;
215 EFI_TCP4_CANCEL Cancel
;
222 Tcp6StateSynSent
= 2,
223 Tcp6StateSynReceived
= 3,
224 Tcp6StateEstablished
= 4,
225 Tcp6StateFinWait1
= 5,
226 Tcp6StateFinWait2
= 6,
227 Tcp6StateClosing
= 7,
228 Tcp6StateTimeWait
= 8,
229 Tcp6StateCloseWait
= 9,
230 Tcp6StateLastAck
= 10
231 } EFI_TCP6_CONNECTION_STATE
;
234 EFI_IPv6_ADDRESS StationAddress
;
236 EFI_IPv6_ADDRESS RemoteAddress
;
239 } EFI_TCP6_ACCESS_POINT
;
242 UINT32 ReceiveBufferSize
;
243 UINT32 SendBufferSize
;
244 UINT32 MaxSynBackLog
;
245 UINT32 ConnectionTimeout
;
248 UINT32 TimeWaitTimeout
;
249 UINT32 KeepAliveProbes
;
250 UINT32 KeepAliveTime
;
251 UINT32 KeepAliveInterval
;
253 BOOLEAN EnableTimeStamp
;
254 BOOLEAN EnableWindbowScaling
;
255 BOOLEAN EnableSelectiveAck
;
256 BOOLEAN EnablePathMtuDiscovery
;
262 EFI_TCP6_ACCESS_POINT AccessPoint
;
263 EFI_TCP6_OPTION
*ControlOption
;
264 } EFI_TCP6_CONFIG_DATA
;
268 (EFIAPI
*EFI_TCP6_GET_MODE_DATA
) (
269 IN
struct _EFI_TCP6
*This
,
270 OUT EFI_TCP6_CONNECTION_STATE
*Tcp6State OPTIONAL
,
271 OUT EFI_TCP6_CONFIG_DATA
*Tcp6ConfigData OPTIONAL
,
272 OUT EFI_IP6_MODE_DATA
*Ip6ModeData OPTIONAL
,
273 OUT EFI_MANAGED_NETWORK_CONFIG_DATA
*MnpConfigData OPTIONAL
,
274 OUT EFI_SIMPLE_NETWORK_MODE
*SnpModeData OPTIONAL
279 (EFIAPI
*EFI_TCP6_CONFIGURE
) (
280 IN
struct _EFI_TCP6
*This
,
281 IN EFI_TCP6_CONFIG_DATA
*Tcp6ConfigData OPTIONAL
287 } EFI_TCP6_COMPLETION_TOKEN
;
290 EFI_TCP6_COMPLETION_TOKEN CompletionToken
;
291 } EFI_TCP6_CONNECTION_TOKEN
;
295 (EFIAPI
*EFI_TCP6_CONNECT
) (
296 IN
struct _EFI_TCP6
*This
,
297 IN EFI_TCP6_CONNECTION_TOKEN
*ConnectionToken
301 EFI_TCP6_COMPLETION_TOKEN CompletionToken
;
302 EFI_HANDLE NewChildHandle
;
303 } EFI_TCP6_LISTEN_TOKEN
;
307 (EFIAPI
*EFI_TCP6_ACCEPT
) (
308 IN
struct _EFI_TCP6
*This
,
309 IN EFI_TCP6_LISTEN_TOKEN
*ListenToken
313 UINT32 FragmentLength
;
314 VOID
*FragmentBuffer
;
315 } EFI_TCP6_FRAGMENT_DATA
;
320 UINT32 FragmentCount
;
321 EFI_TCP6_FRAGMENT_DATA FragmentTable
[1];
322 } EFI_TCP6_RECEIVE_DATA
;
328 UINT32 FragmentCount
;
329 EFI_TCP6_FRAGMENT_DATA FragmentTable
[1];
330 } EFI_TCP6_TRANSMIT_DATA
;
333 EFI_TCP6_COMPLETION_TOKEN CompletionToken
;
335 EFI_TCP6_RECEIVE_DATA
*RxData
;
336 EFI_TCP6_TRANSMIT_DATA
*TxData
;
342 (EFIAPI
*EFI_TCP6_TRANSMIT
) (
343 IN
struct _EFI_TCP6
*This
,
344 IN EFI_TCP6_IO_TOKEN
*Token
349 (EFIAPI
*EFI_TCP6_RECEIVE
) (
350 IN
struct _EFI_TCP6
*This
,
351 IN EFI_TCP6_IO_TOKEN
*Token
355 EFI_TCP6_COMPLETION_TOKEN CompletionToken
;
356 BOOLEAN AbortOnClose
;
357 } EFI_TCP6_CLOSE_TOKEN
;
361 (EFIAPI
*EFI_TCP6_CLOSE
)(
362 IN
struct _EFI_TCP6
*This
,
363 IN EFI_TCP6_CLOSE_TOKEN
*CloseToken
368 (EFIAPI
*EFI_TCP6_CANCEL
)(
369 IN
struct _EFI_TCP6
*This
,
370 IN EFI_TCP6_COMPLETION_TOKEN
*Token OPTIONAL
375 (EFIAPI
*EFI_TCP6_POLL
) (
376 IN
struct _EFI_TCP6
*This
379 typedef struct _EFI_TCP6
{
380 EFI_TCP6_GET_MODE_DATA GetModeData
;
381 EFI_TCP6_CONFIGURE Configure
;
382 EFI_TCP6_CONNECT Connect
;
383 EFI_TCP6_ACCEPT Accept
;
384 EFI_TCP6_TRANSMIT Transmit
;
385 EFI_TCP6_RECEIVE Receive
;
386 EFI_TCP6_CLOSE Close
;
387 EFI_TCP6_CANCEL Cancel
;
391 #endif /* _EFI_TCP_H */