1 | /** @file
|
---|
2 | This file defines NIC_IP4_CONFIG_INFO structure.
|
---|
3 |
|
---|
4 | Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
---|
5 | This program and the accompanying materials are licensed and made available under
|
---|
6 | the terms and conditions of the BSD License that accompanies this distribution.
|
---|
7 | The full text of the license may be found at
|
---|
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 __NIC_IP4_CONFIG_NVDATA_H__
|
---|
16 | #define __NIC_IP4_CONFIG_NVDATA_H__
|
---|
17 |
|
---|
18 | #include <Protocol/Ip4Config.h>
|
---|
19 |
|
---|
20 | #define EFI_NIC_IP4_CONFIG_VARIABLE_GUID \
|
---|
21 | { \
|
---|
22 | 0xd8944553, 0xc4dd, 0x41f4, { 0x9b, 0x30, 0xe1, 0x39, 0x7c, 0xfb, 0x26, 0x7b } \
|
---|
23 | }
|
---|
24 |
|
---|
25 | #define EFI_NIC_IP4_CONFIG_VARIABLE L"EfiNicIp4ConfigVariable"
|
---|
26 |
|
---|
27 |
|
---|
28 | //
|
---|
29 | // Config source: dhcp or static
|
---|
30 | //
|
---|
31 | #define IP4_CONFIG_SOURCE_DHCP 0
|
---|
32 | #define IP4_CONFIG_SOURCE_STATIC 1
|
---|
33 | #define IP4_CONFIG_SOURCE_MAX 2
|
---|
34 |
|
---|
35 | #define IP4_NIC_NAME_LENGTH 64
|
---|
36 | #define MAX_IP4_CONFIG_IN_VARIABLE 16
|
---|
37 |
|
---|
38 | //
|
---|
39 | // The following structures are used by drivers/applications other
|
---|
40 | // than EFI_IP4_PROTOCOL, such as the ifconfig shell application, to
|
---|
41 | // communicate the IP configuration information to the EFI_IP4_CONFIG_PROTOCOL.
|
---|
42 | // The EFI_IP4_PROTOCOL uses the EFI_IP4_CONFIG_PROTOCOL to get
|
---|
43 | // the default IP4 configuration.
|
---|
44 | //
|
---|
45 |
|
---|
46 | ///
|
---|
47 | /// NIC_ADDR contains the interface's type and MAC address to identify
|
---|
48 | /// a specific NIC.
|
---|
49 | ///
|
---|
50 | typedef struct {
|
---|
51 | UINT16 Type; ///< Interface type.
|
---|
52 | UINT8 Len; ///< Length of MAC address.
|
---|
53 | EFI_MAC_ADDRESS MacAddr; ///< MAC address of interface.
|
---|
54 | } NIC_ADDR;
|
---|
55 |
|
---|
56 | ///
|
---|
57 | /// NIC_IP4_CONFIG_INFO contains the IP4 configure
|
---|
58 | /// parameters for that NIC. NIC_IP4_CONFIG_INFO is
|
---|
59 | /// of variable length.
|
---|
60 | ///
|
---|
61 | typedef struct {
|
---|
62 | NIC_ADDR NicAddr; ///< Link layer address to identify the NIC.
|
---|
63 | UINT32 Source; ///< Static or DHCP.
|
---|
64 | BOOLEAN Perment; ///< Survive the reboot or not.
|
---|
65 | EFI_IP4_IPCONFIG_DATA Ip4Info; ///< IP addresses.
|
---|
66 | } NIC_IP4_CONFIG_INFO;
|
---|
67 |
|
---|
68 | extern EFI_GUID gEfiNicIp4ConfigVariableGuid;
|
---|
69 |
|
---|
70 | #endif
|
---|