Clean codes per ECC.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5384 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -45,27 +45,81 @@ Abstract:
|
||||
(((Nic1)->Type == (Nic2)->Type) && ((Nic1)->Len == (Nic2)->Len) && \
|
||||
NET_MAC_EQUAL (&(Nic1)->MacAddr, &(Nic2)->MacAddr, (Nic1)->Len))
|
||||
|
||||
/**
|
||||
Check whether the configure parameter is valid.
|
||||
|
||||
@param NicConfig The configure parameter to check
|
||||
|
||||
@return TRUE if the parameter is valid for the interface, otherwise FALSE.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
Ip4ConfigIsValid (
|
||||
IN NIC_IP4_CONFIG_INFO *NicConfig
|
||||
);
|
||||
|
||||
/**
|
||||
Read the ip4 configure variable from the EFI variable.
|
||||
|
||||
None
|
||||
|
||||
@return The IP4 configure read if it is there and is valid, otherwise NULL
|
||||
|
||||
**/
|
||||
IP4_CONFIG_VARIABLE *
|
||||
Ip4ConfigReadVariable (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Write the IP4 configure variable to the NVRAM. If Config
|
||||
is NULL, remove the variable.
|
||||
|
||||
@param Config The IP4 configure data to write
|
||||
|
||||
@retval EFI_SUCCESS The variable is written to the NVRam
|
||||
@retval Others Failed to write the variable.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
Ip4ConfigWriteVariable (
|
||||
IN IP4_CONFIG_VARIABLE *Config OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
Locate the IP4 configure parameters from the variable.If a
|
||||
configuration is found, copy it to a newly allocated block
|
||||
of memory to avoid the alignment problem. Caller should
|
||||
release the memory after use.
|
||||
|
||||
@param Variable The IP4 configure variable to search in
|
||||
@param NicAddr The interface address to check
|
||||
|
||||
@return The point to the NIC's IP4 configure info if it is found
|
||||
@return in the IP4 variable, otherwise NULL.
|
||||
|
||||
**/
|
||||
NIC_IP4_CONFIG_INFO *
|
||||
Ip4ConfigFindNicVariable (
|
||||
IN IP4_CONFIG_VARIABLE *Variable,
|
||||
IN NIC_ADDR *NicAddr
|
||||
);
|
||||
|
||||
/**
|
||||
Modify the configuration parameter for the NIC in the variable.
|
||||
If Config is NULL, old configuration will be remove from the new
|
||||
variable. Otherwise, append it or replace the old one.
|
||||
|
||||
@param Variable The IP4 variable to change
|
||||
@param NicAddr The interface to search
|
||||
@param Config The new configuration parameter (NULL to remove the old)
|
||||
|
||||
@return The new IP4_CONFIG_VARIABLE variable if the new variable has at
|
||||
@return least one NIC configure and no EFI_OUT_OF_RESOURCES failure.
|
||||
@return Return NULL either because failed to locate memory for new variable
|
||||
@return or the only NIC configure is removed from the Variable.
|
||||
|
||||
**/
|
||||
IP4_CONFIG_VARIABLE *
|
||||
Ip4ConfigModifyVariable (
|
||||
IN IP4_CONFIG_VARIABLE *Variable, OPTIONAL
|
||||
|
Reference in New Issue
Block a user