TianoCore EDK2 master
Loading...
Searching...
No Matches
DnsDriver.h
Go to the documentation of this file.
1
9#ifndef _DNS_DRIVER_H_
10#define _DNS_DRIVER_H_
11
14
19
24
29
30#define DNS_SERVICE_SIGNATURE SIGNATURE_32 ('D', 'N', 'S', 'S')
31
32#define DNS_INSTANCE_SIGNATURE SIGNATURE_32 ('D', 'N', 'S', 'I')
33
35 EFI_EVENT Timer;
36
38 LIST_ENTRY Dns4ServerList;
39
40 LIST_ENTRY Dns6CacheList;
41 LIST_ENTRY Dns6ServerList;
42};
43
45 UINT32 Signature;
46 EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;
47
48 UINT16 Dns4ChildrenNum;
49 LIST_ENTRY Dns4ChildrenList;
50
51 UINT16 Dns6ChildrenNum;
52 LIST_ENTRY Dns6ChildrenList;
53
54 EFI_HANDLE ControllerHandle;
55 EFI_HANDLE ImageHandle;
56
57 EFI_EVENT TimerToGetMap;
58
59 EFI_EVENT Timer;
60
61 UINT8 IpVersion;
62 UDP_IO *ConnectUdp;
63};
64
66 UINT32 Signature;
67 LIST_ENTRY Link;
68
71
72 INTN State;
73 BOOLEAN InDestroy;
74
75 DNS_SERVICE *Service;
76 EFI_HANDLE ChildHandle;
77
78 EFI_DNS4_CONFIG_DATA Dns4CfgData;
79 EFI_DNS6_CONFIG_DATA Dns6CfgData;
80
81 EFI_IP_ADDRESS SessionDnsServer;
82
83 NET_MAP Dns4TxTokens;
84 NET_MAP Dns6TxTokens;
85
86 UDP_IO *UdpIo;
87};
88
89typedef struct {
90 EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;
91 UINTN NumberOfChildren;
92 EFI_HANDLE *ChildHandleBuffer;
94
95extern DNS_DRIVER_DATA *mDriverData;
96
97#define DNS_SERVICE_FROM_THIS(a) \
98 CR (a, DNS_SERVICE, ServiceBinding, DNS_SERVICE_SIGNATURE)
99
100#define DNS_INSTANCE_FROM_THIS_PROTOCOL4(a) \
101 CR (a, DNS_INSTANCE, Dns4, DNS_INSTANCE_SIGNATURE)
102
103#define DNS_INSTANCE_FROM_THIS_PROTOCOL6(a) \
104 CR (a, DNS_INSTANCE, Dns6, DNS_INSTANCE_SIGNATURE)
105
112VOID
114 IN DNS_INSTANCE *Instance
115 );
116
129 IN DNS_SERVICE *Service,
130 OUT DNS_INSTANCE **Instance
131 );
132
144EFIAPI
146 IN LIST_ENTRY *Entry,
147 IN VOID *Context
148 );
149
163EFIAPI
165 IN UDP_IO *UdpIo,
166 IN VOID *Context
167 );
168
175VOID
177 IN DNS_SERVICE *DnsSb
178 );
179
199 IN EFI_HANDLE Controller,
200 IN EFI_HANDLE Image,
201 IN UINT8 IpVersion,
202 OUT DNS_SERVICE **Service
203 );
204
215EFIAPI
216DnsUnload (
217 IN EFI_HANDLE ImageHandle
218 );
219
232EFIAPI
234 IN EFI_HANDLE ImageHandle,
235 IN EFI_SYSTEM_TABLE *SystemTable
236 );
237
281EFIAPI
284 IN EFI_HANDLE ControllerHandle,
285 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
286 );
287
324EFIAPI
327 IN EFI_HANDLE ControllerHandle,
328 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
329 );
330
358EFIAPI
361 IN EFI_HANDLE ControllerHandle,
362 IN UINTN NumberOfChildren,
363 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
364 );
365
409EFIAPI
412 IN EFI_HANDLE ControllerHandle,
413 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
414 );
415
452EFIAPI
455 IN EFI_HANDLE ControllerHandle,
456 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
457 );
458
486EFIAPI
489 IN EFI_HANDLE ControllerHandle,
490 IN UINTN NumberOfChildren,
491 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
492 );
493
514EFIAPI
517 IN EFI_HANDLE *ChildHandle
518 );
519
539EFIAPI
542 IN EFI_HANDLE ChildHandle
543 );
544
565EFIAPI
568 IN EFI_HANDLE *ChildHandle
569 );
570
590EFIAPI
593 IN EFI_HANDLE ChildHandle
594 );
595
596#endif
UINT64 UINTN
INT64 INTN
VOID DnsDestroyInstance(IN DNS_INSTANCE *Instance)
Definition: DnsDriver.c:48
EFI_STATUS EFIAPI DnsDestroyChildEntryInHandleBuffer(IN LIST_ENTRY *Entry, IN VOID *Context)
Definition: DnsDriver.c:139
EFI_STATUS EFIAPI DnsDriverEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: DnsDriver.c:424
EFI_STATUS EFIAPI Dns4DriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL)
Definition: DnsDriver.c:710
EFI_STATUS EFIAPI Dns4ServiceBindingDestroyChild(IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE ChildHandle)
Definition: DnsDriver.c:1202
EFI_STATUS DnsCreateService(IN EFI_HANDLE Controller, IN EFI_HANDLE Image, IN UINT8 IpVersion, OUT DNS_SERVICE **Service)
Definition: DnsDriver.c:229
EFI_STATUS EFIAPI Dns6DriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL)
Definition: DnsDriver.c:975
EFI_STATUS EFIAPI Dns6ServiceBindingCreateChild(IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE *ChildHandle)
Definition: DnsDriver.c:1315
EFI_STATUS EFIAPI DnsUnload(IN EFI_HANDLE ImageHandle)
Definition: DnsDriver.c:340
EFI_STATUS EFIAPI Dns6DriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: DnsDriver.c:904
EFI_STATUS EFIAPI Dns6DriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: DnsDriver.c:829
EFI_STATUS EFIAPI Dns4DriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: DnsDriver.c:565
EFI_STATUS EFIAPI Dns4DriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: DnsDriver.c:640
EFI_STATUS EFIAPI Dns6ServiceBindingDestroyChild(IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE ChildHandle)
Definition: DnsDriver.c:1446
EFI_STATUS DnsCreateInstance(IN DNS_SERVICE *Service, OUT DNS_INSTANCE **Instance)
Definition: DnsDriver.c:82
VOID DnsDestroyService(IN DNS_SERVICE *DnsSb)
Definition: DnsDriver.c:194
EFI_STATUS EFIAPI Dns4ServiceBindingCreateChild(IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE *ChildHandle)
Definition: DnsDriver.c:1071
EFI_STATUS EFIAPI DnsConfigNullUdp(IN UDP_IO *UdpIo, IN VOID *Context)
Definition: DnsDriver.c:179
#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 * EFI_HANDLE
Definition: UefiBaseType.h:33
LIST_ENTRY Dns4CacheList
Ticking timer for DNS cache update.
Definition: DnsDriver.h:37
UINT8 IpVersion
Ticking timer for packet retransmission.
Definition: DnsDriver.h:61