]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4NvData.h
MdeModulePkg: Fix IPv4 double free
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4NvData.h
CommitLineData
1f6729ff 1/** @file\r
2 Routines used to operate the Ip4Dxe.\r
3\r
4Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at<BR>\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _IP4_NV_DATA_H_\r
16#define _IP4_NV_DATA_H_\r
17\r
18#include <Guid/Ip4Config2Hii.h>\r
19\r
20#define FORMID_MAIN_FORM 1\r
21#define FORMID_DEVICE_FORM 2\r
22\r
23#define KEY_ENABLE 0x100\r
24#define KEY_DHCP_ENABLE 0x101\r
25#define KEY_LOCAL_IP 0x102\r
26#define KEY_SUBNET_MASK 0x103\r
27#define KEY_GATE_WAY 0x104\r
28#define KEY_DNS 0x105\r
29#define KEY_SAVE_CHANGES 0x106\r
30\r
31#define IP_MIN_SIZE 7\r
32#define IP_MAX_SIZE 15\r
33#define IP4_STR_MAX_SIZE 16\r
34#define ADDRESS_STR_MAX_SIZE 255\r
35#define MAX_IP4_CONFIG_DNS 16\r
36\r
37///\r
38/// IP4_CONFIG2_IFR_NVDATA contains the IP4 configure\r
39/// parameters for that NIC.\r
40///\r
41typedef struct {\r
42 UINT8 Configure; ///< NIC configure status\r
43 UINT8 DhcpEnable; ///< Static or DHCP\r
44 CHAR16 StationAddress[IP4_STR_MAX_SIZE]; ///< IP addresses\r
45 CHAR16 SubnetMask[IP4_STR_MAX_SIZE]; ///< Subnet address\r
46 CHAR16 GatewayAddress[IP4_STR_MAX_SIZE]; ///< Gateway address\r
47 CHAR16 DnsAddress[ADDRESS_STR_MAX_SIZE]; ///< DNS server address\r
48} IP4_CONFIG2_IFR_NVDATA;\r
49\r
50#endif\r
51\r