TianoCore EDK2 master
Loading...
Searching...
No Matches
Dhcp4Impl.h File Reference
#include <Uefi.h>
#include <Protocol/Dhcp4.h>
#include <Protocol/Udp4.h>
#include <IndustryStandard/Dhcp.h>
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/NetLib.h>
#include "Dhcp4Option.h"
#include "Dhcp4Io.h"

Go to the source code of this file.

Data Structures

struct  _DHCP_PROTOCOL
 
struct  _DHCP_SERVICE
 
struct  DHCP_PARSE_CONTEXT
 

Macros

#define DHCP_SERVICE_SIGNATURE   SIGNATURE_32 ('D', 'H', 'C', 'P')
 
#define DHCP_PROTOCOL_SIGNATURE   SIGNATURE_32 ('d', 'h', 'c', 'p')
 
#define DHCP_CHECK_MEDIA_WAITING_TIME   EFI_TIMER_PERIOD_SECONDS(20)
 
#define DHCP_UNCONFIGED   0
 
#define DHCP_CONFIGED   1
 
#define DHCP_DESTROY   2
 
#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)
 

Typedefs

typedef struct _DHCP_SERVICE DHCP_SERVICE
 
typedef struct _DHCP_PROTOCOL DHCP_PROTOCOL
 

Functions

VOID DhcpYieldControl (IN DHCP_SERVICE *DhcpSb)
 
VOID PxeDhcpDone (IN DHCP_PROTOCOL *Instance)
 
VOID DhcpCleanConfigure (IN OUT EFI_DHCP4_CONFIG_DATA *Config)
 
VOID EFIAPI DhcpDummyExtFree (IN VOID *Arg)
 
VOID SetElapsedTime (IN UINT16 *Elapsed, IN DHCP_PROTOCOL *Instance)
 

Variables

EFI_DHCP4_PROTOCOL mDhcp4ProtocolTemplate
 

Detailed Description

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.

Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Dhcp4Impl.h.

Macro Definition Documentation

◆ DHCP_CHECK_MEDIA_WAITING_TIME

#define DHCP_CHECK_MEDIA_WAITING_TIME   EFI_TIMER_PERIOD_SECONDS(20)

Definition at line 38 of file Dhcp4Impl.h.

◆ DHCP_CONFIGED

#define DHCP_CONFIGED   1

Definition at line 48 of file Dhcp4Impl.h.

◆ DHCP_DESTROY

#define DHCP_DESTROY   2

Definition at line 49 of file Dhcp4Impl.h.

◆ DHCP_INSTANCE_FROM_THIS

#define DHCP_INSTANCE_FROM_THIS (   Proto)     CR ((Proto), DHCP_PROTOCOL, Dhcp4Protocol, DHCP_PROTOCOL_SIGNATURE)

Definition at line 133 of file Dhcp4Impl.h.

◆ DHCP_PROTOCOL_SIGNATURE

#define DHCP_PROTOCOL_SIGNATURE   SIGNATURE_32 ('d', 'h', 'c', 'p')

Definition at line 36 of file Dhcp4Impl.h.

◆ DHCP_SERVICE_FROM_THIS

#define DHCP_SERVICE_FROM_THIS (   Sb)     CR ((Sb), DHCP_SERVICE, ServiceBinding, DHCP_SERVICE_SIGNATURE)

Definition at line 136 of file Dhcp4Impl.h.

◆ DHCP_SERVICE_SIGNATURE

#define DHCP_SERVICE_SIGNATURE   SIGNATURE_32 ('D', 'H', 'C', 'P')

Definition at line 35 of file Dhcp4Impl.h.

◆ DHCP_UNCONFIGED

#define DHCP_UNCONFIGED   0

Definition at line 47 of file Dhcp4Impl.h.

Typedef Documentation

◆ DHCP_PROTOCOL

typedef struct _DHCP_PROTOCOL DHCP_PROTOCOL

Definition at line 30 of file Dhcp4Impl.h.

◆ DHCP_SERVICE

typedef struct _DHCP_SERVICE DHCP_SERVICE

Definition at line 29 of file Dhcp4Impl.h.

Function Documentation

◆ DhcpCleanConfigure()

VOID DhcpCleanConfigure ( IN OUT EFI_DHCP4_CONFIG_DATA Config)

Free the resource related to the configure parameters. DHCP driver will make a copy of the user's configure such as the time out value.

Parameters
ConfigThe DHCP configure data

Definition at line 415 of file Dhcp4Impl.c.

◆ DhcpDummyExtFree()

VOID EFIAPI DhcpDummyExtFree ( IN VOID *  Arg)

Callback of Dhcp packet. Does nothing.

Parameters
ArgThe context.

Definition at line 1296 of file Dhcp4Impl.c.

◆ DhcpYieldControl()

VOID DhcpYieldControl ( IN DHCP_SERVICE DhcpSb)

Give up the control of the DHCP service to let other child resume. Don't change the service's DHCP state and the Client address and option list configure as required by RFC2131.

Parameters
DhcpSbThe DHCP service instance.

Definition at line 545 of file Dhcp4Impl.c.

◆ PxeDhcpDone()

VOID PxeDhcpDone ( IN DHCP_PROTOCOL Instance)

Complete a Dhcp4 transaction and signal the upper layer.

Parameters
InstanceDhcp4 instance.

Definition at line 1419 of file Dhcp4Impl.c.

◆ SetElapsedTime()

VOID SetElapsedTime ( IN UINT16 *  Elapsed,
IN DHCP_PROTOCOL Instance 
)

Set the elapsed time based on the given instance and the pointer to the elapsed time option.

Parameters
[in]ElapsedThe pointer to the position to append.
[in]InstanceThe pointer to the Dhcp4 instance.

Definition at line 1783 of file Dhcp4Impl.c.

Variable Documentation

◆ mDhcp4ProtocolTemplate

EFI_DHCP4_PROTOCOL mDhcp4ProtocolTemplate
extern

Definition at line 322 of file Dhcp4Impl.c.