TianoCore EDK2 master
Loading...
Searching...
No Matches
VlanConfigImpl.h File Reference

Go to the source code of this file.

Data Structures

struct  VLAN_CONFIG_PRIVATE_DATA
 

Macros

#define VLAN_LIST_VAR_OFFSET   ((UINT16) OFFSET_OF (VLAN_CONFIGURATION, VlanList))
 
#define VLAN_CONFIG_PRIVATE_DATA_SIGNATURE   SIGNATURE_32 ('V', 'C', 'P', 'D')
 
#define VLAN_CONFIG_PRIVATE_DATA_FROM_THIS(a)   CR (a, VLAN_CONFIG_PRIVATE_DATA, ConfigAccess, VLAN_CONFIG_PRIVATE_DATA_SIGNATURE)
 

Functions

EFI_STATUS EFIAPI VlanConfigComponentNameGetDriverName (IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName)
 
EFI_STATUS EFIAPI VlanConfigComponentNameGetControllerName (IN EFI_COMPONENT_NAME_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName)
 
EFI_STATUS EFIAPI VlanConfigDriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
 
EFI_STATUS EFIAPI VlanConfigDriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
 
EFI_STATUS EFIAPI VlanConfigDriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 
VOID VlanUpdateForm (IN OUT VLAN_CONFIG_PRIVATE_DATA *PrivateData)
 
EFI_STATUS InstallVlanConfigForm (IN OUT VLAN_CONFIG_PRIVATE_DATA *PrivateData)
 
EFI_STATUS UninstallVlanConfigForm (IN OUT VLAN_CONFIG_PRIVATE_DATA *PrivateData)
 
EFI_STATUS EFIAPI VlanExtractConfig (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results)
 
EFI_STATUS EFIAPI VlanRouteConfig (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress)
 
EFI_STATUS EFIAPI VlanCallback (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, IN UINT8 Type, IN EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest)
 

Variables

EFI_COMPONENT_NAME2_PROTOCOL gVlanConfigComponentName2
 
EFI_COMPONENT_NAME_PROTOCOL gVlanConfigComponentName
 
UINT8 VlanConfigBin []
 
UINT8 VlanConfigDxeStrings []
 
VLAN_CONFIG_PRIVATE_DATA mVlanConfigPrivateDateTemplate
 

Detailed Description

Header file for driver binding protocol and HII config access protocol.

Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file VlanConfigImpl.h.

Macro Definition Documentation

◆ VLAN_CONFIG_PRIVATE_DATA_FROM_THIS

#define VLAN_CONFIG_PRIVATE_DATA_FROM_THIS (   a)    CR (a, VLAN_CONFIG_PRIVATE_DATA, ConfigAccess, VLAN_CONFIG_PRIVATE_DATA_SIGNATURE)

Definition at line 65 of file VlanConfigImpl.h.

◆ VLAN_CONFIG_PRIVATE_DATA_SIGNATURE

#define VLAN_CONFIG_PRIVATE_DATA_SIGNATURE   SIGNATURE_32 ('V', 'C', 'P', 'D')

Definition at line 64 of file VlanConfigImpl.h.

◆ VLAN_LIST_VAR_OFFSET

#define VLAN_LIST_VAR_OFFSET   ((UINT16) OFFSET_OF (VLAN_CONFIGURATION, VlanList))

Definition at line 44 of file VlanConfigImpl.h.

Function Documentation

◆ InstallVlanConfigForm()

EFI_STATUS InstallVlanConfigForm ( IN OUT VLAN_CONFIG_PRIVATE_DATA PrivateData)

This function publish the VLAN configuration Form for a network device. The HII Config Access protocol will be installed on a child handle of the network device.

Parameters
[in,out]PrivateDataPoints to VLAN configuration private data.
Return values
EFI_SUCCESSHII Form is installed for this network device.
EFI_OUT_OF_RESOURCESNot enough resource for HII Form installation.
OthersOther errors as indicated.

Definition at line 483 of file VlanConfigImpl.c.

◆ UninstallVlanConfigForm()

EFI_STATUS UninstallVlanConfigForm ( IN OUT VLAN_CONFIG_PRIVATE_DATA PrivateData)

This function remove the VLAN configuration Form for a network device. The child handle for HII Config Access protocol will be destroyed.

Parameters
[in,out]PrivateDataPoints to VLAN configuration private data.
Return values
EFI_SUCCESSHII Form has been uninstalled successfully.
OthersOther errors as indicated.

Definition at line 602 of file VlanConfigImpl.c.

