From ed729a0c3ce024651d616437d85b15194e9cb6ba Mon Sep 17 00:00:00 2001 From: jgong5 Date: Tue, 18 Nov 2008 14:30:46 +0000 Subject: [PATCH] synced function header git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6615 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/Network/Dhcp4Dxe/Dhcp4Driver.h | 115 ++++++++++-------- .../Universal/Network/Dhcp4Dxe/Dhcp4Impl.h | 10 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Io.h | 10 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Option.h | 29 ++--- 4 files changed, 94 insertions(+), 70 deletions(-) diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.h b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.h index b0052bef69..66396707f9 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.h +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.h @@ -27,16 +27,21 @@ extern EFI_COMPONENT_NAME_PROTOCOL gDhcp4ComponentName; extern EFI_COMPONENT_NAME2_PROTOCOL gDhcp4ComponentName2; /** - Test to see if this driver supports ControllerHandle. - - @param This Protocol instance pointer. - @param ControllerHandle Handle of device to test. - @param RemainingDevicePath Optional parameter use to pick a specific child - device to start. - - @retval EFI_SUCCES This driver supports this device - @retval EFI_ALREADY_STARTED This driver is already running on this device. - @retval other This driver does not support this device. + Test to see if this driver supports ControllerHandle. This service + is called by the EFI boot service ConnectController(). In + order to make drivers as small as possible, there are a few calling + restrictions for this service. ConnectController() must + follow these calling restrictions. If any other agent wishes to call + Supported() it must also follow these calling restrictions. + + @param This Protocol instance pointer. + @param ControllerHandle Handle of device to test + @param RemainingDevicePath Optional parameter use to pick a specific child + device to start. + + @retval EFI_SUCCESS This driver supports this device + @retval EFI_ALREADY_STARTED This driver is already running on this device + @retval other This driver does not support this device **/ EFI_STATUS @@ -48,16 +53,21 @@ Dhcp4DriverBindingSupported ( ); /** - Start this driver on ControllerHandle. - - @param This Protocol instance pointer. - @param ControllerHandle Handle of device to bind driver to - @param RemainingDevicePath Optional parameter use to pick a specific child - device to start. - - @retval EFI_SUCCES This driver is added to ControllerHandle - @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle - @retval other This driver does not support this device + Start this driver on ControllerHandle. This service is called by the + EFI boot service ConnectController(). In order to make + drivers as small as possible, there are a few calling restrictions for + this service. ConnectController() must follow these + calling restrictions. If any other agent wishes to call Start() it + must also follow these calling restrictions. + + @param This Protocol instance pointer. + @param ControllerHandle Handle of device to bind driver to + @param RemainingDevicePath Optional parameter use to pick a specific child + device to start. + + @retval EFI_SUCCESS This driver is added to ControllerHandle + @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle + @retval other This driver does not support this device **/ EFI_STATUS @@ -69,16 +79,21 @@ Dhcp4DriverBindingStart ( ); /** - Stop this driver on ControllerHandle. - - @param This Protocol instance pointer. - @param ControllerHandle Handle of device to stop driver on - @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number - of children is zero stop the entire bus driver. - @param ChildHandleBuffer List of Child Handles to Stop. - - @retval EFI_SUCCES This driver is removed ControllerHandle - @retval other This driver was not removed from this device + Stop this driver on ControllerHandle. This service is called by the + EFI boot service DisconnectController(). In order to + make drivers as small as possible, there are a few calling + restrictions for this service. DisconnectController() + must follow these calling restrictions. If any other agent wishes + to call Stop() it must also follow these calling restrictions. + + @param This Protocol instance pointer. + @param ControllerHandle Handle of device to stop driver on + @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of + children is zero stop the entire bus driver. + @param ChildHandleBuffer List of Child Handles to Stop. + + @retval EFI_SUCCESS This driver is removed ControllerHandle + @retval other This driver was not removed from this device **/ EFI_STATUS @@ -93,17 +108,16 @@ Dhcp4DriverBindingStop ( /** Creates a child handle with a set of I/O services. - @param This Protocol instance pointer. - @param ChildHandle Pointer to the handle of the child to create. If - it is NULL, then a new handle is created. If it is - not NULL, then the I/O services are added to the - existing child handle. + @param This Protocol instance pointer. + @param ChildHandle Pointer to the handle of the child to create. If it is NULL, + then a new handle is created. If it is not NULL, then the + I/O services are added to the existing child handle. - @retval EFI_SUCCES The child handle was created with the I/O - services. - @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create - the child. - @retval other The child handle was not created. + @retval EFI_SUCCES The child handle was created with the I/O services + @retval EFI_INVALID_PARAMETER ChildHandle is NULL. + @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create + the child + @retval other The child handle was not created **/ EFI_STATUS @@ -116,17 +130,16 @@ Dhcp4ServiceBindingCreateChild ( /** Destroys a child handle with a set of I/O services. - @param This Protocol instance pointer. - @param ChildHandle Handle of the child to destroy. - - @retval EFI_SUCCES The I/O services were removed from the child - handle. - @retval EFI_UNSUPPORTED The child handle does not support the I/O services - that are being removed. - @retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle. - @retval EFI_ACCESS_DENIED The child handle could not be destroyed because - its I/O services are being used. - @retval other The child handle was not destroyed. + @param This Protocol instance pointer. + @param ChildHandle Handle of the child to destroy + + @retval EFI_SUCCES The I/O services were removed from the child handle + @retval EFI_UNSUPPORTED The child handle does not support the I/O services + that are being removed. + @retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle. + @retval EFI_ACCESS_DENIED The child handle could not be destroyed because its + I/O services are being used. + @retval other The child handle was not destroyed **/ EFI_STATUS diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h index 16ea4936cf..db75addae8 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h @@ -165,9 +165,17 @@ extern EFI_DHCP4_PROTOCOL mDhcp4ProtocolTemplate; **/ VOID DhcpYieldControl ( - IN DHCP_SERVICE *DhcpSb + IN DHCP_SERVICE *DhcpSb ); +/** + Complete a Dhcp4 transaction and signal the upper layer. + + @param Instance Dhcp4 instance. + + @return None. + +**/ VOID PxeDhcpDone ( IN DHCP_PROTOCOL *Instance diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.h b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.h index 4dab42e9a7..21bbf194bf 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.h +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.h @@ -93,9 +93,9 @@ typedef enum { **/ EFI_STATUS DhcpSetState ( - IN DHCP_SERVICE *DhcpSb, - IN INTN State, - IN BOOLEAN CallUser + IN OUT DHCP_SERVICE *DhcpSb, + IN INTN State, + IN BOOLEAN CallUser ); /** @@ -114,6 +114,7 @@ DhcpSetState ( @retval EFI_OUT_OF_RESOURCES Failed to allocate resources for the packet @retval EFI_ACCESS_DENIED Failed to transmit the packet through UDP @retval EFI_SUCCESS The message is sent + @retval other Other error occurs **/ EFI_STATUS @@ -146,7 +147,7 @@ DhcpOnTimerTick ( ); /** - Handle the received DHCP packets. This function drivers the DHCP + Handle the received DHCP packets. This function drives the DHCP state machine. @param UdpPacket The UDP packets received. @@ -172,6 +173,7 @@ DhcpInput ( @param DhcpSb The DHCP service instance @retval EFI_SUCCESS The request has been sent + @retval other Some error occurs when sending the request. **/ EFI_STATUS diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.h b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.h index fe62e55085..74d84b3f81 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.h +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.h @@ -239,13 +239,13 @@ EFI_STATUS @param Context The opaque parameter for Check @retval EFI_SUCCESS The DHCP packet's options are well formated - @retval Others The DHCP packet's options are not well formated + @retval EFI_INVALID_PARAMETER The DHCP packet's options are not well formated **/ EFI_STATUS DhcpIterateOptions ( IN EFI_DHCP4_PACKET *Packet, - IN DHCP_CHECK_OPTION Check, OPTIONAL + IN DHCP_CHECK_OPTION Check, OPTIONAL IN VOID *Context ); @@ -264,7 +264,7 @@ DhcpIterateOptions ( EFI_STATUS DhcpValidateOptions ( IN EFI_DHCP4_PACKET *Packet, - OUT DHCP_PARAMETER **Para OPTIONAL + OUT DHCP_PARAMETER **Para OPTIONAL ); /** @@ -277,7 +277,7 @@ DhcpValidateOptions ( as a UINT8. It then iterates the DHCP packet to get data length of each option by calling DhcpIterOptions with DhcpGetOptionLen. Now, it knows the number of present options and their length. It allocates a - array of DHCP_OPTION and a continous buffer after the array to put + array of DHCP_OPTION and a continuous buffer after the array to put all the options' data. Each option's data is pointed to by the Data field in DHCP_OPTION structure. At last, it call DhcpIterateOptions with DhcpFillOption to fill each option's data to its position in the @@ -315,10 +315,10 @@ DhcpParseOption ( **/ UINT8 * DhcpAppendOption ( - IN UINT8 *Buf, - IN UINT8 Tag, - IN UINT16 DataLen, - IN UINT8 *Data + OUT UINT8 *Buf, + IN UINT8 Tag, + IN UINT16 DataLen, + IN UINT8 *Data ); /** @@ -334,17 +334,18 @@ DhcpAppendOption ( function. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory + @retval EFI_INVALID_PARAMETER The options in SeekPacket are mal-formated @retval EFI_SUCCESS The packet is build. **/ EFI_STATUS DhcpBuild ( - IN EFI_DHCP4_PACKET *SeedPacket, - IN UINT32 DeleteCount, - IN UINT8 *DeleteList OPTIONAL, - IN UINT32 AppendCount, - IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL, - OUT EFI_DHCP4_PACKET **NewPacket + IN EFI_DHCP4_PACKET *SeedPacket, + IN UINT32 DeleteCount, + IN UINT8 *DeleteList OPTIONAL, + IN UINT32 AppendCount, + IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL, + OUT EFI_DHCP4_PACKET **NewPacket ); #endif -- 2.39.2