]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/NetLib.h
Fixed GCC 4.4 build issues due to EFIAPI not being used when required.
[mirror_edk2.git] / MdeModulePkg / Include / Library / NetLib.h
index a011bf7acb49211371a0db7547bbc0b7c4b956b9..7f8cb15b0a06b6811054599e7873b13d49cc3ce2 100644 (file)
@@ -286,6 +286,7 @@ typedef struct {
 \r
 **/\r
 CHAR8 *\r
+EFIAPI\r
 NetDebugASPrint (\r
   IN CHAR8                  *Format,\r
   ...\r
@@ -309,6 +310,7 @@ NetDebugASPrint (
                                 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
@@ -400,6 +402,7 @@ NetIp4IsUnicast (
 \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 NetIp6IsValidUnicast (\r
   IN EFI_IPv6_ADDRESS       *Ip6\r
   );\r
@@ -415,6 +418,7 @@ NetIp6IsValidUnicast (
 \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 NetIp6IsUnspecifiedAddr (\r
   IN EFI_IPv6_ADDRESS       *Ip6\r
   );\r
@@ -429,6 +433,7 @@ NetIp6IsUnspecifiedAddr (
 \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 NetIp6IsLinkLocalAddr (\r
   IN EFI_IPv6_ADDRESS *Ip6\r
   );\r
@@ -445,6 +450,7 @@ NetIp6IsLinkLocalAddr (
 \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 NetIp6IsNetEqual (\r
   EFI_IPv6_ADDRESS *Ip1,\r
   EFI_IPv6_ADDRESS *Ip2,\r
@@ -464,6 +470,7 @@ NetIp6IsNetEqual (
 \r
 **/\r
 EFI_IPv6_ADDRESS *\r
+EFIAPI\r
 Ip6Swap128 (\r
   EFI_IPv6_ADDRESS *Ip6\r
   );\r
@@ -507,7 +514,7 @@ NetGetUint32 (
   byte stream.\r
 \r
   @param[in, out]  Buf          The buffer in which to put the UINT32.\r
-  @param[in]      Data          The data to put.\r
+  @param[in]       Data         The data to be converted and put into the byte stream.\r
 \r
 **/\r
 VOID\r
@@ -888,7 +895,7 @@ NetMapRemoveTail (
 \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
@@ -1097,17 +1104,18 @@ NetLibGetMacString (
 \r
   The underlying UNDI driver may or may not support reporting media status from\r
   GET_STATUS command (PXE_STATFLAGS_GET_STATUS_NO_MEDIA_SUPPORTED). This routine\r
-  will try to invoke Snp->GetStatus() to get the media status. Iif media is already\r
-  present, it returns directly. If media  isnot present, it will stop SNP and then\r
-  restart SNP to get the latest media status.  This provides an opportunity to get \r
+  will try to invoke Snp->GetStatus() to get the media status. If media is already\r
+  present, it returns directly. If media is not present, it will stop SNP and then\r
+  restart SNP to get the latest media status. This provides an opportunity to get \r
   the correct media status for old UNDI driver, which doesn't support reporting \r
   media status from GET_STATUS command.\r
   Note: there are two limitations for the current algorithm:\r
   1) For UNDI with this capability, when the cable is not attached, there will\r
      be an redundant Stop/Start() process.\r
-  2) For UNDI without this capability, when the cable is attached, the UNDI\r
-     initializes while unattached. Later, NetLibDetectMedia() will report\r
-     MediaPresent as TRUE, causing upper layer apps to wait for timeout time.\r
+  2) for UNDI without this capability, in case that network cable is attached when\r
+     Snp->Initialize() is invoked while network cable is unattached later,\r
+     NetLibDetectMedia() will report MediaPresent as TRUE, causing upper layer\r
+     apps to wait for timeout time.\r
 \r
   @param[in]   ServiceHandle    The handle where network service binding protocols are\r
                                 installed.\r
@@ -1240,6 +1248,7 @@ NetLibDefaultUnload (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetLibAsciiStrToIp4 (\r
   IN CONST CHAR8                 *String,\r
   OUT      EFI_IPv4_ADDRESS      *Ip4Address\r
@@ -1257,6 +1266,7 @@ NetLibAsciiStrToIp4 (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetLibAsciiStrToIp6 (\r
   IN CONST CHAR8                 *String,\r
   OUT      EFI_IPv6_ADDRESS      *Ip6Address\r
@@ -1274,6 +1284,7 @@ NetLibAsciiStrToIp6 (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetLibStrToIp4 (\r
   IN CONST CHAR16                *String,\r
   OUT      EFI_IPv4_ADDRESS      *Ip4Address\r
@@ -1292,6 +1303,7 @@ NetLibStrToIp4 (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetLibStrToIp6 (\r
   IN CONST CHAR16                *String,\r
   OUT      EFI_IPv6_ADDRESS      *Ip6Address\r
@@ -1312,6 +1324,7 @@ NetLibStrToIp6 (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetLibStrToIp6andPrefix (\r
   IN CONST CHAR16                *String,\r
   OUT      EFI_IPv6_ADDRESS      *Ip6Address,\r
@@ -1342,7 +1355,7 @@ typedef struct {
   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
@@ -1868,8 +1881,8 @@ NetbufQueCopy (
   );\r
 \r
 /**\r
-  Trim Len bytes of data from the queue header and release any net buffer\r
-  that is trimmed wholely.\r
+  Trim Len bytes of data from the buffer queue and free any net buffer\r
+  that is completely trimmed.\r
 \r
   The trimming operation is the same as NetbufTrim but applies to the net buffer\r
   queue instead of the net buffer.\r
@@ -1982,6 +1995,7 @@ NetPseudoHeadChecksum (
 \r
 **/\r
 UINT16\r
+EFIAPI\r
 NetIp6PseudoHeadChecksum (\r
   IN EFI_IPv6_ADDRESS       *Src,\r
   IN EFI_IPv6_ADDRESS       *Dst,\r