◆ VlanCallback()

EFI_STATUS EFIAPI VlanCallback ( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL This,
IN EFI_BROWSER_ACTION  Action,
IN EFI_QUESTION_ID  QuestionId,
IN UINT8  Type,
IN EFI_IFR_TYPE_VALUE Value,
OUT EFI_BROWSER_ACTION_REQUEST *  ActionRequest 
)

This function processes the results of changes in configuration.

Parameters
[in]ThisPoints to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
[in]ActionSpecifies the type of action taken by the browser.
[in]QuestionIdA unique value which is sent to the original exporting driver so that it can identify the type of data to expect.
[in]TypeThe type of value for the question.
[in]ValueA pointer to the data being sent to the original exporting driver.
[out]ActionRequestOn return, points to the action requested by the callback function.
Return values
EFI_SUCCESSThe callback successfully handled the action.
EFI_OUT_OF_RESOURCESNot enough storage is available to hold the variable and its data.
EFI_DEVICE_ERRORThe variable could not be saved.
EFI_UNSUPPORTEDThe specified Action is not supported by the callback.

Definition at line 215 of file VlanConfigImpl.c.

◆ VlanConfigComponentNameGetControllerName()

EFI_STATUS EFIAPI VlanConfigComponentNameGetControllerName ( IN EFI_COMPONENT_NAME_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_HANDLE ChildHandle  OPTIONAL,
IN CHAR8 *  Language,
OUT CHAR16 **  ControllerName 
)

Retrieves a Unicode string that is the user readable name of the controller that is being managed by a driver.

This function retrieves the user readable name of the controller specified by ControllerHandle and ChildHandle in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the controller name is returned in ControllerName, and EFI_SUCCESS is returned. If the driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle, then EFI_UNSUPPORTED is returned. If the driver specified by This does not support the language specified by Language, then EFI_UNSUPPORTED is returned.

Parameters
This[in]A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or EFI_COMPONENT_NAME_PROTOCOL instance.
ControllerHandle[in]The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned.
ChildHandle[in]The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller.
Language[in]A pointer to a Null-terminated ASCII string array indicating the language. This is the language of the driver name that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified in RFC 4646 or ISO 639-2 language code format.
ControllerName[out]A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This.
Return values
EFI_SUCCESSThe Unicode string for the user readable name in the language specified by Language for the driver specified by This was returned in DriverName.
EFI_INVALID_PARAMETERControllerHandle is NULL.
EFI_INVALID_PARAMETERChildHandle is not NULL and it is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETERLanguage is NULL.
EFI_INVALID_PARAMETERControllerName is NULL.
EFI_UNSUPPORTEDThe driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle.
EFI_UNSUPPORTEDThe driver specified by This does not support the language specified by Language.

Definition at line 155 of file ComponentName.c.

◆ VlanConfigComponentNameGetDriverName()

EFI_STATUS EFIAPI VlanConfigComponentNameGetDriverName ( IN EFI_COMPONENT_NAME_PROTOCOL This,
IN CHAR8 *  Language,
OUT CHAR16 **  DriverName 
)

Retrieves a Unicode string that is the user readable name of the driver.

This function retrieves the user readable name of a driver in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the driver name is returned in DriverName, and EFI_SUCCESS is returned. If the driver specified by This does not support the language specified by Language, then EFI_UNSUPPORTED is returned.

Parameters
This[in]A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or EFI_COMPONENT_NAME_PROTOCOL instance.
Language[in]A pointer to a Null-terminated ASCII string array indicating the language. This is the language of the driver name that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified in RFC 4646 or ISO 639-2 language code format.
DriverName[out]A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language.
Return values
EFI_SUCCESSThe Unicode string for the Driver specified by This and the language specified by Language was returned in DriverName.
EFI_INVALID_PARAMETERLanguage is NULL.
EFI_INVALID_PARAMETERDriverName is NULL.
EFI_UNSUPPORTEDThe driver specified by This does not support the language specified by Language.

Definition at line 80 of file ComponentName.c.

◆ VlanConfigDriverBindingStart()

EFI_STATUS EFIAPI VlanConfigDriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath  OPTIONAL 
)

Start this driver on ControllerHandle.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to bind driver to
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver is added to ControllerHandle
EFI_ALREADY_STARTEDThis driver is already running on ControllerHandle
otherThis driver does not support this device

Definition at line 112 of file VlanConfigDriver.c.

◆ VlanConfigDriverBindingStop()

