This library is only intended to be used by UEFI network stack modules.\r
It provides basic functions for the UEFI network stack.\r
\r
-Copyright (c) 2005 - 2010, Intel Corporation.<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at<BR>\r
http://opensource.org/licenses/bsd-license.php\r
#include <Protocol/Ip6.h>\r
\r
#include <Library/BaseLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
\r
typedef UINT32 IP4_ADDR;\r
typedef UINT32 TCP_SEQNO;\r
\r
#define IP6_HOP_BY_HOP 0\r
#define IP6_DESTINATION 60\r
+#define IP6_ROUTING 43\r
#define IP6_FRAGMENT 44\r
#define IP6_AH 51\r
#define IP6_ESP 50\r
\r
**/\r
CHAR8 *\r
+EFIAPI\r
NetDebugASPrint (\r
IN CHAR8 *Format,\r
...\r
than the mNetDebugLevelMax. Or, it has been sent out.\r
**/\r
EFI_STATUS\r
+EFIAPI\r
NetDebugOutput (\r
IN UINT32 Level,\r
IN UINT8 *Module,\r
\r
**/\r
BOOLEAN\r
+EFIAPI\r
NetIp6IsValidUnicast (\r
IN EFI_IPv6_ADDRESS *Ip6\r
);\r
\r
**/\r
BOOLEAN\r
+EFIAPI\r
NetIp6IsUnspecifiedAddr (\r
IN EFI_IPv6_ADDRESS *Ip6\r
);\r
\r
**/\r
BOOLEAN\r
+EFIAPI\r
NetIp6IsLinkLocalAddr (\r
IN EFI_IPv6_ADDRESS *Ip6\r
);\r
\r
**/\r
BOOLEAN\r
+EFIAPI\r
NetIp6IsNetEqual (\r
EFI_IPv6_ADDRESS *Ip1,\r
EFI_IPv6_ADDRESS *Ip2,\r
\r
**/\r
EFI_IPv6_ADDRESS *\r
+EFIAPI\r
Ip6Swap128 (\r
EFI_IPv6_ADDRESS *Ip6\r
);\r
\r
typedef\r
EFI_STATUS\r
-(*NET_MAP_CALLBACK) (\r
+(EFIAPI *NET_MAP_CALLBACK) (\r
IN NET_MAP *Map,\r
IN NET_MAP_ITEM *Item,\r
IN VOID *Arg\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
NetLibAsciiStrToIp4 (\r
IN CONST CHAR8 *String,\r
OUT EFI_IPv4_ADDRESS *Ip4Address\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
NetLibAsciiStrToIp6 (\r
IN CONST CHAR8 *String,\r
OUT EFI_IPv6_ADDRESS *Ip6Address\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
NetLibStrToIp4 (\r
IN CONST CHAR16 *String,\r
OUT EFI_IPv4_ADDRESS *Ip4Address\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
NetLibStrToIp6 (\r
IN CONST CHAR16 *String,\r
OUT EFI_IPv6_ADDRESS *Ip6Address\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
NetLibStrToIp6andPrefix (\r
IN CONST CHAR16 *String,\r
OUT EFI_IPv6_ADDRESS *Ip6Address,\r
UINT8 *Bulk; // The block's Data\r
} NET_BLOCK;\r
\r
-typedef VOID (*NET_VECTOR_EXT_FREE) (VOID *Arg);\r
+typedef VOID (EFIAPI *NET_VECTOR_EXT_FREE) (VOID *Arg);\r
\r
//\r
//NET_VECTOR contains several blocks to hold all packet's\r
\r
**/\r
UINT16\r
+EFIAPI\r
NetIp6PseudoHeadChecksum (\r
IN EFI_IPv6_ADDRESS *Src,\r
IN EFI_IPv6_ADDRESS *Dst,\r
IN UINT8 NextHeader,\r
IN UINT32 Len\r
);\r
+\r
+/**\r
+ The function frees the net buffer which allocated by the IP protocol. It releases \r
+ only the net buffer and doesn't call the external free function. \r
+\r
+ This function should be called after finishing the process of mIpSec->ProcessExt() \r
+ for outbound traffic. The (EFI_IPSEC2_PROTOCOL)->ProcessExt() allocates a new \r
+ buffer for the ESP, so there needs a function to free the old net buffer.\r
+\r
+ @param[in] Nbuf The network buffer to be freed.\r
+\r
+**/\r
+VOID\r
+NetIpSecNetbufFree (\r
+ NET_BUF *Nbuf\r
+ );\r
#endif\r