105 switch ( packet_type ) {
107 return "DHCPDISCOVER";
129 #define cached_info __use_data16 ( cached_info ) 155 sizeof ( *
info ) ) ) != 0 ) {
191 get_cached_info->
Buffer.segment,
234 get_cached_info->
BufferSize =
sizeof ( *info );
236 get_cached_info->
Buffer.segment,
237 get_cached_info->
Buffer.offset,
243 len =
sizeof ( *info );
247 get_cached_info->
Buffer.offset );
285 unsigned int bus_type;
286 unsigned int location;
290 start_undi->
AX, start_undi->
BX, start_undi->
DX );
300 location = start_undi->
BX;
305 location = start_undi->
AX;
void pxe_activate(struct net_device *netdev)
Activate PXE stack.
Parameter block for pxenv_stop_base()
static const char * pxenv_get_cached_info_name(int packet_type)
Name PXENV_GET_CACHED_INFO packet type.
UINT16_t BufferLimit
Maximum buffer size.
PXENV_STATUS_t Status
PXE status code.
static PXENV_EXIT_t pxenv_restart_tftp(struct s_PXENV_TFTP_READ_FILE *restart_tftp)
struct arbelprm_rc_send_wqe rc
Dynamic Host Configuration Protocol.
#define PXENV_EXIT_FAILURE
An error occurred.
#define PXENV_START_UNDI
PXE API function code for pxenv_start_undi()
#define PXENV_STOP_UNDI
PXE API function code for pxenv_stop_undi()
Parameter block for pxenv_unload_stack()
int create_fakedhcpack(struct net_device *netdev, void *data, size_t max_len)
Create fake DHCPACK packet.
UINT16_t PacketType
Packet type.
static struct pxe_dhcp_packet_creator pxe_dhcp_packet_creators[]
PXE DHCP packet creators.
static PXENV_EXIT_t pxenv_stop_undi(struct s_PXENV_STOP_UNDI *stop_undi)
Parameter block for pxenv_get_cached_info()
#define PXENV_PACKET_TYPE_DHCP_ACK
The DHCP server's DHCPACK packet.
PXENV_EXIT_t pxenv_tftp_read_file(struct s_PXENV_TFTP_READ_FILE *tftp_read_file)
TFTP/MTFTP read file.
#define PXENV_START_BASE
PXE API function code for pxenv_start_base()
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Access to external ("user") memory.
UINT32_t BufferSize
Size of data buffer.
int create_fakedhcpdiscover(struct net_device *netdev, void *data, size_t max_len)
Create fake DHCPDISCOVER packet.
#define ISAPNP_READ_PORT_MAX
#define PXE_API_CALL(_opcode, _entry, _params_type)
Define a PXE API call.
#define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC
PXENV_STATUS_t Status
PXE status code.
void pxe_fake_cached_info(void)
Construct cached DHCP packets.
pxe_cached_info_indices
Zero-based versions of PXENV_GET_CACHED_INFO::PacketType.
UINT16_t PXENV_EXIT_t
A PXE exit code.
uint32_t userptr_t
A pointer to a user buffer.
#define BUS_TYPE_PCI
PCI bus type.
int pxe_deactivate(void)
Deactivate PXE stack.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
PXENV_STATUS_t Status
PXE status code.
#define PXENV_STATUS_KEEP_UNDI
static PXENV_EXIT_t pxenv_start_base(struct s_PXENV_START_BASE *start_base)
static struct net_device * netdev
UINT16_t BufferSize
Buffer size.
UINT16_t BX
bx register as passed to the Option ROM initialisation routine.
#define hooked_bios_interrupts
struct pxe_api_call pxe_preboot_api [] __pxe_api_call
PXE preboot API.
PXENV_STATUS_t Status
PXE status code.
char * strerror(int errno)
Retrieve string representation of error number.
struct net_device * pxe_netdev
static __always_inline void copy_to_user(userptr_t dest, off_t dest_off, const void *src, size_t len)
Copy data to user buffer.
#define PXENV_PACKET_TYPE_DHCP_DISCOVER
The client's DHCPDISCOVER packet.
#define PXENV_STATUS_UNSUPPORTED
static PXENV_EXIT_t pxenv_unload_stack(struct s_PXENV_UNLOAD_STACK *unload_stack)
UNLOAD BASE CODE STACK.
PXENV_STATUS_t Status
PXE status code.
SEGOFF16_t Buffer
Buffer address.
#define PXENV_RESTART_TFTP
PXE API function code for pxenv_restart_tftp()
#define ISAPNP_READ_PORT_MIN
#define PXENV_UNLOAD_STACK
PXE API function code for pxenv_unload_stack()
#define PXENV_EXIT_SUCCESS
No error occurred.
Network device management.
static PXENV_EXIT_t pxenv_get_cached_info(struct s_PXENV_GET_CACHED_INFO *get_cached_info)
char name[NETDEV_NAME_LEN]
Name of this network device.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
Parameter block for pxenv_start_base()
#define PXENV_PACKET_TYPE_CACHED_REPLY
The Boot Server's Discover Reply packet.
#define __from_data16(pointer)
uint16_t isapnp_read_port
ISAPnP Read Port address.
Parameter block for pxenv_tftp_read_file()
ADDR32_t Buffer
Address of data buffer.
uint8_t data[48]
Additional event data.
Format of buffer filled in by pxenv_get_cached_info()
#define PXENV_GET_CACHED_INFO
PXE API function code for pxenv_get_cached_info()
#define PXE_LOAD_PHYS
PXE physical load address.
static __always_inline userptr_t real_to_user(unsigned int segment, unsigned int offset)
Convert segment:offset address to user buffer.
#define PXENV_STOP_BASE
PXE API function code for pxenv_stop_base()
Parameter block for pxenv_start_undi()
#define PXENV_STATUS_SUCCESS
#define rmlongjmp(_env, _val)
UINT16_t AX
ax register as passed to the Option ROM initialisation routine.
struct net_device * find_netdev_by_location(unsigned int bus_type, unsigned int location)
Get network device by PCI bus:dev.fn address.
PXENV_STATUS_t Status
PXE status code.
static void shutdown_boot(void)
Shut down system for OS boot.
#define NULL
NULL pointer (VOID *)
rmjmp_buf pxe_restart_nbp
Jump buffer for PXENV_RESTART_TFTP.
UINT16_t DX
dx register as passed to the Option ROM initialisation routine.
int create_fakepxebsack(struct net_device *netdev, void *data, size_t max_len)
Create fake PXE Boot Server ACK packet.
Parameter block for pxenv_stop_undi()
A PXE DHCP packet creator.
void startup(void)
Start up iPXE.
static union pxe_cached_info __bss16_array(cached_info, [NUM_CACHED_INFOS])
static PXENV_EXIT_t pxenv_stop_base(struct s_PXENV_STOP_BASE *stop_base)
int(* create)(struct net_device *netdev, void *data, size_t max_len)
Create DHCP packet.
#define BUS_TYPE_ISAPNP
ISAPnP bus type.
void * memset(void *dest, int character, size_t len) __nonnull
static PXENV_EXIT_t pxenv_start_undi(struct s_PXENV_START_UNDI *start_undi)