summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h
diff options
context:
space:
mode:
authorjgong5 <jgong5@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-18 09:29:44 +0000
committerjgong5 <jgong5@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-18 09:29:44 +0000
commit2ff2921247ab4cf5eaa6a0b0358a531e6bfacbcb (patch)
tree002aedad428646a70122252e810c86b42a54f779 /MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h
parentd9ef3b7dc43a48bf563689ed9fc107c19928048f (diff)
downloadedk2-platforms-2ff2921247ab4cf5eaa6a0b0358a531e6bfacbcb.tar.xz
synced function header
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6595 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h')
-rw-r--r--MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h41
1 files changed, 36 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h
index fa173fb086..546bf8ca6d 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h
@@ -34,19 +34,50 @@ typedef enum {
IP4_OPTION_COPY_MASK = 0x80
} IP4_OPTION_ENUM_TYPES;
+/**
+ Validate the IP4 option format for both the packets we received
+ and will transmit. It will compute the ICMP error message fields
+ if the option is mal-formated. But this information isn't used.
+
+ @param Option The first byte of the option
+ @param OptionLen The length of the whole option
+ @param Rcvd The option is from the packet we received if TRUE,
+ otherwise the option we wants to transmit.
+
+ @retval TRUE The option is properly formatted
+ @retval FALSE The option is mal-formated
+
+**/
BOOLEAN
Ip4OptionIsValid (
IN UINT8 *Option,
- IN UINT32 OptLen,
+ IN UINT32 OptionLen,
IN BOOLEAN Rcvd
);
+/**
+ Copy the option from the original option to buffer. It
+ handles the details such as:
+ 1. whether copy the single IP4 option to the first/non-first
+ fragments.
+ 2. Pad the options copied over to aligned to 4 bytes.
+
+ @param Option The original option to copy from
+ @param OptionLen The length of the original option
+ @param FirstFragment Whether it is the first fragment
+ @param Buf The buffer to copy options to. NULL
+ @param BufLen The length of the buffer
+
+ @retval EFI_SUCCESS The options are copied over
+ @retval EFI_BUFFER_TOO_SMALL Buf is NULL or BufLen provided is too small.
+
+**/
EFI_STATUS
Ip4CopyOption (
- IN UINT8 *Option,
- IN UINT32 OptLen,
- IN BOOLEAN Fragment,
- IN UINT8 *Buf, OPTIONAL
+ IN UINT8 *Option,
+ IN UINT32 OptionLen,
+ IN BOOLEAN FirstFragment,
+ IN OUT UINT8 *Buf, OPTIONAL
IN OUT UINT32 *BufLen
);
#endif