2 EFI VLAN Config protocol is to provide manageability interface for VLAN configuration.
4 Copyright (c) 2009, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __EFI_VLANCONFIG_PROTOCOL_H__
16 #define __EFI_VLANCONFIG_PROTOCOL_H__
19 #define EFI_VLAN_CONFIG_PROTOCOL_GUID \
21 0x9e23d768, 0xd2f3, 0x4366, {0x9f, 0xc3, 0x3a, 0x7a, 0xba, 0x86, 0x43, 0x74 } \
24 typedef struct _EFI_VLAN_CONFIG_PROTOCOL EFI_VLAN_CONFIG_PROTOCOL
;
28 /// EFI_VLAN_FIND_DATA
31 UINT16 VlanId
; ///< Vlan Identifier.
32 UINT8 Priority
; ///< Priority of this VLAN.
37 Create a VLAN device or modify the configuration parameter of an
38 already-configured VLAN.
40 The Set() function is used to create a new VLAN device or change the VLAN
41 configuration parameters. If the VlanId hasn't been configured in the
42 physical Ethernet device, a new VLAN device will be created. If a VLAN with
43 this VlanId is already configured, then related configuration will be updated
44 as the input parameters.
46 If VlanId is zero, the VLAN device will send and receive untagged frames.
47 Otherwise, the VLAN device will send and receive VLAN-tagged frames containing the VlanId.
48 If VlanId is out of scope of (0-4094), EFI_INVALID_PARAMETER is returned.
49 If Priority is out of the scope of (0-7), then EFI_INVALID_PARAMETER is returned.
50 If there is not enough system memory to perform the registration, then
51 EFI_OUT_OF_RESOURCES is returned.
53 @param[in] This Points to the EFI_VLAN_CONFIG_PROTOCOL.
54 @param[in] VlanId A unique identifier (1-4094) of the VLAN which is being created
55 or modified, or zero (0).
56 @param[in] Priority 3 bit priority in VLAN header. Priority 0 is default value. If
57 VlanId is zero (0), Priority is ignored.
59 @retval EFI_SUCCESS The VLAN is successfully configured.
60 @retval EFI_INVALID_PARAMETER One or more of following conditions is TRUE:
62 - VlanId is an invalid VLAN Identifier.
63 - Priority is invalid.
64 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to perform the registration.
69 (EFIAPI
*EFI_VLAN_CONFIG_SET
)(
70 IN EFI_VLAN_CONFIG_PROTOCOL
*This
,
76 Find configuration information for specified VLAN or all configured VLANs.
78 The Find() function is used to find the configuration information for matching
79 VLAN and allocate a buffer into which those entries are copied.
81 @param[in] This Points to the EFI_VLAN_CONFIG_PROTOCOL.
82 @param[in] VlanId Pointer to VLAN identifier. Set to NULL to find all
84 @param[out] NumberOfVlan The number of VLANs which is found by the specified criteria.
85 @param[out] Entries The buffer which receive the VLAN configuration.
87 @retval EFI_SUCCESS The VLAN is successfully found.
88 @retval EFI_INVALID_PARAMETER One or more of following conditions is TRUE:
90 - Specified VlanId is invalid.
91 @retval EFI_NOT_FOUND No matching VLAN is found.
96 (EFIAPI
*EFI_VLAN_CONFIG_FIND
)(
97 IN EFI_VLAN_CONFIG_PROTOCOL
*This
,
98 IN UINT16
*VlanId OPTIONAL
,
99 OUT UINT16
*NumberOfVlan
,
100 OUT EFI_VLAN_FIND_DATA
**Entries
104 Remove the configured VLAN device.
106 The Remove() function is used to remove the specified VLAN device.
107 If the VlanId is out of the scope of (0-4094), EFI_INVALID_PARAMETER is returned.
108 If specified VLAN hasn't been previously configured, EFI_NOT_FOUND is returned.
110 @param[in] This Points to the EFI_VLAN_CONFIG_PROTOCOL.
111 @param[in] VlanId Identifier (0-4094) of the VLAN to be removed.
113 @retval EFI_SUCCESS The VLAN is successfully removed.
114 @retval EFI_INVALID_PARAMETER One or more of following conditions is TRUE:
116 - VlanId is an invalid parameter.
117 @retval EFI_NOT_FOUND The to-be-removed VLAN does not exist.
122 (EFIAPI
*EFI_VLAN_CONFIG_REMOVE
)(
123 IN EFI_VLAN_CONFIG_PROTOCOL
*This
,
128 /// EFI_VLAN_CONFIG_PROTOCOL
129 /// provide manageability interface for VLAN setting. The intended
130 /// VLAN tagging implementation is IEEE802.1Q.
132 struct _EFI_VLAN_CONFIG_PROTOCOL
{
133 EFI_VLAN_CONFIG_SET Set
;
134 EFI_VLAN_CONFIG_FIND Find
;
135 EFI_VLAN_CONFIG_REMOVE Remove
;
138 extern EFI_GUID gEfiVlanConfigProtocolGuid
;