96 DBG (
"PXE could not prepend pseudo-header\n" );
100 pshdr =
iob_push ( iobuf,
sizeof ( *pshdr ) );
179 DBG (
"PXENV_UDP_OPEN" );
188 DBG (
"PXENV_UDP_OPEN could not (implicitly) open %s: %s\n",
197 DBG (
"PXENV_UDP_OPEN could not open promiscuous socket: %s\n",
233 DBG (
"PXENV_UDP_CLOSE\n" );
302 DBG (
"PXENV_UDP_WRITE" );
327 DBG (
" out of memory\n" );
343 DBG (
"PXENV_UDP_WRITE could not transmit: %s\n",
414 DBG2 (
"PXENV_UDP_READ\n" );
422 iob_pull ( iobuf,
sizeof ( *pshdr ) );
425 DBG (
"PXENV_UDP_READ" );
428 if ( dest_ip_wanted.
s_addr &&
434 if ( d_port_wanted && ( d_port_wanted !=
d_port ) ) {
436 DBG (
" (wanted %d)\n",
htons ( d_port_wanted ) );
494 unsigned int discarded = 0;
#define iob_pull(iobuf, len)
#define PXENV_STATUS_OUT_OF_RESOURCES
An object interface operation.
struct arbelprm_rc_send_wqe rc
void intf_restart(struct interface *intf, int rc)
Shut down and restart an object interface.
#define iob_put(iobuf, len)
#define PXENV_EXIT_FAILURE
An error occurred.
#define iob_push(iobuf, len)
void free_iob(struct io_buffer *iobuf)
Free I/O buffer.
#define INTF_INIT(descriptor)
Initialise a static object interface.
static __always_inline void copy_from_user(void *dest, userptr_t src, off_t src_off, size_t len)
Copy data from user buffer.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
Parameter block for pxenv_udp_close()
struct io_buffer * xfer_alloc_iob(struct interface *intf, size_t len)
Allocate I/O buffer.
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
sa_family_t sin_family
Socket address family (part of struct sockaddr)
Access to external ("user") memory.
struct cache_discarder pxe_udp_discarder __cache_discarder(CACHE_NORMAL)
PXE UDP cache discarder.
Parameter block for pxenv_udp_read()
A doubly-linked list entry (or list head)
#define PXE_API_CALL(_opcode, _entry, _params_type)
Define a PXE API call.
Dynamic memory allocation.
Data transfer interfaces.
#define list_empty(list)
Test whether a list is empty.
#define list_first_entry(list, type, member)
Get the container of the first entry in a list.
#define list_del(list)
Delete an entry from a list.
#define ENOMEM
Not enough space.
UDP_PORT_t d_port
Destination UDP port.
UINT16_t PXENV_EXIT_t
A PXE exit code.
uint32_t userptr_t
A pointer to a user buffer.
static int netdev_is_open(struct net_device *netdev)
Check whether or not network device is open.
static unsigned int pxe_udp_discard(void)
Discard some cached PXE UDP data.
Parameter block for pxenv_udp_open()
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
unsigned int(* discard)(void)
Discard some cached data.
#define list_add_tail(new, head)
Add a new entry to the tail of a list.
UINT16_t UDP_PORT_t
A UDP port.
static PXENV_EXIT_t pxenv_udp_close(struct s_PXENV_UDP_CLOSE *pxenv_udp_close)
UDP CLOSE.
int udp_open_promisc(struct interface *xfer)
Open a promiscuous UDP connection.
static PXENV_EXIT_t pxenv_udp_read(struct s_PXENV_UDP_READ *pxenv_udp_read)
UDP READ.
#define list_for_each_entry_safe(pos, tmp, head, member)
Iterate over entries in a list, safe against deletion of the current entry.
static PXENV_EXIT_t pxenv_udp_write(struct s_PXENV_UDP_WRITE *pxenv_udp_write)
UDP WRITE.
Generalized socket address structure.
An object interface descriptor.
char * strerror(int errno)
Retrieve string representation of error number.
static struct interface_descriptor pxe_udp_xfer_desc
PXE UDP data transfer interface descriptor.
static PXENV_EXIT_t pxenv_udp_open(struct s_PXENV_UDP_OPEN *pxenv_udp_open)
UDP OPEN.
struct net_device * pxe_netdev
uint16_t sin_port
TCP/IP port (part of struct sockaddr_tcpip)
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
IP4_t dest_ip
Destination IP address.
#define INTF_OP(op_type, object_type, op_func)
Define an object interface operation.
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.
int xfer_deliver(struct interface *intf, struct io_buffer *iobuf, struct xfer_metadata *meta)
Deliver datagram.
char * inet_ntoa(struct in_addr in)
Convert IPv4 address to dotted-quad notation.
#define PXENV_UDP_READ
PXE API function code for pxenv_udp_read()
#define PXENV_UDP_CLOSE
PXE API function code for pxenv_udp_close()
static int pxe_udp_deliver(struct pxe_udp_connection *pxe_udp, struct io_buffer *iobuf, struct xfer_metadata *meta)
Receive PXE UDP data.
#define CACHE_NORMAL
Items with a normal replacement cost.
struct sockaddr_in local
Local address.
struct interface xfer
Data transfer interface to UDP stack.
struct pxe_api_call pxe_udp_api [] __pxe_api_call
PXE UDP API.
#define PXENV_EXIT_SUCCESS
No error occurred.
#define PXENV_UDP_WRITE
PXE API function code for pxenv_udp_write()
Network device management.
struct in_addr sin_addr
IPv4 address.
#define INTF_DESC(object_type, intf, operations)
Define an object interface descriptor.
char name[NETDEV_NAME_LEN]
Name of this network device.
struct list_head list
List of which this buffer is a member.
struct list_head list
List of received packets.
void * data
Start of data.
void step(void)
Single-step a single process.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
static struct pxe_udp_connection pxe_udp
The PXE UDP connection.
static __always_inline userptr_t real_to_user(unsigned int segment, unsigned int offset)
Convert segment:offset address to user buffer.
UINT32_t IP4_t
An IPv4 address.
#define PXENV_STATUS_SUCCESS
#define DBG(...)
Print a debugging message.
#define LIST_HEAD_INIT(list)
Initialise a static list head.
int iob_ensure_headroom(struct io_buffer *iobuf, size_t len)
Ensure I/O buffer has sufficient headroom.
int netdev_open(struct net_device *netdev)
Open network device.
#define PXENV_UDP_OPEN
PXE API function code for pxenv_udp_open()
#define PXENV_STATUS(rc)
Derive PXENV_STATUS code from iPXE error number.
#define AF_INET
IPv4 Internet addresses.
#define PXENV_STATUS_FAILURE
static struct interface_operation pxe_udp_xfer_operations[]
PXE UDP data transfer interface operations.
void * memset(void *dest, int character, size_t len) __nonnull
Parameter block for pxenv_udp_write()