]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c
code scrub fix
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Dhcp4Dxe / Dhcp4Option.c
index 571c6bbf95db664e8c66c9f3bd0caac66405ac15..e1f14a69681d0ec19cf9c6f50c477a1b6541e53f 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
-\r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+  Function to validate, parse, process the DHCP options.\r
+  \r
+Copyright (c) 2006 - 2008, Intel Corporation.<BR>\r
 All rights reserved. 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\r
@@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  Dhcp4Option.c\r
-\r
-Abstract:\r
-\r
-  Function to validate, parse, process the DHCP options\r
-\r
-\r
 **/\r
 \r
 #include "Dhcp4Impl.h"\r
@@ -120,7 +112,7 @@ DHCP_OPTION_FORMAT DhcpOptionFormats[] = {
   Binary search the DhcpOptionFormats array to find the format\r
   information about a specific option.\r
 \r
-  @param  Tag                    The option's tag.\r
+  @param[in]  Tag                    The option's tag.\r
 \r
   @return The point to the option's format, NULL if not found.\r
 \r
@@ -158,9 +150,9 @@ DhcpFindOptionFormat (
 /**\r
   Validate whether a single DHCP option is valid according to its format.\r
 \r
-  @param  Format                 The option's format\r
-  @param  OptValue               The value of the option\r
-  @param  Len                    The length of the option value\r
+  @param[in]  Format                 The option's format\r
+  @param[in]  OptValue               The value of the option\r
+  @param[in]  Len                    The length of the option value\r
 \r
   @retval TRUE     The option is valid.\r
   @retval FALSE    Otherwise.\r
@@ -238,10 +230,10 @@ DhcpOptionIsValid (
   Extract the client interested options, all the parameters are\r
   converted to host byte order.\r
 \r
-  @param  Tag                    The DHCP option tag\r
-  @param  Len                    The length of the option\r
-  @param  Data                   The value of the DHCP option\r
-  @param  Para                   The variable to save the interested parameter\r
+  @param[in]  Tag                    The DHCP option tag\r
+  @param[in]  Len                    The length of the option\r
+  @param[in]  Data                   The value of the DHCP option\r
+  @param[out] Para                   The variable to save the interested parameter\r
 \r
   @retval EFI_SUCCESS            The DHCP option is successfully extracted.\r
   @retval EFI_INVALID_PARAMETER  The DHCP option is mal-formated\r
@@ -309,12 +301,12 @@ DhcpGetParameter (
   in several buffers, such as the BOOTP options filed, boot file or server\r
   name. Each option buffer is required to end with DHCP_TAG_EOP.\r
 \r
-  @param  Buffer                 The buffer which contains DHCP options\r
-  @param  BufLen                 The length of the buffer\r
-  @param  Check                  The callback function for each option found\r
-  @param  Context                The opaque parameter for the Check\r
-  @param  Overload               Variable to save the value of DHCP_TAG_OVERLOAD\r
-                                 option.\r
+  @param[in]  Buffer                 The buffer which contains DHCP options\r
+  @param[in]  BufLen                 The length of the buffer\r
+  @param[in]  Check                  The callback function for each option found\r
+  @param[in]  Context                The opaque parameter for the Check\r
+  @param[out] Overload               Variable to save the value of DHCP_TAG_OVERLOAD\r
+                                     option.\r
 \r
   @retval EFI_SUCCESS            All the options are valid\r
   @retval EFI_INVALID_PARAMETER  The options are mal-formated.\r
@@ -324,7 +316,7 @@ EFI_STATUS
 DhcpIterateBufferOptions (\r
   IN  UINT8                 *Buffer,\r
   IN  INTN                  BufLen,\r
-  IN  DHCP_CHECK_OPTION     Check,            OPTIONAL\r
+  IN  DHCP_CHECK_OPTION     Check             OPTIONAL,\r
   IN  VOID                  *Context,\r
   OUT UINT8                 *Overload         OPTIONAL\r
   )\r
@@ -385,10 +377,10 @@ DhcpIterateBufferOptions (
   the options in FILENAME and SERVERNAME fields. One option may be\r
   encoded in several places. See RFC 3396 Encoding Long Options in DHCP\r
 \r
-  @param  Packet                 The DHCP packet to check the options for\r
-  @param  Check                  The callback function to be called for each option\r
-                                 found\r
-  @param  Context                The opaque parameter for Check\r
+  @param[in]  Packet                 The DHCP packet to check the options for\r
+  @param[in]  Check                  The callback function to be called for each option\r
+                                     found\r
+  @param[in]  Context                The opaque parameter for Check\r
 \r
   @retval EFI_SUCCESS            The DHCP packet's options are well formated\r
   @retval EFI_INVALID_PARAMETER  The DHCP packet's options are not well formated\r
@@ -455,11 +447,11 @@ DhcpIterateOptions (
   length. It just adds the data length of all the occurances of this\r
   Tag. Context is an array of 256 DHCP_OPTION_COUNT.\r
 \r
-  @param  Tag                    The current option to check\r
-  @param  Len                    The length of the option data\r
-  @param  Data                   The option data\r
-  @param  Context                The context, which is a array of 256\r
-                                 DHCP_OPTION_COUNT.\r
+  @param[in]  Tag                    The current option to check\r
+  @param[in]  Len                    The length of the option data\r
+  @param[in]  Data                   The option data\r
+  @param[in]  Context                The context, which is a array of 256\r
+                                     DHCP_OPTION_COUNT.\r
 \r
   @retval EFI_SUCCESS            It always returns EFI_SUCCESS.\r
 \r
@@ -485,11 +477,11 @@ DhcpGetOptionLen (
   Call back function to DhcpIterateOptions to consolidate each option's\r
   data. There are maybe several occurrence of the same option.\r
 \r
-  @param  Tag                    The option to consolidate its data\r
-  @param  Len                    The length of option data\r
-  @param  Data                   The data of the option's current occurance\r
-  @param  Context                The context, which is DHCP_OPTION_CONTEXT. This\r
-                                 array is  just a wrap to pass THREE parameters.\r
+  @param[in]  Tag                    The option to consolidate its data\r
+  @param[in]  Len                    The length of option data\r
+  @param[in]  Data                   The data of the option's current occurance\r
+  @param[in]  Context                The context, which is DHCP_OPTION_CONTEXT. This\r
+                                     array is  just a wrap to pass THREE parameters.\r
 \r
   @retval EFI_SUCCESS            It always returns EFI_SUCCESS\r
 \r
@@ -544,11 +536,11 @@ DhcpFillOption (
   with DhcpFillOption to fill each option's data to its position in the\r
   buffer.\r
 \r
-  @param  Packet                 The DHCP packet to parse the options\r
-  @param  Count                  The number of valid dhcp options present in the\r
-                                 packet\r
-  @param  OptionPoint            The array that contains the DHCP options. Caller\r
-                                 should free it.\r
+  @param[in]  Packet                 The DHCP packet to parse the options\r
+  @param[out] Count                  The number of valid dhcp options present in the\r
+                                     packet\r
+  @param[out] OptionPoint            The array that contains the DHCP options. Caller\r
+                                     should free it.\r
 \r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory to parse the packet.\r
   @retval EFI_INVALID_PARAMETER  The options are mal-formated\r
@@ -648,8 +640,8 @@ ON_EXIT:
   Validate the packet's options. If necessary, allocate\r
   and fill in the interested parameters.\r
 \r
-  @param  Packet                 The packet to validate the options\r
-  @param  Para                   The variable to save the DHCP parameters.\r
+  @param[in]  Packet                 The packet to validate the options\r
+  @param[out] Para                   The variable to save the DHCP parameters.\r
 \r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory to validate the packet.\r
   @retval EFI_INVALID_PARAMETER  The options are mal-formated\r
@@ -735,10 +727,10 @@ ON_EXIT:
   Append an option to the memory, if the option is longer than\r
   255 bytes, splits it into several options.\r
 \r
-  @param  Buf                    The buffer to append the option to\r
-  @param  Tag                    The option's tag\r
-  @param  DataLen                The length of the option's data\r
-  @param  Data                   The option's data\r
+  @param[out] Buf                    The buffer to append the option to\r
+  @param[in]  Tag                    The option's tag\r
+  @param[in]  DataLen                The length of the option's data\r
+  @param[in]  Data                   The option's data\r
 \r
   @return The position to append the next option\r
 \r
@@ -774,13 +766,13 @@ DhcpAppendOption (
   Build a new DHCP packet from a seed packet. Options may be deleted or\r
   appended. The caller should free the NewPacket when finished using it.\r
 \r
-  @param  SeedPacket             The seed packet to start with\r
-  @param  DeleteCount            The number of options to delete\r
-  @param  DeleteList             The options to delete from the packet\r
-  @param  AppendCount            The number of options to append\r
-  @param  AppendList             The options to append to the packet\r
-  @param  NewPacket              The new packet, allocated and built by this\r
-                                 function.\r
+  @param[in]  SeedPacket             The seed packet to start with\r
+  @param[in]  DeleteCount            The number of options to delete\r
+  @param[in]  DeleteList             The options to delete from the packet\r
+  @param[in]  AppendCount            The number of options to append\r
+  @param[in]  AppendList             The options to append to the packet\r
+  @param[out] NewPacket              The new packet, allocated and built by this\r
+                                     function.\r
 \r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory\r
   @retval EFI_INVALID_PARAMETER  The options in SeekPacket are mal-formated\r