Defines | |
#define | INVALID_NIC_INDEX 0xffff |
#define | INVALID_VLAN_ID 0xffff |
Functions | |
VOID | LocateNicHandleBuffer (OUT UINTN *NumberOfHandles, OUT EFI_HANDLE **HandleBuffer) |
UINTN | NicNameToIndex (IN CHAR16 *Name) |
EFI_HANDLE | NicNameToHandle (IN CHAR16 *Name) |
EFI_VLAN_CONFIG_PROTOCOL * | OpenVlanConfigProtocol (IN EFI_HANDLE Handle) |
VOID | CloseVlanConfigProtocol (IN EFI_HANDLE Handle) |
VOID | ShowNicVlanInfo (IN EFI_HANDLE Handle, IN UINTN NicIndex) |
VOID | DisplayVlan (IN CHAR16 *Name) |
UINT16 | StrToVlanId (IN CHAR16 *String) |
VOID | AddVlan (IN CHAR16 *ParamStr) |
VOID | DeleteVlan (IN CHAR16 *ParamStr) |
EFI_STATUS EFIAPI | VlanConfigMain (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
UINT8 | VConfigStrings [] |
EFI_HANDLE | mImageHandle = NULL |
EFI_HII_HANDLE | mHiiHandle = NULL |
SHELL_PARAM_ITEM | mParamList [] |
Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define INVALID_NIC_INDEX 0xffff |
Referenced by NicNameToIndex().
#define INVALID_VLAN_ID 0xffff |
Referenced by StrToVlanId().
VOID AddVlan | ( | IN CHAR16 * | ParamStr | ) |
Add a VLAN device.
[in] | ParamStr | Parameter string from user input. |
References CloseVlanConfigProtocol(), mHiiHandle, NicNameToHandle(), OpenVlanConfigProtocol(), and StrToVlanId().
Referenced by VlanConfigMain().
VOID CloseVlanConfigProtocol | ( | IN EFI_HANDLE | Handle | ) |
Close VlanConfig protocol of a handle.
[in] | Handle | The handle to close the VlanConfig protocol. |
References mImageHandle.
Referenced by AddVlan(), DeleteVlan(), and ShowNicVlanInfo().
VOID DeleteVlan | ( | IN CHAR16 * | ParamStr | ) |
Remove a VLAN device.
[in] | ParamStr | Parameter string from user input. |
References CloseVlanConfigProtocol(), mHiiHandle, NicNameToHandle(), OpenVlanConfigProtocol(), and StrToVlanId().
Referenced by VlanConfigMain().
VOID DisplayVlan | ( | IN CHAR16 * | Name | ) |
Display the VLAN configuration of all, or a specified network interface.
[in] | Name | Name of the network interface. If NULL, the VLAN configuration of all network will be displayed. |
References LocateNicHandleBuffer(), NicNameToHandle(), and ShowNicVlanInfo().
Referenced by VlanConfigMain().
VOID LocateNicHandleBuffer | ( | OUT UINTN * | NumberOfHandles, | |
OUT EFI_HANDLE ** | HandleBuffer | |||
) |
Locate the network interface handle buffer.
[out] | NumberOfHandles | Pointer to the number of handles. |
[out] | HandleBuffer | Pointer to the buffer to store the returned handles. |
References mHiiHandle.
Referenced by DisplayVlan(), and NicNameToHandle().
EFI_HANDLE NicNameToHandle | ( | IN CHAR16 * | Name | ) |
Find network interface device handle by its name.
[in] | Name | Name of the network interface. |
NULL | Cannot find the network interface. |
References LocateNicHandleBuffer(), mHiiHandle, and NicNameToIndex().
Referenced by AddVlan(), DeleteVlan(), and DisplayVlan().
UINTN NicNameToIndex | ( | IN CHAR16 * | Name | ) |
Extract the decimal index from the network interface name.
[in] | Name | Name of the network interface. |
INVALID_NIC_INDEX | Failed to extract the network interface index. |
References INVALID_NIC_INDEX.
Referenced by NicNameToHandle().
EFI_VLAN_CONFIG_PROTOCOL* OpenVlanConfigProtocol | ( | IN EFI_HANDLE | Handle | ) |
Open VlanConfig protocol from a handle.
[in] | Handle | The handle to open the VlanConfig protocol. |
References mImageHandle.
Referenced by AddVlan(), DeleteVlan(), and ShowNicVlanInfo().
VOID ShowNicVlanInfo | ( | IN EFI_HANDLE | Handle, | |
IN UINTN | NicIndex | |||
) |
Display VLAN configuration of a network interface.
[in] | Handle | Handle of the network interface. |
[in] | NicIndex | Index of the network interface. |
References CloseVlanConfigProtocol(), mHiiHandle, mImageHandle, and OpenVlanConfigProtocol().
Referenced by DisplayVlan().
UINT16 StrToVlanId | ( | IN CHAR16 * | String | ) |
Convert a NULL-terminated unicode decimal VLAN ID string to VLAN ID.
[in] | String | Pointer to VLAN ID string from user input. |
Value | translated from String, or INVALID_VLAN_ID is string is invalid. |
References INVALID_VLAN_ID.
Referenced by AddVlan(), and DeleteVlan().
EFI_STATUS EFIAPI VlanConfigMain | ( | IN EFI_HANDLE | ImageHandle, | |
IN EFI_SYSTEM_TABLE * | SystemTable | |||
) |
The actual entry point for the application.
[in] | ImageHandle | The firmware allocated handle for the EFI image. |
[in] | SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The entry point executed successfully. | |
other | Some error occur when executing this entry point. |
References AddVlan(), DeleteVlan(), DisplayVlan(), mHiiHandle, mImageHandle, mParamList, and VConfigStrings.
EFI_HII_HANDLE mHiiHandle = NULL |
EFI_HANDLE mImageHandle = NULL |
Referenced by CloseVlanConfigProtocol(), OpenVlanConfigProtocol(), ShowNicVlanInfo(), and VlanConfigMain().
SHELL_PARAM_ITEM mParamList[] |
Initial value:
{ { L"-l", TypeValue }, { L"-a", TypeMaxValue }, { L"-d", TypeValue }, { NULL, TypeMax } }
Referenced by VlanConfigMain().
UINT8 VConfigStrings[] |
Referenced by VlanConfigMain().