TianoCore EDK2 master
Loading...
Searching...
No Matches
VlanConfigImpl.c
Go to the documentation of this file.
1
9#include "VlanConfigImpl.h"
10
11CHAR16 mVlanStorageName[] = L"VlanNvData";
12EFI_HII_CONFIG_ROUTING_PROTOCOL *mHiiConfigRouting = NULL;
13
14VLAN_CONFIG_PRIVATE_DATA mVlanConfigPrivateDateTemplate = {
15 VLAN_CONFIG_PRIVATE_DATA_SIGNATURE,
16 {
20 }
21};
22
23VENDOR_DEVICE_PATH mHiiVendorDevicePathNode = {
24 {
27 {
28 (UINT8)(sizeof (VENDOR_DEVICE_PATH)),
29 (UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8)
30 }
31 },
32 VLAN_CONFIG_FORM_SET_GUID
33};
34
62EFIAPI
65 IN CONST EFI_STRING Request,
66 OUT EFI_STRING *Progress,
67 OUT EFI_STRING *Results
68 )
69{
70 EFI_STATUS Status;
71 UINTN BufferSize;
72 VLAN_CONFIGURATION Configuration;
73 VLAN_CONFIG_PRIVATE_DATA *PrivateData;
74 EFI_STRING ConfigRequestHdr;
75 EFI_STRING ConfigRequest;
76 BOOLEAN AllocatedRequest;
77 UINTN Size;
78
79 if ((Progress == NULL) || (Results == NULL)) {
80 return EFI_INVALID_PARAMETER;
81 }
82
83 *Progress = Request;
84 if ((Request != NULL) && !HiiIsConfigHdrMatch (Request, &gVlanConfigFormSetGuid, mVlanStorageName)) {
85 return EFI_NOT_FOUND;
86 }
87
88 ConfigRequestHdr = NULL;
89 ConfigRequest = NULL;
90 AllocatedRequest = FALSE;
91 Size = 0;
92
93 //
94 // Retrieve the pointer to the UEFI HII Config Routing Protocol
95 //
96 if (mHiiConfigRouting == NULL) {
97 gBS->LocateProtocol (&gEfiHiiConfigRoutingProtocolGuid, NULL, (VOID **)&mHiiConfigRouting);
98 }
99
100 ASSERT (mHiiConfigRouting != NULL);
101
102 //
103 // Convert buffer data to <ConfigResp> by helper function BlockToConfig()
104 //
105 PrivateData = VLAN_CONFIG_PRIVATE_DATA_FROM_THIS (This);
106 ZeroMem (&Configuration, sizeof (VLAN_CONFIGURATION));
107 BufferSize = sizeof (Configuration);
108 ConfigRequest = Request;
109 if ((Request == NULL) || (StrStr (Request, L"OFFSET") == NULL)) {
110 //
111 // Request has no request element, construct full request string.
112 // Allocate and fill a buffer large enough to hold the <ConfigHdr> template
113 // followed by "&OFFSET=0&WIDTH=WWWWWWWWWWWWWWWW" followed by a Null-terminator
114 //
115 ConfigRequestHdr = HiiConstructConfigHdr (&gVlanConfigFormSetGuid, mVlanStorageName, PrivateData->DriverHandle);
116 Size = (StrLen (ConfigRequestHdr) + 32 + 1) * sizeof (CHAR16);
117 ConfigRequest = AllocateZeroPool (Size);
118 ASSERT (ConfigRequest != NULL);
119 AllocatedRequest = TRUE;
120 UnicodeSPrint (ConfigRequest, Size, L"%s&OFFSET=0&WIDTH=%016LX", ConfigRequestHdr, (UINT64)BufferSize);
121 FreePool (ConfigRequestHdr);
122 }
123
124 Status = mHiiConfigRouting->BlockToConfig (
125 mHiiConfigRouting,
126 ConfigRequest,
127 (UINT8 *)&Configuration,
128 BufferSize,
129 Results,
130 Progress
131 );
132 //
133 // Free the allocated config request string.
134 //
135 if (AllocatedRequest) {
136 FreePool (ConfigRequest);
137 ConfigRequest = NULL;
138 }
139
140 //
141 // Set Progress string to the original request string.
142 //
143 if (Request == NULL) {
144 *Progress = NULL;
145 } else if (StrStr (Request, L"OFFSET") == NULL) {
146 *Progress = Request + StrLen (Request);
147 }
148
149 return Status;
150}
151
171EFIAPI
174 IN CONST EFI_STRING Configuration,
175 OUT EFI_STRING *Progress
176 )
177{
178 if ((Configuration == NULL) || (Progress == NULL)) {
179 return EFI_INVALID_PARAMETER;
180 }
181
182 *Progress = Configuration;
183 if (!HiiIsConfigHdrMatch (Configuration, &gVlanConfigFormSetGuid, mVlanStorageName)) {
184 return EFI_NOT_FOUND;
185 }
186
187 *Progress = Configuration + StrLen (Configuration);
188 return EFI_SUCCESS;
189}
190
214EFIAPI
217 IN EFI_BROWSER_ACTION Action,
218 IN EFI_QUESTION_ID QuestionId,
219 IN UINT8 Type,
220 IN EFI_IFR_TYPE_VALUE *Value,
221 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
222 )
223{
224 VLAN_CONFIG_PRIVATE_DATA *PrivateData;
225 VLAN_CONFIGURATION *Configuration;
226 EFI_VLAN_CONFIG_PROTOCOL *VlanConfig;
227 UINTN Index;
228 EFI_HANDLE VlanHandle;
229
230 PrivateData = VLAN_CONFIG_PRIVATE_DATA_FROM_THIS (This);
231
232 if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) {
233 return EFI_SUCCESS;
234 }
235
236 if ((Action != EFI_BROWSER_ACTION_CHANGED) && (Action != EFI_BROWSER_ACTION_CHANGING)) {
237 //
238 // All other action return unsupported.
239 //
240 return EFI_UNSUPPORTED;
241 }
242
243 //
244 // Get Browser data
245 //
246 Configuration = AllocateZeroPool (sizeof (VLAN_CONFIGURATION));
247 ASSERT (Configuration != NULL);
248 HiiGetBrowserData (&gVlanConfigFormSetGuid, mVlanStorageName, sizeof (VLAN_CONFIGURATION), (UINT8 *)Configuration);
249
250 VlanConfig = PrivateData->VlanConfig;
251
252 if (Action == EFI_BROWSER_ACTION_CHANGED) {
253 switch (QuestionId) {
254 case VLAN_ADD_QUESTION_ID:
255 //
256 // Add a VLAN
257 //
258 VlanConfig->Set (VlanConfig, Configuration->VlanId, Configuration->Priority);
259 VlanUpdateForm (PrivateData);
260
261 //
262 // Connect the newly created VLAN device
263 //
264 VlanHandle = NetLibGetVlanHandle (PrivateData->ControllerHandle, Configuration->VlanId);
265 if (VlanHandle == NULL) {
266 //
267 // There may be no child handle created for VLAN ID 0, connect the parent handle
268 //
269 VlanHandle = PrivateData->ControllerHandle;
270 }
271
272 gBS->ConnectController (VlanHandle, NULL, NULL, TRUE);
273
274 //
275 // Clear UI data
276 //
277 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
278 Configuration->VlanId = 0;
279 Configuration->Priority = 0;
280 break;
281
282 case VLAN_REMOVE_QUESTION_ID:
283 //
284 // Remove VLAN
285 //
286 ASSERT (PrivateData->NumberOfVlan <= MAX_VLAN_NUMBER);
287 for (Index = 0; Index < PrivateData->NumberOfVlan; Index++) {
288 if (Configuration->VlanList[Index] != 0) {
289 //
290 // Checkbox is selected, need remove this VLAN
291 //
292 VlanConfig->Remove (VlanConfig, PrivateData->VlanId[Index]);
293 }
294 }
295
296 VlanUpdateForm (PrivateData);
297 if (PrivateData->NumberOfVlan == 0) {
298 //
299 // No VLAN device now, connect the physical NIC handle.
300 // Note: PrivateData->NumberOfVlan has been updated by VlanUpdateForm()
301 //
302 gBS->ConnectController (PrivateData->ControllerHandle, NULL, NULL, TRUE);
303 }
304
305 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
306 ZeroMem (Configuration->VlanList, MAX_VLAN_NUMBER);
307 break;
308
309 default:
310 break;
311 }
312 } else if (Action == EFI_BROWSER_ACTION_CHANGING) {
313 switch (QuestionId) {
314 case VLAN_UPDATE_QUESTION_ID:
315 //
316 // Update current VLAN list into Form.
317 //
318 VlanUpdateForm (PrivateData);
319 break;
320
321 default:
322 break;
323 }
324 }
325
326 HiiSetBrowserData (&gVlanConfigFormSetGuid, mVlanStorageName, sizeof (VLAN_CONFIGURATION), (UINT8 *)Configuration, NULL);
327 FreePool (Configuration);
328 return EFI_SUCCESS;
329}
330
337VOID
339 IN OUT VLAN_CONFIG_PRIVATE_DATA *PrivateData
340 )
341{
342 EFI_VLAN_CONFIG_PROTOCOL *VlanConfig;
343 UINT16 NumberOfVlan;
344 UINTN Index;
345 EFI_VLAN_FIND_DATA *VlanData;
346 VOID *StartOpCodeHandle;
347 EFI_IFR_GUID_LABEL *StartLabel;
348 VOID *EndOpCodeHandle;
349 EFI_IFR_GUID_LABEL *EndLabel;
350 CHAR16 *String;
351 CHAR16 VlanStr[30];
352 CHAR16 VlanIdStr[6];
353 UINTN DigitalCount;
354 EFI_STRING_ID StringId;
355
356 //
357 // Find current VLAN configuration
358 //
359 VlanData = NULL;
360 NumberOfVlan = 0;
361 VlanConfig = PrivateData->VlanConfig;
362 VlanConfig->Find (VlanConfig, NULL, &NumberOfVlan, &VlanData);
363
364 //
365 // Update VLAN configuration in PrivateData
366 //
367 if (NumberOfVlan > MAX_VLAN_NUMBER) {
368 NumberOfVlan = MAX_VLAN_NUMBER;
369 }
370
371 PrivateData->NumberOfVlan = NumberOfVlan;
372
373 //
374 // Init OpCode Handle
375 //
376 StartOpCodeHandle = HiiAllocateOpCodeHandle ();
377 ASSERT (StartOpCodeHandle != NULL);
378
379 EndOpCodeHandle = HiiAllocateOpCodeHandle ();
380 ASSERT (EndOpCodeHandle != NULL);
381
382 //
383 // Create Hii Extend Label OpCode as the start opcode
384 //
386 StartOpCodeHandle,
387 &gEfiIfrTianoGuid,
388 NULL,
389 sizeof (EFI_IFR_GUID_LABEL)
390 );
392 StartLabel->Number = LABEL_VLAN_LIST;
393
394 //
395 // Create Hii Extend Label OpCode as the end opcode
396 //
398 EndOpCodeHandle,
399 &gEfiIfrTianoGuid,
400 NULL,
401 sizeof (EFI_IFR_GUID_LABEL)
402 );
404 EndLabel->Number = LABEL_END;
405
406 ZeroMem (PrivateData->VlanId, MAX_VLAN_NUMBER);
407 for (Index = 0; Index < NumberOfVlan; Index++) {
408 String = VlanStr;
409
410 StrCpyS (String, (sizeof (VlanStr) /sizeof (CHAR16)), L" VLAN ID:");
411 String += 10;
412 //
413 // Pad VlanId string up to 4 characters with space
414 //
415 UnicodeValueToStringS (VlanIdStr, sizeof (VlanIdStr), 0, VlanData[Index].VlanId, 5);
416 DigitalCount = StrnLenS (VlanIdStr, ARRAY_SIZE (VlanIdStr));
417 SetMem16 (String, (4 - DigitalCount) * sizeof (CHAR16), L' ');
418 StrCpyS (String + 4 - DigitalCount, (sizeof (VlanStr) /sizeof (CHAR16)) - 10 - (4 - DigitalCount), VlanIdStr);
419 String += 4;
420
421 StrCpyS (String, (sizeof (VlanStr) /sizeof (CHAR16)) - 10 - (4 - DigitalCount) - 4, L", Priority:");
422 String += 11;
424 String,
425 sizeof (VlanStr) - ((UINTN)String - (UINTN)VlanStr),
426 0,
427 VlanData[Index].Priority,
428 4
429 );
430 String += StrnLenS (String, ARRAY_SIZE (VlanStr) - ((UINTN)String - (UINTN)VlanStr) / sizeof (CHAR16));
431 *String = 0;
432
433 StringId = HiiSetString (PrivateData->HiiHandle, 0, VlanStr, NULL);
434 ASSERT (StringId != 0);
435
437 StartOpCodeHandle,
438 (EFI_QUESTION_ID)(VLAN_LIST_VAR_OFFSET + Index),
439 VLAN_CONFIGURATION_VARSTORE_ID,
440 (UINT16)(VLAN_LIST_VAR_OFFSET + Index),
441 StringId,
442 STRING_TOKEN (STR_VLAN_VLAN_LIST_HELP),
443 0,
444 0,
445 NULL
446 );
447
448 //
449 // Save VLAN id to private data
450 //
451 PrivateData->VlanId[Index] = VlanData[Index].VlanId;
452 }
453
455 PrivateData->HiiHandle, // HII handle
456 &gVlanConfigFormSetGuid, // Formset GUID
457 VLAN_CONFIGURATION_FORM_ID, // Form ID
458 StartOpCodeHandle, // Label for where to insert opcodes
459 EndOpCodeHandle // Replace data
460 );
461
462 HiiFreeOpCodeHandle (StartOpCodeHandle);
463 HiiFreeOpCodeHandle (EndOpCodeHandle);
464
465 if (VlanData != NULL) {
466 FreePool (VlanData);
467 }
468}
469
484 IN OUT VLAN_CONFIG_PRIVATE_DATA *PrivateData
485 )
486{
487 EFI_STATUS Status;
488 EFI_HII_HANDLE HiiHandle;
489 EFI_HANDLE DriverHandle;
490 CHAR16 Str[26 + sizeof (EFI_MAC_ADDRESS) * 2 + 1];
491 CHAR16 *MacString;
492 EFI_DEVICE_PATH_PROTOCOL *ChildDevicePath;
493 EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;
494 EFI_VLAN_CONFIG_PROTOCOL *VlanConfig;
495
496 //
497 // Create child handle and install HII Config Access Protocol
498 //
499 ChildDevicePath = AppendDevicePathNode (
500 PrivateData->ParentDevicePath,
501 (CONST EFI_DEVICE_PATH_PROTOCOL *)&mHiiVendorDevicePathNode
502 );
503 if (ChildDevicePath == NULL) {
504 return EFI_OUT_OF_RESOURCES;
505 }
506
507 PrivateData->ChildDevicePath = ChildDevicePath;
508
509 DriverHandle = NULL;
510 ConfigAccess = &PrivateData->ConfigAccess;
511 Status = gBS->InstallMultipleProtocolInterfaces (
512 &DriverHandle,
513 &gEfiDevicePathProtocolGuid,
514 ChildDevicePath,
515 &gEfiHiiConfigAccessProtocolGuid,
516 ConfigAccess,
517 NULL
518 );
519 if (EFI_ERROR (Status)) {
520 return Status;
521 }
522
523 PrivateData->DriverHandle = DriverHandle;
524
525 //
526 // Establish the parent-child relationship between the new created
527 // child handle and the ControllerHandle.
528 //
529 Status = gBS->OpenProtocol (
530 PrivateData->ControllerHandle,
531 &gEfiVlanConfigProtocolGuid,
532 (VOID **)&VlanConfig,
533 PrivateData->ImageHandle,
534 PrivateData->DriverHandle,
535 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
536 );
537 if (EFI_ERROR (Status)) {
538 return Status;
539 }
540
541 //
542 // Publish the HII package list
543 //
544 HiiHandle = HiiAddPackages (
545 &gVlanConfigFormSetGuid,
546 DriverHandle,
547 VlanConfigDxeStrings,
548 VlanConfigBin,
549 NULL
550 );
551 if (HiiHandle == NULL) {
552 return EFI_OUT_OF_RESOURCES;
553 }
554
555 PrivateData->HiiHandle = HiiHandle;
556
557 //
558 // Update formset title help string.
559 //
560 MacString = NULL;
561 Status = NetLibGetMacString (PrivateData->ControllerHandle, PrivateData->ImageHandle, &MacString);
562 if (EFI_ERROR (Status)) {
563 return Status;
564 }
565
566 PrivateData->MacString = MacString;
567
568 StrCpyS (Str, sizeof (Str) / sizeof (CHAR16), L"VLAN Configuration (MAC:");
569 StrCatS (Str, sizeof (Str) / sizeof (CHAR16), MacString);
570 StrCatS (Str, sizeof (Str) / sizeof (CHAR16), L")");
572 HiiHandle,
573 STRING_TOKEN (STR_VLAN_FORM_SET_TITLE_HELP),
574 Str,
575 NULL
576 );
577
578 //
579 // Update form title help string.
580 //
582 HiiHandle,
583 STRING_TOKEN (STR_VLAN_FORM_HELP),
584 Str,
585 NULL
586 );
587
588 return EFI_SUCCESS;
589}
590
603 IN OUT VLAN_CONFIG_PRIVATE_DATA *PrivateData
604 )
605{
606 EFI_STATUS Status;
607 EFI_VLAN_CONFIG_PROTOCOL *VlanConfig;
608
609 //
610 // End the parent-child relationship.
611 //
612 Status = gBS->CloseProtocol (
613 PrivateData->ControllerHandle,
614 &gEfiVlanConfigProtocolGuid,
615 PrivateData->ImageHandle,
616 PrivateData->DriverHandle
617 );
618 if (EFI_ERROR (Status)) {
619 return Status;
620 }
621
622 //
623 // Uninstall HII Config Access Protocol
624 //
625 if (PrivateData->DriverHandle != NULL) {
626 Status = gBS->UninstallMultipleProtocolInterfaces (
627 PrivateData->DriverHandle,
628 &gEfiDevicePathProtocolGuid,
629 PrivateData->ChildDevicePath,
630 &gEfiHiiConfigAccessProtocolGuid,
631 &PrivateData->ConfigAccess,
632 NULL
633 );
634 if (EFI_ERROR (Status)) {
635 gBS->OpenProtocol (
636 PrivateData->ControllerHandle,
637 &gEfiVlanConfigProtocolGuid,
638 (VOID **)&VlanConfig,
639 PrivateData->ImageHandle,
640 PrivateData->DriverHandle,
641 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
642 );
643 return Status;
644 }
645
646 PrivateData->DriverHandle = NULL;
647
648 if (PrivateData->ChildDevicePath != NULL) {
649 FreePool (PrivateData->ChildDevicePath);
650 PrivateData->ChildDevicePath = NULL;
651 }
652 }
653
654 //
655 // Free MAC string
656 //
657 if (PrivateData->MacString != NULL) {
658 FreePool (PrivateData->MacString);
659 PrivateData->MacString = NULL;
660 }
661
662 //
663 // Uninstall HII package list
664 //
665 if (PrivateData->HiiHandle != NULL) {
666 HiiRemovePackages (PrivateData->HiiHandle);
667 PrivateData->HiiHandle = NULL;
668 }
669
670 return EFI_SUCCESS;
671}
UINT64 UINTN
RETURN_STATUS EFIAPI StrCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
Definition: SafeString.c:226
RETURN_STATUS EFIAPI StrCatS(IN OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
Definition: SafeString.c:405
UINTN EFIAPI StrnLenS(IN CONST CHAR16 *String, IN UINTN MaxSize)
Definition: SafeString.c:119
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
Definition: String.c:30
CHAR16 *EFIAPI StrStr(IN CONST CHAR16 *String, IN CONST CHAR16 *SearchString)
Definition: String.c:224
VOID *EFIAPI SetMem16(OUT VOID *Buffer, IN UINTN Length, IN UINT16 Value)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define HARDWARE_DEVICE_PATH
Definition: DevicePath.h:68
#define HW_VENDOR_DP
Definition: DevicePath.h:133
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STRING EFIAPI HiiConstructConfigHdr(IN CONST EFI_GUID *Guid OPTIONAL, IN CONST CHAR16 *Name OPTIONAL, IN EFI_HANDLE DriverHandle)
Definition: HiiLib.c:723
BOOLEAN EFIAPI HiiGetBrowserData(IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL, IN UINTN BufferSize, OUT UINT8 *Buffer)
Definition: HiiLib.c:2872
VOID *EFIAPI HiiAllocateOpCodeHandle(VOID)
Definition: HiiLib.c:3051
VOID EFIAPI HiiFreeOpCodeHandle(VOID *OpCodeHandle)
Definition: HiiLib.c:3085
EFI_HII_HANDLE EFIAPI HiiAddPackages(IN CONST EFI_GUID *PackageListGuid, IN EFI_HANDLE DeviceHandle OPTIONAL,...)
Definition: HiiLib.c:141
UINT8 *EFIAPI HiiCreateGuidOpCode(IN VOID *OpCodeHandle, IN CONST EFI_GUID *Guid, IN CONST VOID *GuidOpCode OPTIONAL, IN UINTN OpCodeSize)
Definition: HiiLib.c:3411
UINT8 *EFIAPI HiiCreateCheckBoxOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_VARSTORE_ID VarStoreId, IN UINT16 VarOffset, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN UINT8 CheckBoxFlags, IN VOID *DefaultsOpCodeHandle OPTIONAL)
Definition: HiiLib.c:3675
BOOLEAN EFIAPI HiiSetBrowserData(IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL, IN UINTN BufferSize, IN CONST UINT8 *Buffer, IN CONST CHAR16 *RequestElement OPTIONAL)
Definition: HiiLib.c:2954
EFI_STATUS EFIAPI HiiUpdateForm(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid OPTIONAL, IN EFI_FORM_ID FormId, IN VOID *StartOpCodeHandle, IN VOID *EndOpCodeHandle OPTIONAL)
Definition: HiiLib.c:4410
BOOLEAN EFIAPI HiiIsConfigHdrMatch(IN CONST EFI_STRING ConfigHdr, IN CONST EFI_GUID *Guid OPTIONAL, IN CONST CHAR16 *Name OPTIONAL)
Definition: HiiLib.c:2813
EFI_STRING_ID EFIAPI HiiSetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId OPTIONAL, IN CONST EFI_STRING String, IN CONST CHAR8 *SupportedLanguages OPTIONAL)
Definition: HiiString.c:52
VOID EFIAPI HiiRemovePackages(IN EFI_HII_HANDLE HiiHandle)
Definition: HiiLib.c:253
#define EFI_IFR_EXTEND_OP_LABEL
Definition: MdeModuleHii.h:33
RETURN_STATUS EFIAPI UnicodeValueToStringS(IN OUT CHAR16 *Buffer, IN UINTN BufferSize, IN UINTN Flags, IN INT64 Value, IN UINTN Width)
Definition: PrintLib.c:652
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
Definition: PrintLib.c:408
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define ARRAY_SIZE(Array)
Definition: Base.h:1393
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS EFIAPI NetLibGetMacString(IN EFI_HANDLE ServiceHandle, IN EFI_HANDLE ImageHandle OPTIONAL, OUT CHAR16 **MacString)
Definition: DxeNetLib.c:2363
EFI_HANDLE EFIAPI NetLibGetVlanHandle(IN EFI_HANDLE ControllerHandle, IN UINT16 VlanId)
Definition: DxeNetLib.c:2180
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_SERVICES * gBS
#define STRING_TOKEN(t)
VOID * EFI_HII_HANDLE
VOID VlanUpdateForm(IN OUT VLAN_CONFIG_PRIVATE_DATA *PrivateData)
EFI_STATUS EFIAPI VlanRouteConfig(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress)
EFI_STATUS UninstallVlanConfigForm(IN OUT VLAN_CONFIG_PRIVATE_DATA *PrivateData)
EFI_STATUS InstallVlanConfigForm(IN OUT VLAN_CONFIG_PRIVATE_DATA *PrivateData)
EFI_STATUS EFIAPI VlanCallback(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, IN UINT8 Type, IN EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest)
EFI_STATUS EFIAPI VlanExtractConfig(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results)
UINT16 VlanId
Vlan Identifier.
Definition: VlanConfig.h:26