• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   Routines used to operate the Ip4Dxe.
3 
4 Copyright (c) 2015, 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<BR>
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 **/
14 
15 #ifndef _IP4_NV_DATA_H_
16 #define _IP4_NV_DATA_H_
17 
18 #include <Guid/Ip4Config2Hii.h>
19 
20 #define FORMID_MAIN_FORM    1
21 #define FORMID_DEVICE_FORM  2
22 
23 #define KEY_ENABLE                0x100
24 #define KEY_DHCP_ENABLE           0x101
25 #define KEY_LOCAL_IP              0x102
26 #define KEY_SUBNET_MASK           0x103
27 #define KEY_GATE_WAY              0x104
28 #define KEY_DNS                   0x105
29 #define KEY_SAVE_CHANGES          0x106
30 
31 #define IP_MIN_SIZE               7
32 #define IP_MAX_SIZE               15
33 #define IP4_STR_MAX_SIZE          16
34 #define ADDRESS_STR_MAX_SIZE      255
35 #define MAX_IP4_CONFIG_DNS        16
36 
37 ///
38 /// IP4_CONFIG2_IFR_NVDATA contains the IP4 configure
39 /// parameters for that NIC.
40 ///
41 typedef struct {
42   UINT8           Configure;                         ///< NIC configure status
43   UINT8           DhcpEnable;                        ///< Static or DHCP
44   CHAR16          StationAddress[IP4_STR_MAX_SIZE];  ///< IP addresses
45   CHAR16          SubnetMask[IP4_STR_MAX_SIZE];      ///< Subnet address
46   CHAR16          GatewayAddress[IP4_STR_MAX_SIZE];  ///< Gateway address
47   CHAR16          DnsAddress[ADDRESS_STR_MAX_SIZE];  ///< DNS server address
48 } IP4_CONFIG2_IFR_NVDATA;
49 
50 #endif
51 
52