NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h File Reference


Data Structures

struct  PXEBC_DHCP6_OPTION_ORO
struct  PXEBC_DHCP6_OPTION_UNDI
struct  PXEBC_DHCP6_OPTION_ARCH
struct  PXEBC_CLASS_ID
struct  PXEBC_DHCP6_OPTION_VENDOR_CLASS
union  PXEBC_DHCP6_OPTION_ENTRY
struct  PXEBC_DHCP6_OPTION_NODE
union  PXEBC_DHCP6_PACKET
struct  PXEBC_DHCP6_PACKET_CACHE

Defines

#define PXEBC_DHCP6_OPTION_MAX_NUM   16
#define PXEBC_DHCP6_OPTION_MAX_SIZE   312
#define PXEBC_DHCP6_PACKET_MAX_SIZE   1472
#define PXEBC_IP6_POLICY_MAX   0xff
#define PXEBC_IP6_ROUTE_TABLE_TIMEOUT   10
#define PXEBC_DHCP6_S_PORT   547
#define PXEBC_DHCP6_C_PORT   546
#define PXEBC_DHCP6_OPT_CLIENT_ID   1
#define PXEBC_DHCP6_OPT_SERVER_ID   2
#define PXEBC_DHCP6_OPT_IA_NA   3
#define PXEBC_DHCP6_OPT_IA_TA   4
#define PXEBC_DHCP6_OPT_IAADDR   5
#define PXEBC_DHCP6_OPT_ORO   6
#define PXEBC_DHCP6_OPT_PREFERENCE   7
#define PXEBC_DHCP6_OPT_ELAPSED_TIME   8
#define PXEBC_DHCP6_OPT_REPLAY_MSG   9
#define PXEBC_DHCP6_OPT_AUTH   11
#define PXEBC_DHCP6_OPT_UNICAST   12
#define PXEBC_DHCP6_OPT_STATUS_CODE   13
#define PXEBC_DHCP6_OPT_RAPID_COMMIT   14
#define PXEBC_DHCP6_OPT_USER_CLASS   15
#define PXEBC_DHCP6_OPT_VENDOR_CLASS   16
#define PXEBC_DHCP6_OPT_VENDOR_OPTS   17
#define PXEBC_DHCP6_OPT_INTERFACE_ID   18
#define PXEBC_DHCP6_OPT_RECONFIG_MSG   19
#define PXEBC_DHCP6_OPT_RECONFIG_ACCEPT   20
#define PXEBC_DHCP6_OPT_BOOT_FILE_URL   59
#define PXEBC_DHCP6_OPT_BOOT_FILE_PARAM   60
#define PXEBC_DHCP6_OPT_ARCH   61
#define PXEBC_DHCP6_OPT_UNDI   62
#define PXEBC_DHCP6_ENTERPRISE_NUM   343
#define PXEBC_DHCP6_MAX_BOOT_FILE_SIZE   65535
#define PXEBC_DHCP6_IDX_IA_NA   0
#define PXEBC_DHCP6_IDX_BOOT_FILE_URL   1
#define PXEBC_DHCP6_IDX_BOOT_FILE_PARAM   2
#define PXEBC_DHCP6_IDX_VENDOR_CLASS   3
#define PXEBC_DHCP6_IDX_MAX   4
#define PXEBC_DHCP6_BOOT_FILE_URL_PREFIX   "tftp://"
#define PXEBC_TFTP_URL_SEPARATOR   '/'
#define PXEBC_ADDR_START_DELIMITER   '['
#define PXEBC_ADDR_END_DELIMITER   ']'
#define GET_NEXT_DHCP6_OPTION(Opt)
#define GET_DHCP6_OPTION_SIZE(Pkt)   ((Pkt)->Length - sizeof (EFI_DHCP6_HEADER))
#define IS_PROXY_OFFER(Type)

Functions

