#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
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
// 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
//\r
LIST_ENTRY IpInstances;\r
BOOLEAN PromiscRecv;\r
-};\r
+} IP4_INTERFACE;\r
\r
IP4_INTERFACE *\r
Ip4CreateInterface (\r