TianoCore EDK2 master
Loading...
Searching...
No Matches
Dhcp4Io.h
Go to the documentation of this file.
1
9#ifndef __EFI_DHCP4_IO_H__
10#define __EFI_DHCP4_IO_H__
11
12#include <Uefi.h>
13
15
16#include <Library/NetLib.h>
17#include <Library/UdpIoLib.h>
20
21#define DHCP_WAIT_OFFER 3 // Time to wait the offers
22#define DHCP_DEFAULT_LEASE 7 * 24 * 60 * 60 // Seven days as default.
23#define DHCP_SERVER_PORT 67
24#define DHCP_CLIENT_PORT 68
25
26//
27// BOOTP header "op" field
28//
29#define BOOTP_REQUEST 1
30#define BOOTP_REPLY 2
31
32//
33// DHCP message types
34//
35#define DHCP_MSG_DISCOVER 1
36#define DHCP_MSG_OFFER 2
37#define DHCP_MSG_REQUEST 3
38#define DHCP_MSG_DECLINE 4
39#define DHCP_MSG_ACK 5
40#define DHCP_MSG_NAK 6
41#define DHCP_MSG_RELEASE 7
42#define DHCP_MSG_INFORM 8
43
44//
45// DHCP notify user type
46//
47#define DHCP_NOTIFY_COMPLETION 1
48#define DHCP_NOTIFY_RENEWREBIND 2
49#define DHCP_NOTIFY_ALL 3
50
51#define DHCP_IS_BOOTP(Parameter) (((Parameter) == NULL) || ((Parameter)->DhcpType == 0))
52
53#define DHCP_CONNECTED(State) \
54 (((State) == Dhcp4Bound) || ((State) == (Dhcp4Renewing)) || ((State) == Dhcp4Rebinding))
55
73 IN OUT DHCP_SERVICE *DhcpSb,
74 IN INTN State,
75 IN BOOLEAN CallUser
76 );
77
99 IN DHCP_SERVICE *DhcpSb,
100 IN EFI_DHCP4_PACKET *Seed,
101 IN DHCP_PARAMETER *Para,
102 IN UINT8 Type,
103 IN UINT8 *Msg
104 );
105
117VOID
118EFIAPI
120 IN EFI_EVENT Event,
121 IN VOID *Context
122 );
123
134VOID
135EFIAPI
136DhcpInput (
137 NET_BUF *UdpPacket,
138 UDP_END_POINT *EndPoint,
139 EFI_STATUS IoStatus,
140 VOID *Context
141 );
142
155 IN DHCP_SERVICE *DhcpSb
156 );
157
164VOID
166 IN DHCP_SERVICE *DhcpSb
167 );
168
178VOID
179EFIAPI
181 NET_BUF *Packet,
182 UDP_END_POINT *EndPoint,
183 EFI_STATUS IoStatus,
184 VOID *Context
185 );
186
187#endif
INT64 INTN
EFI_STATUS DhcpInitRequest(IN DHCP_SERVICE *DhcpSb)
Definition: Dhcp4Io.c:24
EFI_STATUS DhcpSendMessage(IN DHCP_SERVICE *DhcpSb, IN EFI_DHCP4_PACKET *Seed, IN DHCP_PARAMETER *Para, IN UINT8 Type, IN UINT8 *Msg)
Definition: Dhcp4Io.c:1114
EFI_STATUS DhcpSetState(IN OUT DHCP_SERVICE *DhcpSb, IN INTN State, IN BOOLEAN CallUser)
Definition: Dhcp4Io.c:179
VOID DhcpCleanLease(IN DHCP_SERVICE *DhcpSb)
Definition: Dhcp4Io.c:424
VOID EFIAPI DhcpOnPacketSent(NET_BUF *Packet, UDP_END_POINT *EndPoint, EFI_STATUS IoStatus, VOID *Context)
Definition: Dhcp4Io.c:1084
VOID EFIAPI DhcpOnTimerTick(IN EFI_EVENT Event, IN VOID *Context)
Definition: Dhcp4Io.c:1459
VOID EFIAPI DhcpInput(NET_BUF *UdpPacket, UDP_END_POINT *EndPoint, EFI_STATUS IoStatus, VOID *Context)
Definition: Dhcp4Io.c:927
#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