VOID PxeBcFreeBootFileOption (IN LIST_ENTRY *Head)
EFI_STATUS PxeBcExtractBootFileUrl (OUT UINT8 **FileName, IN OUT EFI_IPv6_ADDRESS *SrvAddr, IN CHAR8 *BootFile, IN UINT16 Length)
EFI_STATUS PxeBcExtractBootFileParam (IN CHAR8 *BootFilePara, OUT UINT16 *BootFileSize)
EFI_STATUS PxeBcParseDhcp6Packet (IN PXEBC_DHCP6_PACKET_CACHE *Cache6)
EFI_STATUS PxeBcRegisterIp6Address (IN PXEBC_PRIVATE_DATA *Private, IN EFI_IPv6_ADDRESS *Address)
VOID PxeBcUnregisterIp6Address (IN PXEBC_PRIVATE_DATA *Private)
EFI_STATUS PxeBcDhcp6Discover (IN PXEBC_PRIVATE_DATA *Private, IN UINT16 Type, IN UINT16 *Layer, IN BOOLEAN UseBis, IN EFI_IP_ADDRESS *DestIp)
EFI_STATUS PxeBcSetIp6Policy (IN PXEBC_PRIVATE_DATA *Private)
EFI_STATUS PxeBcSetIp6Address (IN PXEBC_PRIVATE_DATA *Private)
EFI_STATUS PxeBcDhcp6Sarr (IN PXEBC_PRIVATE_DATA *Private, IN EFI_DHCP6_PROTOCOL *Dhcp6)

Detailed Description

Functions declaration related with DHCPv6 for UefiPxeBc Driver.

Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.


Define Documentation

#define GET_DHCP6_OPTION_SIZE ( Pkt   )     ((Pkt)->Length - sizeof (EFI_DHCP6_HEADER))

Referenced by PxeBcParseDhcp6Packet().

#define GET_NEXT_DHCP6_OPTION ( Opt   ) 

Value:

(EFI_DHCP6_PACKET_OPTION *) ((UINT8 *) (Opt) + \
  sizeof (EFI_DHCP6_PACKET_OPTION) + (NTOHS ((Opt)->OpLen)) - 1)

Referenced by PxeBcBuildDhcp6Options().

#define IS_PROXY_OFFER ( Type   ) 

#define PXEBC_ADDR_END_DELIMITER   ']'

Referenced by PxeBcExtractBootFileUrl().

#define PXEBC_ADDR_START_DELIMITER   '['

Referenced by PxeBcExtractBootFileUrl().

#define PXEBC_DHCP6_BOOT_FILE_URL_PREFIX   "tftp://"

Referenced by PxeBcExtractBootFileUrl().

#define PXEBC_DHCP6_C_PORT   546

#define PXEBC_DHCP6_ENTERPRISE_NUM   343

#define PXEBC_DHCP6_IDX_BOOT_FILE_PARAM   2

#define PXEBC_DHCP6_IDX_BOOT_FILE_URL   1

#define PXEBC_DHCP6_IDX_IA_NA   0

Referenced by PxeBcParseDhcp6Packet().

#define PXEBC_DHCP6_IDX_MAX   4

#define PXEBC_DHCP6_IDX_VENDOR_CLASS   3

Referenced by PxeBcParseDhcp6Packet().

#define PXEBC_DHCP6_MAX_BOOT_FILE_SIZE   65535

#define PXEBC_DHCP6_OPT_ARCH   61

Referenced by PxeBcBuildDhcp6Options().

#define PXEBC_DHCP6_OPT_AUTH   11

#define PXEBC_DHCP6_OPT_BOOT_FILE_PARAM   60

#define PXEBC_DHCP6_OPT_BOOT_FILE_URL   59

#define PXEBC_DHCP6_OPT_CLIENT_ID   1

#define PXEBC_DHCP6_OPT_ELAPSED_TIME   8

Referenced by PxeBcRequestBootService().

#define PXEBC_DHCP6_OPT_IA_NA   3

Referenced by PxeBcParseDhcp6Packet().

#define PXEBC_DHCP6_OPT_IA_TA   4

#define PXEBC_DHCP6_OPT_IAADDR   5

#define PXEBC_DHCP6_OPT_INTERFACE_ID   18

