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