iPXE
VlanConfig.h
Go to the documentation of this file.
1 /** @file
2  EFI VLAN Config protocol is to provide manageability interface for VLAN configuration.
3 
4  Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
5  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
9 
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.
12 
13  @par Revision Reference:
14  This Protocol is introduced in UEFI Specification 2.2
15 
16 **/
17 
18 #ifndef __EFI_VLANCONFIG_PROTOCOL_H__
19 #define __EFI_VLANCONFIG_PROTOCOL_H__
20 
21 FILE_LICENCE ( BSD3 );
22 
23 
24 #define EFI_VLAN_CONFIG_PROTOCOL_GUID \
25  { \
26  0x9e23d768, 0xd2f3, 0x4366, {0x9f, 0xc3, 0x3a, 0x7a, 0xba, 0x86, 0x43, 0x74 } \
27  }
28 
30 
31 
32 ///
33 /// EFI_VLAN_FIND_DATA
34 ///
35 typedef struct {
36  UINT16 VlanId; ///< Vlan Identifier.
37  UINT8 Priority; ///< Priority of this VLAN.
39 
40 
41 /**
42  Create a VLAN device or modify the configuration parameter of an
43  already-configured VLAN.
44 
45  The Set() function is used to create a new VLAN device or change the VLAN
46  configuration parameters. If the VlanId hasn't been configured in the
47  physical Ethernet device, a new VLAN device will be created. If a VLAN with
48  this VlanId is already configured, then related configuration will be updated
49  as the input parameters.
50 
51  If VlanId is zero, the VLAN device will send and receive untagged frames.
52  Otherwise, the VLAN device will send and receive VLAN-tagged frames containing the VlanId.
53  If VlanId is out of scope of (0-4094), EFI_INVALID_PARAMETER is returned.
54  If Priority is out of the scope of (0-7), then EFI_INVALID_PARAMETER is returned.
55  If there is not enough system memory to perform the registration, then
56  EFI_OUT_OF_RESOURCES is returned.
57 
58  @param[in] This Points to the EFI_VLAN_CONFIG_PROTOCOL.
59  @param[in] VlanId A unique identifier (1-4094) of the VLAN which is being created
60  or modified, or zero (0).
61  @param[in] Priority 3 bit priority in VLAN header. Priority 0 is default value. If
62  VlanId is zero (0), Priority is ignored.
63 
64  @retval EFI_SUCCESS The VLAN is successfully configured.
65  @retval EFI_INVALID_PARAMETER One or more of following conditions is TRUE:
66  - This is NULL.
67  - VlanId is an invalid VLAN Identifier.
68  - Priority is invalid.
69  @retval EFI_OUT_OF_RESOURCES There is not enough system memory to perform the registration.
70 
71 **/
72 typedef
76  IN UINT16 VlanId,
77  IN UINT8 Priority
78  );
79 
80 /**
81  Find configuration information for specified VLAN or all configured VLANs.
82 
83  The Find() function is used to find the configuration information for matching
84  VLAN and allocate a buffer into which those entries are copied.
85 
86  @param[in] This Points to the EFI_VLAN_CONFIG_PROTOCOL.
87  @param[in] VlanId Pointer to VLAN identifier. Set to NULL to find all
88  configured VLANs.
89  @param[out] NumberOfVlan The number of VLANs which is found by the specified criteria.
90  @param[out] Entries The buffer which receive the VLAN configuration.
91 
92  @retval EFI_SUCCESS The VLAN is successfully found.
93  @retval EFI_INVALID_PARAMETER One or more of following conditions is TRUE:
94  - This is NULL.
95  - Specified VlanId is invalid.
96  @retval EFI_NOT_FOUND No matching VLAN is found.
97 
98 **/
99 typedef
103  IN UINT16 *VlanId OPTIONAL,
104  OUT UINT16 *NumberOfVlan,
105  OUT EFI_VLAN_FIND_DATA **Entries
106  );
107 
108 /**
109  Remove the configured VLAN device.
110 
111  The Remove() function is used to remove the specified VLAN device.
112  If the VlanId is out of the scope of (0-4094), EFI_INVALID_PARAMETER is returned.
113  If specified VLAN hasn't been previously configured, EFI_NOT_FOUND is returned.
114 
115  @param[in] This Points to the EFI_VLAN_CONFIG_PROTOCOL.
116  @param[in] VlanId Identifier (0-4094) of the VLAN to be removed.
117 
118  @retval EFI_SUCCESS The VLAN is successfully removed.
119  @retval EFI_INVALID_PARAMETER One or more of following conditions is TRUE:
120  - This is NULL.
121  - VlanId is an invalid parameter.
122  @retval EFI_NOT_FOUND The to-be-removed VLAN does not exist.
123 
124 **/
125 typedef
129  IN UINT16 VlanId
130  );
131 
132 ///
133 /// EFI_VLAN_CONFIG_PROTOCOL
134 /// provide manageability interface for VLAN setting. The intended
135 /// VLAN tagging implementation is IEEE802.1Q.
136 ///
141 };
142 
144 
145 #endif
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
Definition: Base.h:340
128 bit buffer containing a unique identifier value.
Definition: Base.h:263
unsigned char UINT8
Definition: ProcessorBind.h:62
UINT16 VlanId
Vlan Identifier.
Definition: VlanConfig.h:36
EFI_GUID gEfiVlanConfigProtocolGuid
EFI_VLAN_CONFIG_SET Set
Definition: VlanConfig.h:138
#define OUT
Definition: mlx_utils.h:29
EFI_VLAN_CONFIG_FIND Find
Definition: VlanConfig.h:139
unsigned short UINT16
Definition: ProcessorBind.h:58
#define EFIAPI
EFI_VLAN_CONFIG_PROTOCOL provide manageability interface for VLAN setting.
Definition: VlanConfig.h:137
EFI_VLAN_FIND_DATA.
Definition: VlanConfig.h:35
EFI_STATUS(EFIAPI * EFI_VLAN_CONFIG_REMOVE)(IN EFI_VLAN_CONFIG_PROTOCOL *This, IN UINT16 VlanId)
Remove the configured VLAN device.
Definition: VlanConfig.h:127
#define IN
Definition: mlx_utils.h:28
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:35
EFI_STATUS(EFIAPI * EFI_VLAN_CONFIG_FIND)(IN EFI_VLAN_CONFIG_PROTOCOL *This, IN UINT16 *VlanId OPTIONAL, OUT UINT16 *NumberOfVlan, OUT EFI_VLAN_FIND_DATA **Entries)
Find configuration information for specified VLAN or all configured VLANs.
Definition: VlanConfig.h:101
EFI_STATUS(EFIAPI * EFI_VLAN_CONFIG_SET)(IN EFI_VLAN_CONFIG_PROTOCOL *This, IN UINT16 VlanId, IN UINT8 Priority)
Create a VLAN device or modify the configuration parameter of an already-configured VLAN.
Definition: VlanConfig.h:74
UINT8 Priority
Priority of this VLAN.
Definition: VlanConfig.h:37
FILE_LICENCE(BSD3)
EFI_VLAN_CONFIG_REMOVE Remove
Definition: VlanConfig.h:140