#define PXEBC_DHCP6_OPT_ORO   6

Referenced by PxeBcBuildDhcp6Options().

#define PXEBC_DHCP6_OPT_PREFERENCE   7

#define PXEBC_DHCP6_OPT_RAPID_COMMIT   14

#define PXEBC_DHCP6_OPT_RECONFIG_ACCEPT   20

#define PXEBC_DHCP6_OPT_RECONFIG_MSG   19

#define PXEBC_DHCP6_OPT_REPLAY_MSG   9

#define PXEBC_DHCP6_OPT_SERVER_ID   2

Referenced by PxeBcRequestBootService().

#define PXEBC_DHCP6_OPT_STATUS_CODE   13

Referenced by PxeBcParseDhcp6Packet().

#define PXEBC_DHCP6_OPT_UNDI   62

Referenced by PxeBcBuildDhcp6Options().

#define PXEBC_DHCP6_OPT_UNICAST   12

#define PXEBC_DHCP6_OPT_USER_CLASS   15

#define PXEBC_DHCP6_OPT_VENDOR_CLASS   16

#define PXEBC_DHCP6_OPT_VENDOR_OPTS   17

#define PXEBC_DHCP6_OPTION_MAX_NUM   16

Referenced by PxeBcDhcp6Sarr().

#define PXEBC_DHCP6_OPTION_MAX_SIZE   312

Referenced by PxeBcDhcp6Sarr().

#define PXEBC_DHCP6_PACKET_MAX_SIZE   1472

Referenced by EfiPxeBcStart().

#define PXEBC_DHCP6_S_PORT   547

#define PXEBC_IP6_POLICY_MAX   0xff

#define PXEBC_IP6_ROUTE_TABLE_TIMEOUT   10

Referenced by PxeBcRegisterIp6Address().

#define PXEBC_TFTP_URL_SEPARATOR   '/'

Referenced by PxeBcExtractBootFileUrl().


Function Documentation

EFI_STATUS PxeBcDhcp6Discover ( IN PXEBC_PRIVATE_DATA Private,
IN UINT16  Type,
IN UINT16 *  Layer,
IN BOOLEAN  UseBis,
IN EFI_IP_ADDRESS *  DestIp 
)

Build and send out the request packet for the bootfile, and parse the reply.

Parameters:
[in] Private The pointer to the PxeBc private data.
[in] Type PxeBc option boot item type.
[in] Layer The pointer to the option boot item layer.
[in] UseBis Use BIS or not.
[in] DestIp The pointer to the server address.
Return values:
EFI_SUCCESS Successfully discovered theboot file.
EFI_OUT_OF_RESOURCES Failed to allocate resource.
EFI_NOT_FOUND Can't get the PXE reply packet.
Others Failed to discover boot file.
Build and send out the request packet for the bootfile, and parse the reply.

Parameters:
[in] Private The pointer to PxeBc private data.
[in] Type PxeBc option boot item type.
[in] Layer The pointer to option boot item layer.
[in] UseBis Use BIS or not.
[in] DestIp The pointer to the server address.
Return values:
EFI_SUCCESS Successfully discovered the boot file.
EFI_OUT_OF_RESOURCES Failed to allocate resources.
EFI_NOT_FOUND Can't get the PXE reply packet.
Others Failed to discover the boot file.

References PXEBC_BS_DISCOVER_PORT.

Referenced by PxeBcDiscoverBootServer().

EFI_STATUS PxeBcDhcp6Sarr ( IN PXEBC_PRIVATE_DATA Private,
IN EFI_DHCP6_PROTOCOL *  Dhcp6 
)

Start the DHCPv6 S.A.R.R. process to acquire the IPv6 address and other PXE boot information.

Parameters:
[in] Private The pointer to the PxeBc private data.
[in] Dhcp6 The pointer to EFI_DHCP6_PROTOCOL.
Return values:
EFI_SUCCESS The S.A.R.R. process successfully finished.
Others Failed to finish the S.A.R.R. process.
Start the DHCPv6 S.A.R.R. process to acquire the IPv6 address and other PXE boot information.

