]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h
Scrubbed some files for IP4
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4If.h
index e80751640858dcee1f5e2c3e452ebce24f679e8e..ec07117eeb5adc763782ca5081b2dc5806227f47 100644 (file)
@@ -24,36 +24,44 @@ Abstract:
 #ifndef __EFI_IP4_IF_H__\r
 #define __EFI_IP4_IF_H__\r
 \r
-enum {\r
+typedef enum {\r
   IP4_FRAME_RX_SIGNATURE  = EFI_SIGNATURE_32 ('I', 'P', 'F', 'R'),\r
   IP4_FRAME_TX_SIGNATURE  = EFI_SIGNATURE_32 ('I', 'P', 'F', 'T'),\r
   IP4_FRAME_ARP_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', 'F', 'A'),\r
   IP4_INTERFACE_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', 'I', 'F')\r
-};\r
-\r
-//\r
-// This prototype is used by both receive and transmission.\r
-// When receiving Netbuf is allocated by IP4_INTERFACE, and\r
-// released by IP4. Flag shows whether the frame is received\r
-// as link broadcast/multicast...\r
-//\r
-// When transmitting, the Netbuf is from IP4, and provided\r
-// to the callback as a reference. Flag isn't used.\r
-//\r
-// IpInstance can be NULL which means that it is the IP4 driver\r
-// itself sending the packets. IP4 driver may send packets that\r
-// don't belong to any instance, such as ICMP errors, ICMP echo\r
-// responses, or IGMP packets. IpInstance is used as a tag in\r
-// this module.\r
-//\r
+} IP4_IF_ENUM_TYPES;\r
+\r
+/**\r
+  This prototype is used by both receive and transmission.\r
+  When receiving Netbuf is allocated by IP4_INTERFACE, and\r
+  released by IP4. Flag shows whether the frame is received\r
+  as link broadcast/multicast...\r
+\r
+  When transmitting, the Netbuf is from IP4, and provided\r
+  to the callback as a reference. Flag isn't used.\r
+\r
+  @param IpInstance The instance that sent or received the packet.\r
+                    IpInstance can be NULL which means that it is the IP4 driver\r
+                    itself sending the packets. IP4 driver may send packets that\r
+                    don't belong to any instance, such as ICMP errors, ICMP echo\r
+                    responses, or IGMP packets. IpInstance is used as a tag in\r
+                    this module.\r
+  @param Packet     The sent or received packet.\r
+  @param IoStatus   Status of sending or receiving.\r
+  @param LinkFlag   Indicate if the frame is received as link broadcast/multicast.\r
+                    When transmitting, it is not used.\r
+  @param Context    Additional data for callback.\r
+\r
+  @return None.\r
+**/\r
 typedef\r
 VOID\r
-(*IP4_FRAME_CALLBACK) (\r
-  IP4_PROTOCOL              *IpInstance,       OPTIONAL\r
-  NET_BUF                   *Packet,\r
-  EFI_STATUS                IoStatus,\r
-  UINT32                    LinkFlag,\r
-  VOID                      *Context\r
+(*IP4_FRAME_CALLBACK)(\r
+  IN IP4_PROTOCOL              *IpInstance,       OPTIONAL\r
+  IN NET_BUF                   *Packet,\r
+  IN EFI_STATUS                IoStatus,\r
+  IN UINT32                    LinkFlag,\r
+  IN VOID                      *Context\r
   );\r
 \r
 //\r
@@ -116,13 +124,19 @@ typedef struct {
   EFI_MAC_ADDRESS         Mac;\r
 } IP4_ARP_QUE;\r
 \r
-//\r
-// Callback to select which frame to cancel. Caller can cancel a\r
-// single frame, or all the frame from an IP instance.\r
-//\r
+/**\r
+  Callback to select which frame to cancel. Caller can cancel a\r
+  single frame, or all the frame from an IP instance.\r
+\r
+  @param Frame      The sending frame to check for cancellation.\r
+  @param Context    Additional data for callback.\r
+\r
+  @retval TRUE      The sending of the frame should be cancelled.\r
+  @retval FALSE     Do not cancel the frame sending.\r
+**/\r
 typedef\r
 BOOLEAN\r
-(*IP4_FRAME_TO_CANCEL) (\r
+(*IP4_FRAME_TO_CANCEL)(\r
   IP4_LINK_TX_TOKEN       *Frame,\r
   VOID                    *Context\r
   );\r
@@ -134,7 +148,7 @@ BOOLEAN
 // Notice the special cases that DHCP can configure the interface\r
 // with 0.0.0.0/0.0.0.0.\r
 //\r
-struct _IP4_INTERFACE {\r
+typedef struct _IP4_INTERFACE {\r
   UINT32                        Signature;\r
   LIST_ENTRY                    Link;\r
   INTN                          RefCnt;\r
@@ -182,7 +196,7 @@ struct _IP4_INTERFACE {
   //\r
   LIST_ENTRY                    IpInstances;\r
   BOOLEAN                       PromiscRecv;\r
-};\r
+} IP4_INTERFACE;\r
 \r
 IP4_INTERFACE *\r
 Ip4CreateInterface (\r