]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h
remove member context from _EFI_MTFTP4_TOKEN structure.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Dhcp4Dxe / Dhcp4Impl.h
index d81d68fa1e20a6cf1278753306046c015acd3918..7a04109f4db82e0f82dd33ee75c7f73d721bd674 100644 (file)
@@ -1,34 +1,34 @@
-/** @file
-
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution.  The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
-  Dhcp4Impl.h
-
-Abstract:
-
-  EFI DHCP protocol implementation
-  RFCs supported are:
-  RFC 2131: Dynamic Host Configuration Protocol
-  RFC 2132: DHCP Options and BOOTP Vendor Extensions
-  RFC 1534: Interoperation Between DHCP and BOOTP
-  RFC 3396: Encoding Long Options in DHCP
-
-
-**/
-
-#ifndef __EFI_DHCP4_IMPL_H__
-#define __EFI_DHCP4_IMPL_H__
-
-
+/** @file\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
+  Dhcp4Impl.h\r
+\r
+Abstract:\r
+\r
+  EFI DHCP protocol implementation\r
+  RFCs supported are:\r
+  RFC 2131: Dynamic Host Configuration Protocol\r
+  RFC 2132: DHCP Options and BOOTP Vendor Extensions\r
+  RFC 1534: Interoperation Between DHCP and BOOTP\r
+  RFC 3396: Encoding Long Options in DHCP\r
+\r
+\r
+**/\r
+\r
+#ifndef __EFI_DHCP4_IMPL_H__\r
+#define __EFI_DHCP4_IMPL_H__\r
+\r
+\r
 \r
 #include <PiDxe.h>\r
 \r