Parameters:
[in] Private The pointer to PxeBc private data.
[in] Dhcp6 The pointer to the EFI_DHCP6_PROTOCOL
Return values:
EFI_SUCCESS The S.A.R.R. process successfully finished.
Others Failed to finish the S.A.R.R. process.

References PXEBC_DAD_ADDITIONAL_DELAY, PXEBC_DHCP6_OPTION_MAX_NUM, PXEBC_DHCP6_OPTION_MAX_SIZE, PxeBcBuildDhcp6Options(), PxeBcDhcp6CallBack(), and PxeBcHandleDhcp6Offer().

Referenced by EfiPxeBcDhcp().

EFI_STATUS PxeBcExtractBootFileParam ( IN CHAR8 *  BootFilePara,
OUT UINT16 *  BootFileSize 
)

Parse the Boot File Parameter option.

Parameters:
[in] BootFilePara The pointer to the boot file parameter option data.
[out] BootFileSize The pointer to the parsed boot file size.
Return values:
EFI_SUCCESS Successfully obtained the boot file size from parameter option.
EFI_NOT_FOUND Failed to extract the boot file size from parameter option.
Parse the Boot File Parameter option.

Parameters:
[in] BootFilePara The pointer to boot file parameter option data.
[out] BootFileSize The pointer to the parsed boot file size.
Return values:
EFI_SUCCESS Successfully obtained the boot file size from parameter option.
EFI_NOT_FOUND Failed to extract the boot file size from parameter option.

References PXEBC_DHCP6_MAX_BOOT_FILE_SIZE, and PxeBcUniHexToUint8().

Referenced by PxeBcDhcp6BootInfo().

EFI_STATUS PxeBcExtractBootFileUrl ( OUT UINT8 **  FileName,
IN OUT EFI_IPv6_ADDRESS *  SrvAddr,
IN CHAR8 *  BootFile,
IN UINT16  Length 
)

Parse the Boot File URL option.

Parameters:
[out] FileName The pointer to the boot file name.
[in,out] SrvAddr The pointer to the boot server address.
[in] BootFile The pointer to the boot file URL option data.
[in] Length Length of the boot file URL option data.
Return values:
EFI_ABORTED User canceled the operation.
EFI_SUCCESS Selected the boot menu successfully.
EFI_NOT_READY Read the input key from the keybroad has not finish.
Parse the Boot File URL option.

Parameters:
[out] FileName The pointer to the boot file name.
[in,out] SrvAddr The pointer to the boot server address.
[in] BootFile The pointer to the boot file URL option data.
[in] Length The length of the boot file URL option data.
Return values:
EFI_ABORTED User cancel operation.
EFI_SUCCESS Selected the boot menu successfully.
EFI_NOT_READY Read the input key from the keybroad has not finish.

References PXEBC_ADDR_END_DELIMITER, PXEBC_ADDR_START_DELIMITER, PXEBC_DHCP6_BOOT_FILE_URL_PREFIX, and PXEBC_TFTP_URL_SEPARATOR.

Referenced by PxeBcDhcp6BootInfo(), and PxeBcRetryDhcp6Binl().

VOID PxeBcFreeBootFileOption ( IN LIST_ENTRY *  Head  ) 

Free all the nodes in the boot file list.

Parameters:
[in] Head The pointer to the head of the list.
Free all the nodes in the list for boot file.

Parameters:
[in] Head The pointer to the head of list.

EFI_STATUS PxeBcParseDhcp6Packet ( IN PXEBC_DHCP6_PACKET_CACHE Cache6  ) 

Parse the cached DHCPv6 packet, including all the options.

Parameters:
[in] Cache6 The pointer to a cached DHCPv6 packet.
Return values:
EFI_SUCCESS Parsed the DHCPv6 packet successfully.
EFI_DEVICE_ERROR Failed to parse and invalid packet.
Parse the cached DHCPv6 packet, including all the options.

