\r
#include <Protocol/ManagedNetwork.h>\r
\r
-\r
#define EFI_IP6_SERVICE_BINDING_PROTOCOL_GUID \\r
{ \\r
0xec835dd3, 0xfe0f, 0x617b, {0xa6, 0x21, 0xb3, 0x50, 0xc3, 0xe1, 0x33, 0x88 } \\r
/// EFI_IP6_ADDRESS_PAIR is deprecated in the UEFI 2.4B and should not be used any more.\r
/// The definition in here is only present to provide backwards compatability.\r
///\r
-typedef struct{\r
+typedef struct {\r
///\r
/// The EFI IPv6 Protocol instance handle that is using this address/prefix pair.\r
///\r
/// ICMPv6 type definitions for error messages\r
///\r
///@{\r
-#define ICMP_V6_DEST_UNREACHABLE 0x1\r
-#define ICMP_V6_PACKET_TOO_BIG 0x2\r
-#define ICMP_V6_TIME_EXCEEDED 0x3\r
-#define ICMP_V6_PARAMETER_PROBLEM 0x4\r
+#define ICMP_V6_DEST_UNREACHABLE 0x1\r
+#define ICMP_V6_PACKET_TOO_BIG 0x2\r
+#define ICMP_V6_TIME_EXCEEDED 0x3\r
+#define ICMP_V6_PARAMETER_PROBLEM 0x4\r
///@}\r
\r
///\r
/// ICMPv6 type definition for informational messages\r
///\r
///@{\r
-#define ICMP_V6_ECHO_REQUEST 0x80\r
-#define ICMP_V6_ECHO_REPLY 0x81\r
-#define ICMP_V6_LISTENER_QUERY 0x82\r
-#define ICMP_V6_LISTENER_REPORT 0x83\r
-#define ICMP_V6_LISTENER_DONE 0x84\r
-#define ICMP_V6_ROUTER_SOLICIT 0x85\r
-#define ICMP_V6_ROUTER_ADVERTISE 0x86\r
-#define ICMP_V6_NEIGHBOR_SOLICIT 0x87\r
-#define ICMP_V6_NEIGHBOR_ADVERTISE 0x88\r
-#define ICMP_V6_REDIRECT 0x89\r
-#define ICMP_V6_LISTENER_REPORT_2 0x8F\r
+#define ICMP_V6_ECHO_REQUEST 0x80\r
+#define ICMP_V6_ECHO_REPLY 0x81\r
+#define ICMP_V6_LISTENER_QUERY 0x82\r
+#define ICMP_V6_LISTENER_REPORT 0x83\r
+#define ICMP_V6_LISTENER_DONE 0x84\r
+#define ICMP_V6_ROUTER_SOLICIT 0x85\r
+#define ICMP_V6_ROUTER_ADVERTISE 0x86\r
+#define ICMP_V6_NEIGHBOR_SOLICIT 0x87\r
+#define ICMP_V6_NEIGHBOR_ADVERTISE 0x88\r
+#define ICMP_V6_REDIRECT 0x89\r
+#define ICMP_V6_LISTENER_REPORT_2 0x8F\r
///@}\r
\r
///\r
/// ICMPv6 code definitions for ICMP_V6_DEST_UNREACHABLE\r
///\r
///@{\r
-#define ICMP_V6_NO_ROUTE_TO_DEST 0x0\r
-#define ICMP_V6_COMM_PROHIBITED 0x1\r
-#define ICMP_V6_BEYOND_SCOPE 0x2\r
-#define ICMP_V6_ADDR_UNREACHABLE 0x3\r
-#define ICMP_V6_PORT_UNREACHABLE 0x4\r
-#define ICMP_V6_SOURCE_ADDR_FAILED 0x5\r
-#define ICMP_V6_ROUTE_REJECTED 0x6\r
+#define ICMP_V6_NO_ROUTE_TO_DEST 0x0\r
+#define ICMP_V6_COMM_PROHIBITED 0x1\r
+#define ICMP_V6_BEYOND_SCOPE 0x2\r
+#define ICMP_V6_ADDR_UNREACHABLE 0x3\r
+#define ICMP_V6_PORT_UNREACHABLE 0x4\r
+#define ICMP_V6_SOURCE_ADDR_FAILED 0x5\r
+#define ICMP_V6_ROUTE_REJECTED 0x6\r
///@}\r
\r
///\r
/// ICMPv6 code definitions for ICMP_V6_TIME_EXCEEDED\r
///\r
///@{\r
-#define ICMP_V6_TIMEOUT_HOP_LIMIT 0x0\r
-#define ICMP_V6_TIMEOUT_REASSEMBLE 0x1\r
+#define ICMP_V6_TIMEOUT_HOP_LIMIT 0x0\r
+#define ICMP_V6_TIMEOUT_REASSEMBLE 0x1\r
///@}\r
\r
///\r
/// ICMPv6 code definitions for ICMP_V6_PARAMETER_PROBLEM\r
///\r
///@{\r
-#define ICMP_V6_ERRONEOUS_HEADER 0x0\r
-#define ICMP_V6_UNRECOGNIZE_NEXT_HDR 0x1\r
-#define ICMP_V6_UNRECOGNIZE_OPTION 0x2\r
+#define ICMP_V6_ERRONEOUS_HEADER 0x0\r
+#define ICMP_V6_UNRECOGNIZE_NEXT_HDR 0x1\r
+#define ICMP_V6_UNRECOGNIZE_OPTION 0x2\r
///@}\r
\r
///\r
/// the IPv6 header if there are no extension headers. Ignored when\r
/// AcceptPromiscuous is TRUE.\r
///\r
- UINT8 DefaultProtocol;\r
+ UINT8 DefaultProtocol;\r
///\r
/// Set to TRUE to receive all IPv6 packets that get through the\r
/// receive filters.\r
/// packets that get through the receive filters. Ignored when\r
/// AcceptPromiscuous is TRUE.\r
///\r
- BOOLEAN AcceptAnyProtocol;\r
+ BOOLEAN AcceptAnyProtocol;\r
///\r
/// Set to TRUE to receive ICMP error report packets. Ignored when\r
/// AcceptPromiscuous or AcceptAnyProtocol is TRUE.\r
///\r
- BOOLEAN AcceptIcmpErrors;\r
+ BOOLEAN AcceptIcmpErrors;\r
///\r
/// Set to TRUE to receive all IPv6 packets that are sent to any\r
/// hardware address or any protocol address. Set to FALSE to stop\r
/// receiving all promiscuous IPv6 packets.\r
///\r
- BOOLEAN AcceptPromiscuous;\r
+ BOOLEAN AcceptPromiscuous;\r
///\r
/// The destination address of the packets that will be transmitted.\r
/// Ignored if it is unspecified.\r
///\r
- EFI_IPv6_ADDRESS DestinationAddress;\r
+ EFI_IPv6_ADDRESS DestinationAddress;\r
///\r
/// The station IPv6 address that will be assigned to this EFI IPv6\r
/// Protocol instance. This field can be set and changed only when\r
/// only be successfully bound to this EFI IPv6 protocol instance\r
/// after IP6ModeData.IsConfigured changed to TRUE.\r
///\r
- EFI_IPv6_ADDRESS StationAddress;\r
+ EFI_IPv6_ADDRESS StationAddress;\r
///\r
/// TrafficClass field in transmitted IPv6 packets. Default value\r
/// is zero.\r
///\r
- UINT8 TrafficClass;\r
+ UINT8 TrafficClass;\r
///\r
/// HopLimit field in transmitted IPv6 packets.\r
///\r
- UINT8 HopLimit;\r
+ UINT8 HopLimit;\r
///\r
/// FlowLabel field in transmitted IPv6 packets. Default value is\r
/// zero.\r
///\r
- UINT32 FlowLabel;\r
+ UINT32 FlowLabel;\r
///\r
/// The timer timeout value (number of microseconds) for the\r
/// receive timeout event to be associated with each assembled\r
/// packet. Zero means do not drop assembled packets.\r
///\r
- UINT32 ReceiveTimeout;\r
+ UINT32 ReceiveTimeout;\r
///\r
/// The timer timeout value (number of microseconds) for the\r
/// transmit timeout event to be associated with each outgoing\r
/// packet. Zero means do not drop outgoing packets.\r
///\r
- UINT32 TransmitTimeout;\r
+ UINT32 TransmitTimeout;\r
} EFI_IP6_CONFIG_DATA;\r
\r
///\r
/// EFI_IP6_ADDRESS_INFO\r
///\r
typedef struct {\r
- EFI_IPv6_ADDRESS Address; ///< The IPv6 address.\r
- UINT8 PrefixLength; ///< The length of the prefix associated with the Address.\r
+ EFI_IPv6_ADDRESS Address; ///< The IPv6 address.\r
+ UINT8 PrefixLength; ///< The length of the prefix associated with the Address.\r
} EFI_IP6_ADDRESS_INFO;\r
\r
///\r
/// packets to this prefix. If the IPv6 address is all zeros, then the\r
/// prefix is on-link.\r
///\r
- EFI_IPv6_ADDRESS Gateway;\r
+ EFI_IPv6_ADDRESS Gateway;\r
///\r
/// The destination prefix to be routed.\r
///\r
- EFI_IPv6_ADDRESS Destination;\r
+ EFI_IPv6_ADDRESS Destination;\r
///\r
/// The length of the prefix associated with the Destination.\r
///\r
- UINT8 PrefixLength;\r
+ UINT8 PrefixLength;\r
} EFI_IP6_ROUTE_TABLE;\r
\r
///\r
///\r
EfiNeighborReachable,\r
///\r
- ///Reachable Time has elapsed since the last positive confirmation\r
- ///was received. In this state, the forward path to the neighbor was\r
- ///functioning properly.\r
+ /// Reachable Time has elapsed since the last positive confirmation\r
+ /// was received. In this state, the forward path to the neighbor was\r
+ /// functioning properly.\r
///\r
EfiNeighborStale,\r
///\r
/// of entries about individual neighbors to which traffic has been sent recently.\r
///\r
typedef struct {\r
- EFI_IPv6_ADDRESS Neighbor; ///< The on-link unicast/anycast IP address of the neighbor.\r
- EFI_MAC_ADDRESS LinkAddress; ///< Link-layer address of the neighbor.\r
- EFI_IP6_NEIGHBOR_STATE State; ///< State of this neighbor cache entry.\r
+ EFI_IPv6_ADDRESS Neighbor; ///< The on-link unicast/anycast IP address of the neighbor.\r
+ EFI_MAC_ADDRESS LinkAddress; ///< Link-layer address of the neighbor.\r
+ EFI_IP6_NEIGHBOR_STATE State; ///< State of this neighbor cache entry.\r
} EFI_IP6_NEIGHBOR_CACHE;\r
\r
///\r
/// IPv6 Protocol driver.\r
///\r
typedef struct {\r
- UINT8 Type; ///< The type of ICMP message.\r
- UINT8 Code; ///< The code of the ICMP message.\r
+ UINT8 Type; ///< The type of ICMP message.\r
+ UINT8 Code; ///< The code of the ICMP message.\r
} EFI_IP6_ICMP_TYPE;\r
\r
///\r
/// All other fields in this structure are undefined until this field is TRUE.\r
/// Set to FALSE when the EFI IPv6 Protocol instance is stopped.\r
///\r
- BOOLEAN IsStarted;\r
+ BOOLEAN IsStarted;\r
///\r
/// The maximum packet size, in bytes, of the packet which the upper layer driver could feed.\r
///\r
- UINT32 MaxPacketSize;\r
+ UINT32 MaxPacketSize;\r
///\r
/// Current configuration settings. Undefined until IsStarted is TRUE.\r
///\r
- EFI_IP6_CONFIG_DATA ConfigData;\r
+ EFI_IP6_CONFIG_DATA ConfigData;\r
///\r
/// Set to TRUE when the EFI IPv6 Protocol instance is configured.\r
/// The instance is configured when it has a station address and\r
/// corresponding prefix length.\r
/// Set to FALSE when the EFI IPv6 Protocol instance is not configured.\r
///\r
- BOOLEAN IsConfigured;\r
+ BOOLEAN IsConfigured;\r
///\r
/// Number of configured IPv6 addresses on this interface.\r
///\r
- UINT32 AddressCount;\r
+ UINT32 AddressCount;\r
///\r
/// List of currently configured IPv6 addresses and corresponding\r
/// prefix lengths assigned to this interface. It is caller's\r
/// responsibility to free this buffer.\r
///\r
- EFI_IP6_ADDRESS_INFO *AddressList;\r
+ EFI_IP6_ADDRESS_INFO *AddressList;\r
///\r
/// Number of joined multicast groups. Undefined until\r
/// IsConfigured is TRUE.\r
///\r
- UINT32 GroupCount;\r
+ UINT32 GroupCount;\r
///\r
/// List of joined multicast group addresses. It is caller's\r
/// responsibility to free this buffer. Undefined until\r
/// IsConfigured is TRUE.\r
///\r
- EFI_IPv6_ADDRESS *GroupTable;\r
+ EFI_IPv6_ADDRESS *GroupTable;\r
///\r
/// Number of entries in the routing table. Undefined until\r
/// IsConfigured is TRUE.\r
///\r
- UINT32 RouteCount;\r
+ UINT32 RouteCount;\r
///\r
/// Routing table entries. It is caller's responsibility to free this buffer.\r
///\r
- EFI_IP6_ROUTE_TABLE *RouteTable;\r
+ EFI_IP6_ROUTE_TABLE *RouteTable;\r
///\r
/// Number of entries in the neighbor cache. Undefined until\r
/// IsConfigured is TRUE.\r
///\r
- UINT32 NeighborCount;\r
+ UINT32 NeighborCount;\r
///\r
/// Neighbor cache entries. It is caller's responsibility to free this\r
/// buffer. Undefined until IsConfigured is TRUE.\r
///\r
- EFI_IP6_NEIGHBOR_CACHE *NeighborCache;\r
+ EFI_IP6_NEIGHBOR_CACHE *NeighborCache;\r
///\r
/// Number of entries in the prefix table. Undefined until\r
/// IsConfigured is TRUE.\r
///\r
- UINT32 PrefixCount;\r
+ UINT32 PrefixCount;\r
///\r
/// On-link Prefix table entries. It is caller's responsibility to free this\r
/// buffer. Undefined until IsConfigured is TRUE.\r
///\r
- EFI_IP6_ADDRESS_INFO *PrefixTable;\r
+ EFI_IP6_ADDRESS_INFO *PrefixTable;\r
///\r
/// Number of entries in the supported ICMP types list.\r
///\r
- UINT32 IcmpTypeCount;\r
+ UINT32 IcmpTypeCount;\r
///\r
/// Array of ICMP types and codes that are supported by this EFI\r
/// IPv6 Protocol driver. It is caller's responsibility to free this\r
/// buffer.\r
///\r
- EFI_IP6_ICMP_TYPE *IcmpTypeList;\r
+ EFI_IP6_ICMP_TYPE *IcmpTypeList;\r
} EFI_IP6_MODE_DATA;\r
\r
///\r
///\r
#pragma pack(1)\r
typedef struct _EFI_IP6_HEADER {\r
- UINT8 TrafficClassH:4;\r
- UINT8 Version:4;\r
- UINT8 FlowLabelH:4;\r
- UINT8 TrafficClassL:4;\r
- UINT16 FlowLabelL;\r
- UINT16 PayloadLength;\r
- UINT8 NextHeader;\r
- UINT8 HopLimit;\r
- EFI_IPv6_ADDRESS SourceAddress;\r
- EFI_IPv6_ADDRESS DestinationAddress;\r
+ UINT8 TrafficClassH : 4;\r
+ UINT8 Version : 4;\r
+ UINT8 FlowLabelH : 4;\r
+ UINT8 TrafficClassL : 4;\r
+ UINT16 FlowLabelL;\r
+ UINT16 PayloadLength;\r
+ UINT8 NextHeader;\r
+ UINT8 HopLimit;\r
+ EFI_IPv6_ADDRESS SourceAddress;\r
+ EFI_IPv6_ADDRESS DestinationAddress;\r
} EFI_IP6_HEADER;\r
#pragma pack()\r
\r
/// fragment to transmit or that has been received.\r
///\r
typedef struct _EFI_IP6_FRAGMENT_DATA {\r
- UINT32 FragmentLength; ///< Length of fragment data. This field may not be set to zero.\r
- VOID *FragmentBuffer; ///< Pointer to fragment data. This field may not be set to NULL.\r
+ UINT32 FragmentLength; ///< Length of fragment data. This field may not be set to zero.\r
+ VOID *FragmentBuffer; ///< Pointer to fragment data. This field may not be set to NULL.\r
} EFI_IP6_FRAGMENT_DATA;\r
\r
///\r
/// Time when the EFI IPv6 Protocol driver accepted the packet.\r
/// Ignored if it is zero.\r
///\r
- EFI_TIME TimeStamp;\r
+ EFI_TIME TimeStamp;\r
///\r
/// After this event is signaled, the receive data structure is released\r
/// and must not be referenced.\r
///\r
- EFI_EVENT RecycleSignal;\r
+ EFI_EVENT RecycleSignal;\r
///\r
- ///Length of the IPv6 packet headers, including both the IPv6\r
- ///header and any extension headers.\r
+ /// Length of the IPv6 packet headers, including both the IPv6\r
+ /// header and any extension headers.\r
///\r
- UINT32 HeaderLength;\r
+ UINT32 HeaderLength;\r
///\r
/// Pointer to the IPv6 packet header. If the IPv6 packet was\r
/// fragmented, this argument is a pointer to the header in the first\r
/// fragment.\r
///\r
- EFI_IP6_HEADER *Header;\r
+ EFI_IP6_HEADER *Header;\r
///\r
/// Sum of the lengths of IPv6 packet buffers in FragmentTable. May\r
/// be zero.\r
///\r
- UINT32 DataLength;\r
+ UINT32 DataLength;\r
///\r
/// Number of IPv6 payload fragments. May be zero.\r
///\r
- UINT32 FragmentCount;\r
+ UINT32 FragmentCount;\r
///\r
/// Array of payload fragment lengths and buffer pointers.\r
///\r
- EFI_IP6_FRAGMENT_DATA FragmentTable[1];\r
+ EFI_IP6_FRAGMENT_DATA FragmentTable[1];\r
} EFI_IP6_RECEIVE_DATA;\r
\r
///\r
/// default parameters or settings for one Transmit() function call.\r
///\r
typedef struct _EFI_IP6_OVERRIDE_DATA {\r
- UINT8 Protocol; ///< Protocol type override.\r
- UINT8 HopLimit; ///< Hop-Limit override.\r
- UINT32 FlowLabel; ///< Flow-Label override.\r
+ UINT8 Protocol; ///< Protocol type override.\r
+ UINT8 HopLimit; ///< Hop-Limit override.\r
+ UINT32 FlowLabel; ///< Flow-Label override.\r
} EFI_IP6_OVERRIDE_DATA;\r
\r
///\r
/// The destination IPv6 address. If it is unspecified,\r
/// ConfigData.DestinationAddress will be used instead.\r
///\r
- EFI_IPv6_ADDRESS DestinationAddress;\r
+ EFI_IPv6_ADDRESS DestinationAddress;\r
///\r
/// If not NULL, the IPv6 transmission control override data.\r
///\r
- EFI_IP6_OVERRIDE_DATA *OverrideData;\r
+ EFI_IP6_OVERRIDE_DATA *OverrideData;\r
///\r
/// Total length in byte of the IPv6 extension headers specified in\r
/// ExtHdrs.\r
///\r
- UINT32 ExtHdrsLength;\r
+ UINT32 ExtHdrsLength;\r
///\r
/// Pointer to the IPv6 extension headers. The IP layer will append\r
/// the required extension headers if they are not specified by\r
/// ExtHdrs. Ignored if ExtHdrsLength is zero.\r
///\r
- VOID *ExtHdrs;\r
+ VOID *ExtHdrs;\r
///\r
/// The protocol of first extension header in ExtHdrs. Ignored if\r
/// ExtHdrsLength is zero.\r
///\r
- UINT8 NextHeader;\r
+ UINT8 NextHeader;\r
///\r
/// Total length in bytes of the FragmentTable data to transmit.\r
///\r
- UINT32 DataLength;\r
+ UINT32 DataLength;\r
///\r
/// Number of entries in the fragment data table.\r
///\r
- UINT32 FragmentCount;\r
+ UINT32 FragmentCount;\r
///\r
/// Start of the fragment data table.\r
///\r
- EFI_IP6_FRAGMENT_DATA FragmentTable[1];\r
+ EFI_IP6_FRAGMENT_DATA FragmentTable[1];\r
} EFI_IP6_TRANSMIT_DATA;\r
\r
///\r
/// This Event will be signaled after the Status field is updated by\r
/// the EFI IPv6 Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r
///\r
- EFI_EVENT Event;\r
+ EFI_EVENT Event;\r
///\r
/// Will be set to one of the following values:\r
/// - EFI_SUCCESS: The receive or transmit completed\r
/// failed because of an IPsec policy check.\r
/// - EFI_NO_MEDIA: There was a media error.\r
///\r
- EFI_STATUS Status;\r
+ EFI_STATUS Status;\r
union {\r
///\r
/// When the Token is used for receiving, RxData is a pointer to the EFI_IP6_RECEIVE_DATA.\r
///\r
- EFI_IP6_RECEIVE_DATA *RxData;\r
+ EFI_IP6_RECEIVE_DATA *RxData;\r
///\r
/// When the Token is used for transmitting, TxData is a pointer to the EFI_IP6_TRANSMIT_DATA.\r
///\r
- EFI_IP6_TRANSMIT_DATA *TxData;\r
+ EFI_IP6_TRANSMIT_DATA *TxData;\r
} Packet;\r
} EFI_IP6_COMPLETION_TOKEN;\r
\r
/// used by drivers, daemons, and applications to transmit and receive network packets.\r
///\r
struct _EFI_IP6_PROTOCOL {\r
- EFI_IP6_GET_MODE_DATA GetModeData;\r
- EFI_IP6_CONFIGURE Configure;\r
- EFI_IP6_GROUPS Groups;\r
- EFI_IP6_ROUTES Routes;\r
- EFI_IP6_NEIGHBORS Neighbors;\r
- EFI_IP6_TRANSMIT Transmit;\r
- EFI_IP6_RECEIVE Receive;\r
- EFI_IP6_CANCEL Cancel;\r
- EFI_IP6_POLL Poll;\r
+ EFI_IP6_GET_MODE_DATA GetModeData;\r
+ EFI_IP6_CONFIGURE Configure;\r
+ EFI_IP6_GROUPS Groups;\r
+ EFI_IP6_ROUTES Routes;\r
+ EFI_IP6_NEIGHBORS Neighbors;\r
+ EFI_IP6_TRANSMIT Transmit;\r
+ EFI_IP6_RECEIVE Receive;\r
+ EFI_IP6_CANCEL Cancel;\r
+ EFI_IP6_POLL Poll;\r
};\r
\r
-extern EFI_GUID gEfiIp6ServiceBindingProtocolGuid;\r
-extern EFI_GUID gEfiIp6ProtocolGuid;\r
+extern EFI_GUID gEfiIp6ServiceBindingProtocolGuid;\r
+extern EFI_GUID gEfiIp6ProtocolGuid;\r
\r
#endif\r