@@ -39,121 +39,121 @@ Abstract:
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiLib.h>\r
-#include <Library/BaseLib.h>
-#include <Library/NetLib.h>
-
-typedef struct _DHCP_SERVICE  DHCP_SERVICE;
-typedef struct _DHCP_PROTOCOL DHCP_PROTOCOL;
-
-#include "Dhcp4Option.h"
-#include "Dhcp4Io.h"
-
-enum {
-  DHCP_SERVICE_SIGNATURE  = EFI_SIGNATURE_32 ('D', 'H', 'C', 'P'),
-  DHCP_PROTOCOL_SIGNATURE = EFI_SIGNATURE_32 ('d', 'h', 'c', 'p'),
-
-  //
-  // The state of the DHCP service. It starts as UNCONFIGED. If
-  // and active child configures the service successfully, it
-  // goes to CONFIGED. If the active child configures NULL, it
-  // goes back to UNCONFIGED. It becomes DESTORY if it is (partly)
-  // destoried.
-  //
-  DHCP_UNCONFIGED         = 0,
-  DHCP_CONFIGED,
-  DHCP_DESTORY
-};
-
-struct _DHCP_PROTOCOL {
-  UINT32                            Signature;
-  EFI_DHCP4_PROTOCOL                Dhcp4Protocol;
-  NET_LIST_ENTRY                    Link;
-  EFI_HANDLE                        Handle;
-  DHCP_SERVICE                      *Service;
-
-  BOOLEAN                           InDestory;
-
-  EFI_EVENT                         CompletionEvent;
-  EFI_EVENT                         RenewRebindEvent;
-
-  EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN  *Token;
-};
-
-//
-// DHCP driver is specical in that it is a singleton. Although it
-// has a service binding, there can be only one active child.
-//
-struct _DHCP_SERVICE {
-  UINT32                        Signature;
-  EFI_SERVICE_BINDING_PROTOCOL  ServiceBinding;
-
-  INTN                          ServiceState; // CONFIGED, UNCONFIGED, and DESTORY
-  BOOLEAN                       InDestory;
-
-  EFI_HANDLE                    Controller;
-  EFI_HANDLE                    Image;
-
-  NET_LIST_ENTRY                Children;
-  UINTN                         NumChildren;
-
-  INTN                          DhcpState;
-  EFI_STATUS                    IoStatus;     // the result of last user operation
-  UINT32                        Xid;
-
-  IP4_ADDR                      ClientAddr;   // lease IP or configured client address
-  IP4_ADDR                      Netmask;
-  IP4_ADDR                      ServerAddr;
-
-  EFI_DHCP4_PACKET              *LastOffer;   // The last received offer
-  EFI_DHCP4_PACKET              *Selected;
-  DHCP_PARAMETER                *Para;
-
-  UINT32                        Lease;
-  UINT32                        T1;
-  UINT32                        T2;
-  INTN                          ExtraRefresh; // This refresh is reqested by user
-
-  UDP_IO_PORT                   *UdpIo;       // Udp child receiving all DHCP message
-  UDP_IO_PORT                   *LeaseIoPort; // Udp child with lease IP
-  NET_BUF                       *LastPacket;  // The last sent packet for retransmission
-  EFI_MAC_ADDRESS               Mac;
-  UINT8                         HwType;
-  UINT8                         HwLen;
-
-  DHCP_PROTOCOL                 *ActiveChild;
-  EFI_DHCP4_CONFIG_DATA         ActiveConfig;
-  UINT32                        UserOptionLen;
-
-  //
-  // Timer event and various timer
-  //
-  EFI_EVENT                     Timer;
-
-  UINT32                        PacketToLive; // Retransmission timer for our packets
-  INTN                          CurRetry;
-  INTN                          MaxRetries;
-
-  UINT32                        WaitOffer;    // Time to collect the offers
-  UINT32                        LeaseLife;
-};
-
-typedef struct {
-  EFI_DHCP4_PACKET_OPTION       **Option;
-  UINT32                        OptionCount;
-  UINT32                        Index;
-} DHCP_PARSE_CONTEXT;
-
-#define DHCP_INSTANCE_FROM_THIS(Proto)  \
-  CR ((Proto), DHCP_PROTOCOL, Dhcp4Protocol, DHCP_PROTOCOL_SIGNATURE)
-
-#define DHCP_SERVICE_FROM_THIS(Sb)      \
-  CR ((Sb), DHCP_SERVICE, ServiceBinding, DHCP_SERVICE_SIGNATURE)
-
-extern EFI_DHCP4_PROTOCOL mDhcp4ProtocolTemplate;
-
-VOID
-DhcpYieldControl (
-  IN DHCP_SERVICE         *DhcpSb
-  );
-
-#endif
+#include <Library/BaseLib.h>\r
+#include <Library/NetLib.h>\r
+\r
+typedef struct _DHCP_SERVICE  DHCP_SERVICE;\r
+typedef struct _DHCP_PROTOCOL DHCP_PROTOCOL;\r
+\r
+#include "Dhcp4Option.h"\r
+#include "Dhcp4Io.h"\r
+\r
+enum {\r
+  DHCP_SERVICE_SIGNATURE  = EFI_SIGNATURE_32 ('D', 'H', 'C', 'P'),\r
+  DHCP_PROTOCOL_SIGNATURE = EFI_SIGNATURE_32 ('d', 'h', 'c', 'p'),\r
+\r
+  //\r
+  // The state of the DHCP service. It starts as UNCONFIGED. If\r
+  // and active child configures the service successfully, it\r
+  // goes to CONFIGED. If the active child configures NULL, it\r
+  // goes back to UNCONFIGED. It becomes DESTORY if it is (partly)\r
+  // destoried.\r
+  //\r
+  DHCP_UNCONFIGED         = 0,\r
+  DHCP_CONFIGED,\r
+  DHCP_DESTORY\r
+};\r
+\r
+struct _DHCP_PROTOCOL {\r
+  UINT32                            Signature;\r
+  EFI_DHCP4_PROTOCOL                Dhcp4Protocol;\r
+  NET_LIST_ENTRY                    Link;\r
+  EFI_HANDLE                        Handle;\r
+  DHCP_SERVICE                      *Service;\r
+\r
+  BOOLEAN                           InDestory;\r
+\r
+  EFI_EVENT                         CompletionEvent;\r
+  EFI_EVENT                         RenewRebindEvent;\r
+\r
+  EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN  *Token;\r
+};\r
+\r
+//\r
+// DHCP driver is specical in that it is a singleton. Although it\r
+// has a service binding, there can be only one active child.\r
+//\r
+struct _DHCP_SERVICE {\r
+  UINT32                        Signature;\r
+  EFI_SERVICE_BINDING_PROTOCOL  ServiceBinding;\r
+\r
+  INTN                          ServiceState; // CONFIGED, UNCONFIGED, and DESTORY\r
+  BOOLEAN                       InDestory;\r
+\r
+  EFI_HANDLE                    Controller;\r
+  EFI_HANDLE                    Image;\r
+\r
+  NET_LIST_ENTRY                Children;\r
+  UINTN                         NumChildren;\r
+\r
+  INTN                          DhcpState;\r
+  EFI_STATUS                    IoStatus;     // the result of last user operation\r
+  UINT32                        Xid;\r
+\r
+  IP4_ADDR                      ClientAddr;   // lease IP or configured client address\r
+  IP4_ADDR                      Netmask;\r
+  IP4_ADDR                      ServerAddr;\r
+\r
+  EFI_DHCP4_PACKET              *LastOffer;   // The last received offer\r
+  EFI_DHCP4_PACKET              *Selected;\r
+  DHCP_PARAMETER                *Para;\r
+\r
+  UINT32                        Lease;\r
+  UINT32                        T1;\r
+  UINT32                        T2;\r
+  INTN                          ExtraRefresh; // This refresh is reqested by user\r
+\r
+  UDP_IO_PORT                   *UdpIo;       // Udp child receiving all DHCP message\r
+  UDP_IO_PORT                   *LeaseIoPort; // Udp child with lease IP\r
+  NET_BUF                       *LastPacket;  // The last sent packet for retransmission\r
+  EFI_MAC_ADDRESS               Mac;\r
+  UINT8                         HwType;\r
+  UINT8                         HwLen;\r
+\r
+  DHCP_PROTOCOL                 *ActiveChild;\r
+  EFI_DHCP4_CONFIG_DATA         ActiveConfig;\r
+  UINT32                        UserOptionLen;\r
+\r
+  //\r
+  // Timer event and various timer\r
+  //\r
+  EFI_EVENT                     Timer;\r
+\r
+  UINT32                        PacketToLive; // Retransmission timer for our packets\r
+  INTN                          CurRetry;\r
+  INTN                          MaxRetries;\r
+\r
+  UINT32                        WaitOffer;    // Time to collect the offers\r
+  UINT32                        LeaseLife;\r
+};\r
+\r
+typedef struct {\r
+  EFI_DHCP4_PACKET_OPTION       **Option;\r
+  UINT32                        OptionCount;\r
+  UINT32                        Index;\r
+} DHCP_PARSE_CONTEXT;\r
+\r
+#define DHCP_INSTANCE_FROM_THIS(Proto)  \\r
+  CR ((Proto), DHCP_PROTOCOL, Dhcp4Protocol, DHCP_PROTOCOL_SIGNATURE)\r
+\r
+#define DHCP_SERVICE_FROM_THIS(Sb)      \\r
+  CR ((Sb), DHCP_SERVICE, ServiceBinding, DHCP_SERVICE_SIGNATURE)\r
+\r
+extern EFI_DHCP4_PROTOCOL mDhcp4ProtocolTemplate;\r
+\r
+VOID\r
+DhcpYieldControl (\r
+  IN DHCP_SERVICE         *DhcpSb\r
+  );\r
+\r
+#endif\r