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