iPXE
Data Structures | Functions
udp.h File Reference

UDP protocol. More...

#include <stddef.h>
#include <ipxe/iobuf.h>
#include <ipxe/tcpip.h>
#include <ipxe/if_ether.h>

Go to the source code of this file.

Data Structures

struct  udp_header
 UDP constants. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
int udp_open_promisc (struct interface *xfer)
 Open a promiscuous UDP connection. More...
 
int udp_open (struct interface *xfer, struct sockaddr *peer, struct sockaddr *local)
 Open a UDP connection. More...
 

Detailed Description

UDP protocol.

This file defines the iPXE UDP API.

Definition in file udp.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ udp_open_promisc()

int udp_open_promisc ( struct interface xfer)

Open a promiscuous UDP connection.

Parameters
xferData transfer interface
Return values
rcReturn status code

Promiscuous UDP connections are required in order to support the PXE API.

Definition at line 144 of file udp.c.

144  {
145  return udp_open_common ( xfer, NULL, NULL, 1 );
146 }
static int udp_open_common(struct interface *xfer, struct sockaddr *peer, struct sockaddr *local, int promisc)
Open a UDP connection.
Definition: udp.c:75
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References NULL, udp_open_common(), and udp_connection::xfer.

Referenced by efi_pxe_udp_open(), and pxenv_udp_open().

◆ udp_open()

int udp_open ( struct interface xfer,
struct sockaddr peer,
struct sockaddr local 
)

Open a UDP connection.

Parameters
xferData transfer interface
peerPeer socket address
localLocal socket address, or NULL
Return values
rcReturn status code

Definition at line 130 of file udp.c.

131  {
132  return udp_open_common ( xfer, peer, local, 0 );
133 }
static int udp_open_common(struct interface *xfer, struct sockaddr *peer, struct sockaddr *local, int promisc)
Open a UDP connection.
Definition: udp.c:75

References udp_connection::local, udp_connection::peer, udp_open_common(), and udp_connection::xfer.