summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.vfr
blob: 578045ffe29c1bd325927787ed24dabeb567b71f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/** @file
  Vfr file for IP4 config.

Copyright (c) 2009 - 2010, Intel Corporation.<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution.  The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

**/
#include "Ip4NvData.h"

#define EFI_NETWORK_DEVICE_CLASS  0x04

formset
  guid     = EFI_NIC_IP4_CONFIG_NVDATA_GUID,
  title    = STRING_TOKEN(STR_IP4_CONFIG_FORM_TITLE),
  help     = STRING_TOKEN(STR_IP4_CONFIG_FORM_HELP),
  class    = EFI_NETWORK_DEVICE_CLASS,
  subclass = 0x03,

  varstore IP4_CONFIG_IFR_NVDATA,
    name = EfiNicIp4ConfigVariable,
    guid = EFI_NIC_IP4_CONFIG_NVDATA_GUID;

  form formid = FORMID_MAIN_FORM,
    title  = STRING_TOKEN(STR_IP4_DEVICE_FORM_TITLE);

    checkbox varid = EfiNicIp4ConfigVariable.Configure,
            prompt = STRING_TOKEN(STR_IP4_CONFIGURE),
            help   = STRING_TOKEN(STR_IP4_CONFIGURE),
            flags  = INTERACTIVE,
            key    = KEY_ENABLE,
    endcheckbox;

    suppressif ideqval EfiNicIp4ConfigVariable.Configure == 0x00;

      checkbox varid = EfiNicIp4ConfigVariable.DhcpEnable,
              prompt = STRING_TOKEN(STR_IP4_ENABLE_DHCP),
              help   = STRING_TOKEN(STR_IP4_ENABLE_DHCP),
              flags  = INTERACTIVE,
              key    = KEY_DHCP_ENABLE,
      endcheckbox;
    endif;

    suppressif ideqval EfiNicIp4ConfigVariable.DhcpEnable == 0x01 OR ideqval EfiNicIp4ConfigVariable.Configure == 0x00;

      string  varid   = EfiNicIp4ConfigVariable.StationAddress,
              prompt  = STRING_TOKEN(STR_IP4_LOCAL_IP_ADDRESS),
              help    = STRING_TOKEN(STR_IP4_IP_ADDRESS_HELP),
              flags   = INTERACTIVE,
              key     = KEY_LOCAL_IP,
              minsize = IP_MIN_SIZE,
              maxsize = IP_MAX_SIZE,
      endstring;

      string  varid   = EfiNicIp4ConfigVariable.SubnetMask,
              prompt  = STRING_TOKEN(STR_IP4_LOCAL_MASK),
              help    = STRING_TOKEN(STR_IP4_IP_ADDRESS_HELP),
              flags   = INTERACTIVE,
              key     = KEY_SUBNET_MASK,
              minsize = IP_MIN_SIZE,
             maxsize = IP_MAX_SIZE,
      endstring;

      string  varid   = EfiNicIp4ConfigVariable.GatewayAddress,
              prompt  = STRING_TOKEN(STR_IP4_LOCAL_GATEWAY),
              help    = STRING_TOKEN(STR_IP4_IP_ADDRESS_HELP),
              flags   = INTERACTIVE,
              key     = KEY_GATE_WAY,
              minsize = IP_MIN_SIZE,
              maxsize = IP_MAX_SIZE,
      endstring;

    endif;

    subtitle text = STRING_TOKEN(STR_NULL);

    goto FORMID_DEVICE_FORM,
    prompt = STRING_TOKEN (STR_SAVE_CHANGES),
    help   = STRING_TOKEN (STR_SAVE_CHANGES),
    flags  = INTERACTIVE,
    key    = KEY_SAVE_CHANGES;

  endform;

endformset;