]> git.proxmox.com Git - mirror_edk2.git/commitdiff
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3404 6f19259b...
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Jul 2007 09:10:37 +0000 (09:10 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Jul 2007 09:10:37 +0000 (09:10 +0000)
MdeModulePkg/Include/Protocol/NicIp4Config.h [new file with mode: 0644]
MdeModulePkg/MdeModulePkg.dec

diff --git a/MdeModulePkg/Include/Protocol/NicIp4Config.h b/MdeModulePkg/Include/Protocol/NicIp4Config.h
new file mode 100644 (file)
index 0000000..cf8cf27
--- /dev/null
@@ -0,0 +1,123 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+  NicIp4Config.h\r
+\r
+Abstract:\r
+\r
+--*/\r
+\r
+#ifndef __NIC_IP4_CONFIG_H__\r
+#define __NIC_IP4_CONFIG_H__\r
+\r
+#include <Protocol/Ip4Config.h>\r
+\r
+\r
+#define EFI_NIC_IP4_CONFIG_PROTOCOL_GUID \\r
+  { \\r
+    0xdca3d4d, 0x12da, 0x4728, { 0xbf, 0x7e, 0x86, 0xce, 0xb9, 0x28, 0xd0, 0x67 } \\r
+  }\r
+\r
+#define EFI_NIC_IP4_CONFIG_VARIABLE_GUID \\r
+  { \\r
+    0xd8944553, 0xc4dd, 0x41f4, { 0x9b, 0x30, 0xe1, 0x39, 0x7c, 0xfb, 0x26, 0x7b } \\r
+  }\r
+\r
+#define EFI_NIC_IP4_CONFIG_VARIABLE          L"EfiNicIp4ConfigVariable"\r
+\r
+\r
+typedef struct _EFI_NIC_IP4_CONFIG_PROTOCOL EFI_NIC_IP4_CONFIG_PROTOCOL;\r
+\r
+typedef enum {\r
+  //\r
+  // Config source: dhcp or static\r
+  //\r
+  IP4_CONFIG_SOURCE_DHCP     = 0,\r
+  IP4_CONFIG_SOURCE_STATIC,\r
+  IP4_CONFIG_SOURCE_MAX,\r
+\r
+  IP4_NIC_NAME_LENGTH        = 64,\r
+  MAX_IP4_CONFIG_IN_VARIABLE = 16,\r
+};\r
+\r
+//\r
+// The following structures are used by drivers/applications other\r
+// than EFI_IP4_PROTOCOL, such as ifconfig shell application, to\r
+// communicate the IP configuration information to EFI_IP4_CONFIG_PROTOCOL.\r
+// EFI_IP4_CONFIG_PROTOCOL in turn is used by EFI_IP4_PROTOCOL to get\r
+// the default IP4 configuration. ifconfig can't use the EFI_IP4_PROTOCOL\r
+// because it don't know how to configure the default IP address even\r
+// it has got the address.\r
+//\r
+// NIC_ADDR contains the interface's type and MAC address to identify\r
+// a specific NIC. NIC_IP4_CONFIG_INFO contains the IP4 configure\r
+// parameters for that NIC. IP4_CONFIG_VARIABLE is the EFI variable to\r
+// save the configuration. NIC_IP4_CONFIG_INFO and IP4_CONFIG_VARIABLE\r
+// is of variable length.\r
+//\r
+// EFI_NIC_IP4_CONFIG_PROTOCOL is a priority protocol, not defined by UEFI2.0\r
+//\r
+typedef struct {\r
+  UINT16                    Type;\r
+  UINT8                     Len;\r
+  EFI_MAC_ADDRESS           MacAddr;\r
+} NIC_ADDR;\r
+\r
+typedef struct {\r
+  NIC_ADDR                  NicAddr;    // Link layer address to identify the NIC\r
+  UINT32                    Source;     // Static or DHCP\r
+  BOOLEAN                   Perment;    // Survive the reboot or not\r
+  EFI_IP4_IPCONFIG_DATA     Ip4Info;    // IP addresses\r
+} NIC_IP4_CONFIG_INFO;\r
+\r
+typedef struct {\r
+  UINT32                    Len;        // Total length of the variable\r
+  UINT16                    CheckSum;   // CheckSum, the same as IP4 head checksum\r
+  UINT32                    Count;      // Number of NIC_IP4_CONFIG_INFO follows\r
+  NIC_IP4_CONFIG_INFO       ConfigInfo;\r
+} IP4_CONFIG_VARIABLE;\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_NIC_IP4_CONFIG_GET_INFO) (\r
+  IN EFI_NIC_IP4_CONFIG_PROTOCOL  *This,\r
+  IN OUT UINTN                    *Len,\r
+  OUT NIC_IP4_CONFIG_INFO         *NicConfig     OPTIONAL\r
+  );\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_NIC_IP4_CONFIG_SET_INFO) (\r
+  IN EFI_NIC_IP4_CONFIG_PROTOCOL  *This,\r
+  IN NIC_IP4_CONFIG_INFO          *NicConfig,    OPTIONAL\r
+  IN BOOLEAN                      ReConfig\r
+  );\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_NIC_IP4_CONFIG_GET_NAME) (\r
+  IN  EFI_NIC_IP4_CONFIG_PROTOCOL *This,\r
+  IN  UINT16                      *Name,         OPTIONAL\r
+  IN  NIC_ADDR                    *NicAddr       OPTIONAL\r
+  );\r
+\r
+typedef\r
+struct _EFI_NIC_IP4_CONFIG_PROTOCOL {\r
+  EFI_NIC_IP4_CONFIG_GET_NAME     GetName;\r
+  EFI_NIC_IP4_CONFIG_GET_INFO     GetInfo;\r
+  EFI_NIC_IP4_CONFIG_SET_INFO     SetInfo;\r
+};\r
+\r
+extern EFI_GUID gEfiNicIp4ConfigVariableGuid;\r
+extern EFI_GUID gEfiNicIp4ConfigProtocolGuid;\r
+#endif\r
index 6b91998d6df87cd46c96e7f4f6cd2b49b092035d..72f58a1fb68c25e78aa9443720e9f55500a451d6 100644 (file)
@@ -77,6 +77,9 @@
   gEfiTianoDecompressProtocolGuid = { 0xE84CF29C, 0x191F, 0x4EAE, { 0x96, 0xE1, 0xF4, 0x6A, 0xEC, 0xEA, 0xEA, 0x0B }}\r
   gEfiCustomizedDecompressProtocolGuid = { 0x9A44198E, 0xA4A2, 0x44E6, { 0x8A, 0x1F, 0x39, 0xBE, 0xFD, 0xAC, 0x89, 0x6F }}\r
 \r
+  gEfiNicIp4ConfigProtocolGuid = {0xdca3d4d, 0x12da, 0x4728, { 0xbf, 0x7e, 0x86, 0xce, 0xb9, 0x28, 0xd0, 0x67 }}\r
+  gEfiNicIp4ConfigVariableGuid = {0xd8944553, 0xc4dd, 0x41f4, { 0x9b, 0x30, 0xe1, 0x39, 0x7c, 0xfb, 0x26, 0x7b }}\r
+\r
 [Ppis.common]\r
   gPeiBaseMemoryTestPpiGuid      = { 0xB6EC423C, 0x21D2, 0x490D, { 0x85, 0xC6, 0xDD, 0x58, 0x64, 0xEA, 0xA6, 0x74 }}\r
 \r