5 Copyright (c) 2013 Intel Corporation
9 #define EFI_IP4_SERVICE_BINDING_PROTOCOL \
10 {0xc51711e7,0xb4bf,0x404a,{0xbf,0xb8,0x0a,0x04, 0x8e,0xf1,0xff,0xe4}}
12 #define EFI_IP4_PROTOCOL \
13 {0x41d94cd2,0x35b6,0x455a,{0x82,0x58,0xd4,0xe5,0x13,0x34,0xaa,0xdd}}
15 #define EFI_IP6_SERVICE_BINDING_PROTOCOL \
16 {0xec835dd3,0xfe0f,0x617b,{0xa6,0x21,0xb3,0x50,0xc3,0xe1,0x33,0x88}}
18 #define EFI_IP6_PROTOCOL \
19 {0x2c8759d5,0x5c2d,0x66ef,{0x92,0x5f,0xb6,0x6c,0x10,0x19,0x57,0xe2}}
21 INTERFACE_DECL(_EFI_IP4
);
22 INTERFACE_DECL(_EFI_IP6
);
25 EFI_HANDLE InstanceHandle
;
26 EFI_IPv4_ADDRESS Ip4Address
;
27 EFI_IPv4_ADDRESS SubnetMask
;
28 } EFI_IP4_ADDRESS_PAIR
;
31 EFI_HANDLE DriverHandle
;
33 EFI_IP4_ADDRESS_PAIR AddressPairs
[1];
34 } EFI_IP4_VARIABLE_DATA
;
37 UINT8 DefaultProtocol
;
38 BOOLEAN AcceptAnyProtocol
;
39 BOOLEAN AcceptIcmpErrors
;
40 BOOLEAN AcceptBroadcast
;
41 BOOLEAN AcceptPromiscuous
;
42 BOOLEAN UseDefaultAddress
;
43 EFI_IPv4_ADDRESS StationAddress
;
44 EFI_IPv4_ADDRESS SubnetMask
;
47 BOOLEAN DoNotFragment
;
49 UINT32 ReceiveTimeout
;
50 UINT32 TransmitTimeout
;
51 } EFI_IP4_CONFIG_DATA
;
54 EFI_IPv4_ADDRESS SubnetAddress
;
55 EFI_IPv4_ADDRESS SubnetMask
;
56 EFI_IPv4_ADDRESS GatewayAddress
;
57 } EFI_IP4_ROUTE_TABLE
;
67 EFI_IP4_CONFIG_DATA ConfigData
;
70 EFI_IPv4_ADDRESS
*GroupTable
;
72 EFI_IP4_ROUTE_TABLE
*RouteTable
;
74 EFI_IP4_ICMP_TYPE
*IcmpTypeList
;
79 (EFIAPI
*EFI_IP4_GET_MODE_DATA
) (
80 IN
struct _EFI_IP4
*This
,
81 OUT EFI_IP4_MODE_DATA
*Ip4ModeData OPTIONAL
,
82 OUT EFI_MANAGED_NETWORK_CONFIG_DATA
*MnpConfigData OPTIONAL
,
83 OUT EFI_SIMPLE_NETWORK_MODE
*SnpModeData OPTIONAL
88 (EFIAPI
*EFI_IP4_CONFIGURE
) (
89 IN
struct _EFI_IP4
*This
,
90 IN EFI_IP4_CONFIG_DATA
*IpConfigData OPTIONAL
95 (EFIAPI
*EFI_IP4_GROUPS
) (
96 IN
struct _EFI_IP4
*This
,
98 IN EFI_IPv4_ADDRESS
*GroupAddress OPTIONAL
103 (EFIAPI
*EFI_IP4_ROUTES
) (
104 IN
struct _EFI_IP4
*This
,
105 IN BOOLEAN DeleteRoute
,
106 IN EFI_IPv4_ADDRESS
*SubnetAddress
,
107 IN EFI_IPv4_ADDRESS
*SubnetMask
,
108 IN EFI_IPv4_ADDRESS
*GatewayAddress
113 UINT8 HeaderLength
:4;
117 UINT16 Identification
;
118 UINT16 Fragmentation
;
122 EFI_IPv4_ADDRESS SourceAddress
;
123 EFI_IPv4_ADDRESS DestinationAddress
;
128 UINT32 FragmentLength
;
129 VOID
*FragmentBuffer
;
130 } EFI_IP4_FRAGMENT_DATA
;
134 EFI_EVENT RecycleSignal
;
136 EFI_IP4_HEADER
*Header
;
137 UINT32 OptionsLength
;
140 UINT32 FragmentCount
;
141 EFI_IP4_FRAGMENT_DATA FragmentTable
[1];
142 } EFI_IP4_RECEIVE_DATA
;
145 EFI_IPv4_ADDRESS SourceAddress
;
146 EFI_IPv4_ADDRESS GatewayAddress
;
150 BOOLEAN DoNotFragment
;
151 } EFI_IP4_OVERRIDE_DATA
;
154 EFI_IPv4_ADDRESS DestinationAddress
;
155 EFI_IP4_OVERRIDE_DATA
*OverrideData
;
156 UINT32 OptionsLength
;
158 UINT32 TotalDataLength
;
159 UINT32 FragmentCount
;
160 EFI_IP4_FRAGMENT_DATA FragmentTable
[1];
161 } EFI_IP4_TRANSMIT_DATA
;
167 EFI_IP4_RECEIVE_DATA
*RxData
;
168 EFI_IP4_TRANSMIT_DATA
*TxData
;
170 } EFI_IP4_COMPLETION_TOKEN
;
174 (EFIAPI
*EFI_IP4_TRANSMIT
) (
175 IN
struct _EFI_IP4
*This
,
176 IN EFI_IP4_COMPLETION_TOKEN
*Token
181 (EFIAPI
*EFI_IP4_RECEIVE
) (
182 IN
struct _EFI_IP4
*This
,
183 IN EFI_IP4_COMPLETION_TOKEN
*Token
188 (EFIAPI
*EFI_IP4_CANCEL
)(
189 IN
struct _EFI_IP4
*This
,
190 IN EFI_IP4_COMPLETION_TOKEN
*Token OPTIONAL
195 (EFIAPI
*EFI_IP4_POLL
) (
196 IN
struct _EFI_IP4
*This
199 typedef struct _EFI_IP4
{
200 EFI_IP4_GET_MODE_DATA GetModeData
;
201 EFI_IP4_CONFIGURE Configure
;
202 EFI_IP4_GROUPS Groups
;
203 EFI_IP4_ROUTES Routes
;
204 EFI_IP4_TRANSMIT Transmit
;
205 EFI_IP4_RECEIVE Receive
;
206 EFI_IP4_CANCEL Cancel
;
211 UINT8 DefaultProtocol
;
212 BOOLEAN AcceptAnyProtocol
;
213 BOOLEAN AcceptIcmpErrors
;
214 BOOLEAN AcceptPromiscuous
;
215 EFI_IPv6_ADDRESS DestinationAddress
;
216 EFI_IPv6_ADDRESS StationAddress
;
220 UINT32 ReceiveTimeout
;
221 UINT32 TransmitTimeout
;
222 } EFI_IP6_CONFIG_DATA
;
225 EFI_IPv6_ADDRESS Address
;
227 } EFI_IP6_ADDRESS_INFO
;
230 EFI_IPv6_ADDRESS Gateway
;
231 EFI_IPv6_ADDRESS Destination
;
233 } EFI_IP6_ROUTE_TABLE
;
236 EfiNeighborInComplete
,
237 EfiNeighborReachable
,
241 } EFI_IP6_NEIGHBOR_STATE
;
244 EFI_IPv6_ADDRESS Neighbor
;
245 EFI_MAC_ADDRESS LinkAddress
;
246 EFI_IP6_NEIGHBOR_STATE State
;
247 } EFI_IP6_NEIGHBOR_CACHE
;
254 //***********************************************************
255 // ICMPv6 type definitions for error messages
256 //***********************************************************
257 #define ICMP_V6_DEST_UNREACHABLE 0x1
258 #define ICMP_V6_PACKET_TOO_BIG 0x2
259 #define ICMP_V6_TIME_EXCEEDED 0x3
260 #define ICMP_V6_PARAMETER_PROBLEM 0x4
262 //***********************************************************
263 // ICMPv6 type definition for informational messages
264 //***********************************************************
265 #define ICMP_V6_ECHO_REQUEST 0x80
266 #define ICMP_V6_ECHO_REPLY 0x81
267 #define ICMP_V6_LISTENER_QUERY 0x82
268 #define ICMP_V6_LISTENER_REPORT 0x83
269 #define ICMP_V6_LISTENER_DONE 0x84
270 #define ICMP_V6_ROUTER_SOLICIT 0x85
271 #define ICMP_V6_ROUTER_ADVERTISE 0x86
272 #define ICMP_V6_NEIGHBOR_SOLICIT 0x87
273 #define ICMP_V6_NEIGHBOR_ADVERTISE 0x88
274 #define ICMP_V6_REDIRECT 0x89
275 #define ICMP_V6_LISTENER_REPORT_2 0x8F
277 //***********************************************************
278 // ICMPv6 code definitions for ICMP_V6_DEST_UNREACHABLE
279 //***********************************************************
280 #define ICMP_V6_NO_ROUTE_TO_DEST 0x0
281 #define ICMP_V6_COMM_PROHIBITED 0x1
282 #define ICMP_V6_BEYOND_SCOPE 0x2
283 #define ICMP_V6_ADDR_UNREACHABLE 0x3
284 #define ICMP_V6_PORT_UNREACHABLE 0x4
285 #define ICMP_V6_SOURCE_ADDR_FAILED 0x5
286 #define ICMP_V6_ROUTE_REJECTED 0x6
288 //***********************************************************
289 // ICMPv6 code definitions for ICMP_V6_TIME_EXCEEDED
290 //***********************************************************
291 #define ICMP_V6_TIMEOUT_HOP_LIMIT 0x0
292 #define ICMP_V6_TIMEOUT_REASSEMBLE 0x1
294 //***********************************************************
295 // ICMPv6 code definitions for ICMP_V6_PARAMETER_PROBLEM
296 //***********************************************************
297 #define ICMP_V6_ERRONEOUS_HEADER 0x0
298 #define ICMP_V6_UNRECOGNIZE_NEXT_HDR 0x1
299 #define ICMP_V6_UNRECOGNIZE_OPTION 0x2
303 UINT32 MaxPacketSize
;
304 EFI_IP6_CONFIG_DATA ConfigData
;
305 BOOLEAN IsConfigured
;
307 EFI_IP6_ADDRESS_INFO
*AddressList
;
309 EFI_IPv6_ADDRESS
*GroupTable
;
311 EFI_IP6_ROUTE_TABLE
*RouteTable
;
312 UINT32 NeighborCount
;
313 EFI_IP6_NEIGHBOR_CACHE
*NeighborCache
;
315 EFI_IP6_ADDRESS_INFO
*PrefixTable
;
316 UINT32 IcmpTypeCount
;
317 EFI_IP6_ICMP_TYPE
*IcmpTypeList
;
322 (EFIAPI
*EFI_IP6_GET_MODE_DATA
) (
323 IN
struct _EFI_IP6
*This
,
324 OUT EFI_IP6_MODE_DATA
*Ip6ModeData OPTIONAL
,
325 OUT EFI_MANAGED_NETWORK_CONFIG_DATA
*MnpConfigData OPTIONAL
,
326 OUT EFI_SIMPLE_NETWORK_MODE
*SnpModeData OPTIONAL
331 (EFIAPI
*EFI_IP6_CONFIGURE
) (
332 IN
struct _EFI_IP6
*This
,
333 IN EFI_IP6_CONFIG_DATA
*Ip6ConfigData OPTIONAL
337 (EFIAPI
*EFI_IP6_GROUPS
) (
338 IN
struct _EFI_IP6
*This
,
340 IN EFI_IPv6_ADDRESS
*GroupAddress OPTIONAL
345 (EFIAPI
*EFI_IP6_ROUTES
) (
346 IN
struct _EFI_IP6
*This
,
347 IN BOOLEAN DeleteRoute
,
348 IN EFI_IPv6_ADDRESS
*Destination OPTIONAL
,
349 IN UINT8 PrefixLength
,
350 IN EFI_IPv6_ADDRESS
*GatewayAddress OPTIONAL
355 (EFIAPI
*EFI_IP6_NEIGHBORS
) (
356 IN
struct _EFI_IP6
*This
,
357 IN BOOLEAN DeleteFlag
,
358 IN EFI_IPv6_ADDRESS
*TargetIp6Address
,
359 IN EFI_MAC_ADDRESS
*TargetLinkAddress OPTIONAL
,
364 typedef struct _EFI_IP6_FRAGMENT_DATA
{
365 UINT32 FragmentLength
;
366 VOID
*FragmentBuffer
;
367 } EFI_IP6_FRAGMENT_DATA
;
369 typedef struct _EFI_IP6_OVERRIDE_DATA
{
373 } EFI_IP6_OVERRIDE_DATA
;
375 typedef struct _EFI_IP6_TRANSMIT_DATA
{
376 EFI_IPv6_ADDRESS DestinationAddress
;
377 EFI_IP6_OVERRIDE_DATA
*OverrideData
;
378 UINT32 ExtHdrsLength
;
382 UINT32 FragmentCount
;
383 EFI_IP6_FRAGMENT_DATA FragmentTable
[1];
384 } EFI_IP6_TRANSMIT_DATA
;
387 typedef struct _EFI_IP6_HEADER
{
388 UINT8 TrafficClassH
:4;
391 UINT8 TrafficClassL
:4;
393 UINT16 PayloadLength
;
396 EFI_IPv6_ADDRESS SourceAddress
;
397 EFI_IPv6_ADDRESS DestinationAddress
;
401 typedef struct _EFI_IP6_RECEIVE_DATA
{
403 EFI_EVENT RecycleSignal
;
405 EFI_IP6_HEADER
*Header
;
407 UINT32 FragmentCount
;
408 EFI_IP6_FRAGMENT_DATA FragmentTable
[1];
409 } EFI_IP6_RECEIVE_DATA
;
415 EFI_IP6_RECEIVE_DATA
*RxData
;
416 EFI_IP6_TRANSMIT_DATA
*TxData
;
418 } EFI_IP6_COMPLETION_TOKEN
;
422 (EFIAPI
*EFI_IP6_TRANSMIT
) (
423 IN
struct _EFI_IP6
*This
,
424 IN EFI_IP6_COMPLETION_TOKEN
*Token
429 (EFIAPI
*EFI_IP6_RECEIVE
) (
430 IN
struct _EFI_IP6
*This
,
431 IN EFI_IP6_COMPLETION_TOKEN
*Token
436 (EFIAPI
*EFI_IP6_CANCEL
)(
437 IN
struct _EFI_IP6
*This
,
438 IN EFI_IP6_COMPLETION_TOKEN
*Token OPTIONAL
443 (EFIAPI
*EFI_IP6_POLL
) (
444 IN
struct _EFI_IP6
*This
447 typedef struct _EFI_IP6
{
448 EFI_IP6_GET_MODE_DATA GetModeData
;
449 EFI_IP6_CONFIGURE Configure
;
450 EFI_IP6_GROUPS Groups
;
451 EFI_IP6_ROUTES Routes
;
452 EFI_IP6_NEIGHBORS Neighbors
;
453 EFI_IP6_TRANSMIT Transmit
;
454 EFI_IP6_RECEIVE Receive
;
455 EFI_IP6_CANCEL Cancel
;
459 #endif /* _EFI_IP_H */