Ip4NvData.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /** @file
  2. Routines used to operate the Ip4Dxe.
  3. Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef _IP4_NV_DATA_H_
  7. #define _IP4_NV_DATA_H_
  8. #include <Guid/Ip4Config2Hii.h>
  9. #define FORMID_MAIN_FORM 1
  10. #define FORMID_DEVICE_FORM 2
  11. #define KEY_ENABLE 0x100
  12. #define KEY_DHCP_ENABLE 0x101
  13. #define KEY_LOCAL_IP 0x102
  14. #define KEY_SUBNET_MASK 0x103
  15. #define KEY_GATE_WAY 0x104
  16. #define KEY_DNS 0x105
  17. #define KEY_SAVE_CHANGES 0x106
  18. #define IP_MIN_SIZE 7
  19. #define IP_MAX_SIZE 15
  20. #define IP4_STR_MAX_SIZE 16
  21. #define ADDRESS_STR_MAX_SIZE 255
  22. #define MAX_IP4_CONFIG_DNS 16
  23. ///
  24. /// IP4_CONFIG2_IFR_NVDATA contains the IP4 configure
  25. /// parameters for that NIC.
  26. ///
  27. typedef struct {
  28. UINT8 Configure; ///< NIC configure status
  29. UINT8 DhcpEnable; ///< Static or DHCP
  30. CHAR16 StationAddress[IP4_STR_MAX_SIZE]; ///< IP addresses
  31. CHAR16 SubnetMask[IP4_STR_MAX_SIZE]; ///< Subnet address
  32. CHAR16 GatewayAddress[IP4_STR_MAX_SIZE]; ///< Gateway address
  33. CHAR16 DnsAddress[ADDRESS_STR_MAX_SIZE]; ///< DNS server address
  34. } IP4_CONFIG2_IFR_NVDATA;
  35. #endif