TianoCore EDK2 master
Loading...
Searching...
No Matches
Dhcp4.h
Go to the documentation of this file.
1
15#ifndef __EFI_DHCP4_PROTOCOL_H__
16#define __EFI_DHCP4_PROTOCOL_H__
17
18#define EFI_DHCP4_PROTOCOL_GUID \
19 { \
20 0x8a219718, 0x4ef5, 0x4761, {0x91, 0xc8, 0xc0, 0xf0, 0x4b, 0xda, 0x9e, 0x56 } \
21 }
22
23#define EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID \
24 { \
25 0x9d9a39d8, 0xbd42, 0x4a73, {0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80 } \
26 }
27
29
30#pragma pack(1)
31typedef struct {
35 UINT8 OpCode;
39 UINT8 Length;
43 UINT8 Data[1];
45#pragma pack()
46
47#pragma pack(1)
51typedef struct {
52 UINT8 OpCode;
53 UINT8 HwType;
54 UINT8 HwAddrLen;
55 UINT8 Hops;
56 UINT32 Xid;
57 UINT16 Seconds;
58 UINT16 Reserved;
63 UINT8 ClientHwAddr[16];
64 CHAR8 ServerName[64];
65 CHAR8 BootFileName[128];
67#pragma pack()
68
69#pragma pack(1)
70typedef struct {
74 UINT32 Size;
79 UINT32 Length;
80
81 struct {
89 UINT32 Magik;
93 UINT8 Option[1];
94 } Dhcp4;
96#pragma pack()
97
98typedef enum {
138 Dhcp4Rebooting = 0x8
140
141typedef enum {
195 Dhcp4Fail = 0x0c
197
230typedef
232(EFIAPI *EFI_DHCP4_CALLBACK)(
234 IN VOID *Context,
235 IN EFI_DHCP4_STATE CurrentState,
236 IN EFI_DHCP4_EVENT Dhcp4Event,
238 OUT EFI_DHCP4_PACKET **NewPacket OPTIONAL
239 );
240
241typedef struct {
296
297typedef struct {
333 UINT32 LeaseTime;
339
340typedef struct {
356
357typedef struct {
405
419typedef
423 OUT EFI_DHCP4_MODE_DATA *Dhcp4ModeData
424 );
425
474typedef
476(EFIAPI *EFI_DHCP4_CONFIGURE)(
478 IN EFI_DHCP4_CONFIG_DATA *Dhcp4CfgData OPTIONAL
479 );
480
522typedef
524(EFIAPI *EFI_DHCP4_START)(
526 IN EFI_EVENT CompletionEvent OPTIONAL
527 );
528
567typedef
569(EFIAPI *EFI_DHCP4_RENEW_REBIND)(
571 IN BOOLEAN RebindRequest,
572 IN EFI_EVENT CompletionEvent OPTIONAL
573 );
574
596typedef
598(EFIAPI *EFI_DHCP4_RELEASE)(
600 );
601
617typedef
619(EFIAPI *EFI_DHCP4_STOP)(
621 );
622
658typedef
660(EFIAPI *EFI_DHCP4_BUILD)(
662 IN EFI_DHCP4_PACKET *SeedPacket,
663 IN UINT32 DeleteCount,
664 IN UINT8 *DeleteList OPTIONAL,
665 IN UINT32 AppendCount,
666 IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL,
667 OUT EFI_DHCP4_PACKET **NewPacket
668 );
669
695typedef
700 );
701
734typedef
736(EFIAPI *EFI_DHCP4_PARSE)(
738 IN EFI_DHCP4_PACKET *Packet,
739 IN OUT UINT32 *OptionCount,
740 OUT EFI_DHCP4_PACKET_OPTION *PacketOptionList[] OPTIONAL
741 );
742
748 EFI_DHCP4_GET_MODE_DATA GetModeData;
749 EFI_DHCP4_CONFIGURE Configure;
750 EFI_DHCP4_START Start;
751 EFI_DHCP4_RENEW_REBIND RenewRebind;
752 EFI_DHCP4_RELEASE Release;
753 EFI_DHCP4_STOP Stop;
754 EFI_DHCP4_BUILD Build;
755 EFI_DHCP4_TRANSMIT_RECEIVE TransmitReceive;
756 EFI_DHCP4_PARSE Parse;
757};
758
759extern EFI_GUID gEfiDhcp4ProtocolGuid;
760extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid;
761
762#endif
EFI_STATUS(EFIAPI * EFI_DHCP4_PARSE)(IN EFI_DHCP4_PROTOCOL *This, IN EFI_DHCP4_PACKET *Packet, IN OUT UINT32 *OptionCount, OUT EFI_DHCP4_PACKET_OPTION *PacketOptionList[] OPTIONAL)
Definition: Dhcp4.h:736
EFI_DHCP4_STATE
Definition: Dhcp4.h:98
@ Dhcp4Stopped
Definition: Dhcp4.h:102
@ Dhcp4Init
Definition: Dhcp4.h:106
@ Dhcp4Bound
Definition: Dhcp4.h:118
@ Dhcp4Rebooting
Definition: Dhcp4.h:138
@ Dhcp4Requesting
Definition: Dhcp4.h:114
@ Dhcp4InitReboot
Definition: Dhcp4.h:133
@ Dhcp4Rebinding
Definition: Dhcp4.h:128
@ Dhcp4Selecting
Definition: Dhcp4.h:110
@ Dhcp4Renewing
Definition: Dhcp4.h:123
EFI_STATUS(EFIAPI * EFI_DHCP4_STOP)(IN EFI_DHCP4_PROTOCOL *This)
Definition: Dhcp4.h:619
EFI_STATUS(EFIAPI * EFI_DHCP4_TRANSMIT_RECEIVE)(IN EFI_DHCP4_PROTOCOL *This, IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token)
Definition: Dhcp4.h:697
EFI_STATUS(EFIAPI * EFI_DHCP4_BUILD)(IN EFI_DHCP4_PROTOCOL *This, IN EFI_DHCP4_PACKET *SeedPacket, IN UINT32 DeleteCount, IN UINT8 *DeleteList OPTIONAL, IN UINT32 AppendCount, IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL, OUT EFI_DHCP4_PACKET **NewPacket)
Definition: Dhcp4.h:660
EFI_STATUS(EFIAPI * EFI_DHCP4_START)(IN EFI_DHCP4_PROTOCOL *This, IN EFI_EVENT CompletionEvent OPTIONAL)
Definition: Dhcp4.h:524
EFI_STATUS(EFIAPI * EFI_DHCP4_RELEASE)(IN EFI_DHCP4_PROTOCOL *This)
Definition: Dhcp4.h:598
EFI_STATUS(EFIAPI * EFI_DHCP4_RENEW_REBIND)(IN EFI_DHCP4_PROTOCOL *This, IN BOOLEAN RebindRequest, IN EFI_EVENT CompletionEvent OPTIONAL)
Definition: Dhcp4.h:569
EFI_STATUS(EFIAPI * EFI_DHCP4_CONFIGURE)(IN EFI_DHCP4_PROTOCOL *This, IN EFI_DHCP4_CONFIG_DATA *Dhcp4CfgData OPTIONAL)
Definition: Dhcp4.h:476
EFI_DHCP4_EVENT
Definition: Dhcp4.h:141
@ Dhcp4RcvdNak
Definition: Dhcp4.h:165
@ Dhcp4Fail
Definition: Dhcp4.h:195
@ Dhcp4SendDecline
Definition: Dhcp4.h:169
@ Dhcp4RcvdAck
Definition: Dhcp4.h:161
@ Dhcp4SendRequest
Definition: Dhcp4.h:157
@ Dhcp4SelectOffer
Definition: Dhcp4.h:153
@ Dhcp4EnterRebinding
Definition: Dhcp4.h:183
@ Dhcp4BoundCompleted
Definition: Dhcp4.h:173
@ Dhcp4RcvdOffer
Definition: Dhcp4.h:149
@ Dhcp4SendDiscover
Definition: Dhcp4.h:145
@ Dhcp4EnterRenewing
Definition: Dhcp4.h:178
@ Dhcp4AddressLost
Definition: Dhcp4.h:189
EFI_STATUS(EFIAPI * EFI_DHCP4_GET_MODE_DATA)(IN EFI_DHCP4_PROTOCOL *This, OUT EFI_DHCP4_MODE_DATA *Dhcp4ModeData)
Definition: Dhcp4.h:421
EFI_STATUS(EFIAPI * EFI_DHCP4_CALLBACK)(IN EFI_DHCP4_PROTOCOL *This, IN VOID *Context, IN EFI_DHCP4_STATE CurrentState, IN EFI_DHCP4_EVENT Dhcp4Event, IN EFI_DHCP4_PACKET *Packet OPTIONAL, OUT EFI_DHCP4_PACKET **NewPacket OPTIONAL)
Definition: Dhcp4.h:232
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * CallbackContext
Definition: Dhcp4.h:282
EFI_DHCP4_PACKET_OPTION ** OptionList
Definition: Dhcp4.h:294
UINT32 * DiscoverTimeout
Definition: Dhcp4.h:253
EFI_IPv4_ADDRESS ClientAddress
Definition: Dhcp4.h:273
UINT32 * RequestTimeout
Definition: Dhcp4.h:265
UINT32 OptionCount
Definition: Dhcp4.h:286
EFI_DHCP4_CALLBACK Dhcp4Callback
Definition: Dhcp4.h:278
UINT32 RequestTryCount
Definition: Dhcp4.h:259
UINT32 DiscoverTryCount
Definition: Dhcp4.h:247
EFI_IPv4_ADDRESS ClientAddr
Client IP address from client.
Definition: Dhcp4.h:59
EFI_IPv4_ADDRESS ServerAddr
IP address of next server in bootstrap.
Definition: Dhcp4.h:61
EFI_IPv4_ADDRESS GatewayAddr
Relay agent IP address.
Definition: Dhcp4.h:62
EFI_IPv4_ADDRESS YourAddr
Client IP address from server.
Definition: Dhcp4.h:60
EFI_IPv4_ADDRESS ListenAddress
Definition: Dhcp4.h:344
EFI_IPv4_ADDRESS SubnetMask
Definition: Dhcp4.h:349
EFI_IPv4_ADDRESS ServerAddress
Definition: Dhcp4.h:318
EFI_IPv4_ADDRESS SubnetMask
Definition: Dhcp4.h:327
EFI_DHCP4_CONFIG_DATA ConfigData
Definition: Dhcp4.h:305
UINT32 LeaseTime
Definition: Dhcp4.h:333
EFI_DHCP4_STATE State
Definition: Dhcp4.h:301
EFI_IPv4_ADDRESS RouterAddress
Definition: Dhcp4.h:323
EFI_IPv4_ADDRESS ClientAddress
Definition: Dhcp4.h:310
EFI_DHCP4_PACKET * ReplyPacket
Definition: Dhcp4.h:337
EFI_MAC_ADDRESS ClientMacAddress
Definition: Dhcp4.h:314
UINT32 Length
Definition: Dhcp4.h:79
EFI_DHCP4_HEADER Header
Definition: Dhcp4.h:85
UINT32 Size
Definition: Dhcp4.h:74
UINT32 Magik
Definition: Dhcp4.h:89
EFI_IPv4_ADDRESS RemoteAddress
Definition: Dhcp4.h:370
EFI_DHCP4_LISTEN_POINT * ListenPoints
Definition: Dhcp4.h:387
EFI_DHCP4_PACKET * Packet
Definition: Dhcp4.h:395
EFI_IPv4_ADDRESS GatewayAddress
Definition: Dhcp4.h:378
EFI_DHCP4_PACKET * ResponseList
Definition: Dhcp4.h:403
Definition: Base.h:213