TianoCore EDK2 master
Loading...
Searching...
No Matches
DnsDhcp.h
Go to the documentation of this file.
1
9#ifndef _DNS_DHCP_H_
10#define _DNS_DHCP_H_
11
12//
13// DHCP DNS related
14//
15#pragma pack(1)
16
17#define IP4_ETHER_PROTO 0x0800
18
19#define DHCP4_OPCODE_REQUEST 1
20#define DHCP4_MAGIC 0x63538263
21#define DHCP4_TAG_EOP 255
22
23#define DHCP4_TAG_TYPE 53
24#define DHCP4_MSG_REQUEST 3
25#define DHCP4_MSG_INFORM 8
26
27#define DHCP4_TAG_PARA_LIST 55
28#define DHCP4_TAG_DNS_SERVER 6
29
30#define DHCP6_TAG_DNS_REQUEST 6
31#define DHCP6_TAG_DNS_SERVER 23
32
33#define DNS_CHECK_MEDIA_GET_DHCP_WAITING_TIME EFI_TIMER_PERIOD_SECONDS(20)
34
35//
36// The required Dns4 server information.
37//
38typedef struct {
39 UINT32 *ServerCount;
40 EFI_IPv4_ADDRESS *ServerList;
42
43//
44// The required Dns6 server information.
45//
46typedef struct {
47 UINT32 *ServerCount;
48 EFI_IPv6_ADDRESS *ServerList;
50
51#pragma pack()
52
69 IN EFI_DHCP4_PACKET *Packet,
70 IN DNS4_SERVER_INFOR *DnsServerInfor
71 );
72
91EFIAPI
94 IN VOID *Context,
95 IN EFI_DHCP6_PACKET *Packet
96 );
97
113 IN DNS_INSTANCE *Instance,
114 OUT UINT32 *DnsServerCount,
115 OUT EFI_IPv4_ADDRESS **DnsServerList
116 );
117
134 IN EFI_HANDLE Image,
135 IN EFI_HANDLE Controller,
136 OUT UINT32 *DnsServerCount,
137 OUT EFI_IPv6_ADDRESS **DnsServerList
138 );
139
140#endif
EFI_STATUS ParseDhcp4Ack(IN EFI_DHCP4_PROTOCOL *Dhcp4, IN EFI_DHCP4_PACKET *Packet, IN DNS4_SERVER_INFOR *DnsServerInfor)
Definition: DnsDhcp.c:80
EFI_STATUS GetDns4ServerFromDhcp4(IN DNS_INSTANCE *Instance, OUT UINT32 *DnsServerCount, OUT EFI_IPv4_ADDRESS **DnsServerList)
Definition: DnsDhcp.c:255
EFI_STATUS GetDns6ServerFromDhcp6(IN EFI_HANDLE Image, IN EFI_HANDLE Controller, OUT UINT32 *DnsServerCount, OUT EFI_IPv6_ADDRESS **DnsServerList)
Definition: DnsDhcp.c:608
EFI_STATUS EFIAPI ParseDhcp6Ack(IN EFI_DHCP6_PROTOCOL *This, IN VOID *Context, IN EFI_DHCP6_PACKET *Packet)
Definition: DnsDhcp.c:169
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33