Parameters:
[in] Cache6 The pointer to a cached DHCPv6 packet.
Return values:
EFI_SUCCESS Parsed the DHCPv6 packet successfully.
EFI_DEVICE_ERROR Failed to parse and invalid the packet.

References DEFAULT_CLASS_ID_DATA, GET_DHCP6_OPTION_SIZE, PXEBC_DHCP6_ENTERPRISE_NUM, PXEBC_DHCP6_IDX_BOOT_FILE_PARAM, PXEBC_DHCP6_IDX_BOOT_FILE_URL, PXEBC_DHCP6_IDX_IA_NA, PXEBC_DHCP6_IDX_VENDOR_CLASS, PXEBC_DHCP6_OPT_BOOT_FILE_PARAM, PXEBC_DHCP6_OPT_BOOT_FILE_URL, PXEBC_DHCP6_OPT_IA_NA, PXEBC_DHCP6_OPT_STATUS_CODE, PXEBC_DHCP6_OPT_VENDOR_CLASS, PxeBcParseDhcp6Options(), PxeOfferTypeDhcpBinl, PxeOfferTypeDhcpOnly, and PxeOfferTypeProxyBinl.

Referenced by EfiPxeBcDiscover(), PxeBcCacheDhcp6Offer(), PxeBcCopyDhcp6Ack(), PxeBcCopyDhcp6Proxy(), and PxeBcRetryDhcp6Binl().

EFI_STATUS PxeBcRegisterIp6Address ( IN PXEBC_PRIVATE_DATA Private,
IN EFI_IPv6_ADDRESS *  Address 
)

Register the ready address by Ip6Config protocol.

Parameters:
[in] Private The pointer to the PxeBc private data.
[in] Address The pointer to the ready address.
Return values:
EFI_SUCCESS Registered the address succesfully.
Others Failed to register the address.
Register the ready station address and gateway by Ip6Config protocol.

Parameters:
[in] Private The pointer to PXEBC_PRIVATE_DATA.
[in] Address The pointer to the ready address.
Return values:
EFI_SUCCESS Registered the address succesfully.
Others Failed to register the address.

References Policy, PXEBC_DAD_ADDITIONAL_DELAY, PXEBC_IP6_POLICY_MAX, PXEBC_IP6_ROUTE_TABLE_TIMEOUT, PxeBcCheckRouteTable(), and PxeBcCommonNotify().

Referenced by EfiPxeBcSetStationIP(), and PxeBcSetIp6Address().

EFI_STATUS PxeBcSetIp6Address ( IN PXEBC_PRIVATE_DATA Private  ) 

This function will register the station IP address and flush IP instance to start using the new IP address.

Parameters:
[in] Private The pointer to PXEBC_PRIVATE_DATA.
Return values:
EFI_SUCCESS The new IP address has been configured successfully.
Others Failed to configure the address.

References PxeBcFlushStationIp(), PxeBcRegisterIp6Address(), PxeBcShowIp6Addr(), and PxeBcUnregisterIp6Address().

Referenced by PxeBcDhcp6BootInfo().

EFI_STATUS PxeBcSetIp6Policy ( IN PXEBC_PRIVATE_DATA Private  ) 

Set the IP6 policy to Automatic.

Parameters:
[in] Private The pointer to PXEBC_PRIVATE_DATA.
Return values:
EFI_SUCCESS Switch the IP policy succesfully.
Others Unexpect error happened.

References Policy, and PXEBC_IP6_POLICY_MAX.

Referenced by EfiPxeBcStart().

VOID PxeBcUnregisterIp6Address ( IN PXEBC_PRIVATE_DATA Private  ) 

Unregister the address by Ip6Config protocol.

Parameters:
[in] Private The pointer to the PxeBc private data.
Unregister the address by Ip6Config protocol.

Parameters:
[in] Private The pointer to PXEBC_PRIVATE_DATA.

References PXEBC_IP6_POLICY_MAX.

Referenced by EfiPxeBcStop(), and PxeBcSetIp6Address().


Generated on Mon Sep 28 08:49:07 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1