iPXE
Macros | Functions
bios_cachedhcp.c File Reference

Cached DHCP packet. More...

#include <stdint.h>
#include <ipxe/init.h>
#include <ipxe/cachedhcp.h>
#include <realmode.h>
#include <pxe_api.h>

Go to the source code of this file.

Macros

#define cached_dhcpack_phys   __use_data16 ( cached_dhcpack_phys )
 
#define colour   &cached_dhcpack_phys
 Colour for debug messages. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
uint32_t __bss16 (cached_dhcpack_phys)
 Cached DHCPACK physical address. More...
 
static void cachedhcp_init (void)
 Cached DHCPACK initialisation function. More...
 
struct init_fn cachedhcp_init_fn __init_fn (INIT_NORMAL)
 Cached DHCPACK initialisation function. More...
 

Detailed Description

Cached DHCP packet.

Definition in file bios_cachedhcp.c.

Macro Definition Documentation

◆ cached_dhcpack_phys

#define cached_dhcpack_phys   __use_data16 ( cached_dhcpack_phys )

Definition at line 43 of file bios_cachedhcp.c.

◆ colour

#define colour   &cached_dhcpack_phys

Colour for debug messages.

Definition at line 46 of file bios_cachedhcp.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ __bss16()

Cached DHCPACK physical address.

This can be set by the prefix.

◆ cachedhcp_init()

static void cachedhcp_init ( void  )
static

Cached DHCPACK initialisation function.

Definition at line 52 of file bios_cachedhcp.c.

52  {
53  int rc;
54 
55  /* Do nothing if no cached DHCPACK is present */
56  if ( ! cached_dhcpack_phys ) {
57  DBGC ( colour, "CACHEDHCP found no cached DHCPACK\n" );
58  return;
59  }
60 
61  /* Record cached DHCPACK */
64  sizeof ( BOOTPLAYER_t ) ) ) != 0 ) {
65  DBGC ( colour, "CACHEDHCP could not record DHCPACK: %s\n",
66  strerror ( rc ) );
67  return;
68  }
69 
70  /* Mark as consumed */
72 }
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
#define cached_dhcpack_phys
#define DBGC(...)
Definition: compiler.h:505
userptr_t phys_to_user(unsigned long phys_addr)
Convert physical address to user pointer.
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
struct cached_dhcp_packet cached_dhcpack
Cached DHCPACK.
Definition: cachedhcp.c:49
#define colour
Colour for debug messages.
Format of buffer filled in by pxenv_get_cached_info()
Definition: pxe_api.h:322
int cachedhcp_record(struct cached_dhcp_packet *cache, userptr_t data, size_t max_len)
Record cached DHCP packet.
Definition: cachedhcp.c:172

References cached_dhcpack, cached_dhcpack_phys, cachedhcp_record(), colour, DBGC, phys_to_user(), rc, and strerror().

◆ __init_fn()

struct init_fn cachedhcp_init_fn __init_fn ( INIT_NORMAL  )

Cached DHCPACK initialisation function.