EFI_STATUS EFIAPI VlanConfigDriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

Stop this driver on ControllerHandle.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to stop driver on
[in]NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
[in]ChildHandleBufferList of Child Handles to Stop.
Return values
EFI_SUCCESSThis driver is removed ControllerHandle
otherThis driver was not removed from this device

Definition at line 243 of file VlanConfigDriver.c.

◆ VlanConfigDriverBindingSupported()

EFI_STATUS EFIAPI VlanConfigDriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath  OPTIONAL 
)

Test to see if this driver supports ControllerHandle.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to test
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device
EFI_ALREADY_STARTEDThis driver is already running on this device
otherThis driver does not support this device

Definition at line 63 of file VlanConfigDriver.c.

◆ VlanExtractConfig()

EFI_STATUS EFIAPI VlanExtractConfig ( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL This,
IN CONST EFI_STRING  Request,
OUT EFI_STRING *  Progress,
OUT EFI_STRING *  Results 
)

This function allows a caller to extract the current configuration for one or more named elements from the target driver.

Parameters
[in]ThisPoints to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
[in]RequestA null-terminated Unicode string in <ConfigRequest> format.
[out]ProgressOn return, points to a character in the Request string. Points to the string's null terminator if request was successful. Points to the most recent '&' before the first failing name/value pair (or the beginning of the string if the failure is in the first name/value pair) if the request was not successful.
[out]ResultsA null-terminated Unicode string in <ConfigAltResp> format which has all values filled in for the names in the Request string. String to be allocated by the called function.
Return values
EFI_SUCCESSThe Results is filled with the requested values.
EFI_OUT_OF_RESOURCESNot enough memory to store the results.
EFI_INVALID_PARAMETERRequest is NULL, illegal syntax, or unknown name.
EFI_NOT_FOUNDRouting data doesn't match any storage in this driver.

This function allows a caller to extract the current configuration for one or more named elements from the target driver.

Parameters
[in]ThisPoints to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
[in]RequestA null-terminated Unicode string in <ConfigRequest> format.
[out]ProgressOn return, points to a character in the Request string. Points to the string's null terminator if request was successful. Points to the most recent '&' before the first failing name/value pair (or the beginning of the string if the failure is in the first name/value pair) if the request was not successful.
[out]ResultsA null-terminated Unicode string in <ConfigAltResp> format which has all values filled in for the names in the Request string. String to be allocated by the called function.
Return values
EFI_SUCCESSThe Results is filled with the requested values.
EFI_OUT_OF_RESOURCESNot enough memory to store the results.
EFI_INVALID_PARAMETERRequest is illegal syntax, or unknown name.
EFI_NOT_FOUNDRouting data doesn't match any storage in this driver.

Definition at line 63 of file VlanConfigImpl.c.

◆ VlanRouteConfig()

EFI_STATUS EFIAPI VlanRouteConfig ( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL This,
IN CONST EFI_STRING  Configuration,
OUT EFI_STRING *  Progress 
)

This function processes the results of changes in configuration.

Parameters
[in]ThisPoints to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
[in]ConfigurationA null-terminated Unicode string in <ConfigResp> format.
[out]ProgressA pointer to a string filled in with the offset of the most recent '&' before the first failing name/value pair (or the beginning of the string if the failure is in the first name/value pair) or the terminating NULL if all was successful.
Return values
EFI_SUCCESSThe Results is processed successfully.
EFI_INVALID_PARAMETERConfiguration is NULL.
EFI_NOT_FOUNDRouting data doesn't match any storage in this driver.

Definition at line 172 of file VlanConfigImpl.c.

◆ VlanUpdateForm()

VOID VlanUpdateForm ( IN OUT VLAN_CONFIG_PRIVATE_DATA PrivateData)

This function update VLAN list in the VLAN configuration Form.

Parameters
[in,out]PrivateDataPoints to VLAN configuration private data.

Definition at line 338 of file VlanConfigImpl.c.

Variable Documentation

◆ gVlanConfigComponentName

EFI_COMPONENT_NAME_PROTOCOL gVlanConfigComponentName
extern

Definition at line 14 of file ComponentName.c.

◆ gVlanConfigComponentName2

EFI_COMPONENT_NAME2_PROTOCOL gVlanConfigComponentName2
extern

Definition at line 23 of file ComponentName.c.

◆ mVlanConfigPrivateDateTemplate

VLAN_CONFIG_PRIVATE_DATA mVlanConfigPrivateDateTemplate
extern

Definition at line 14 of file VlanConfigImpl.c.