iPXE
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)
 FILE_SECBOOT (PERMITTED)
int udp_open_promisc (struct interface *xfer)
 Open a promiscuous UDP connection.
int udp_open (struct interface *xfer, struct sockaddr *peer, struct sockaddr *local)
 Open a UDP connection.

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 )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ udp_open_promisc()

int udp_open_promisc ( struct interface * xfer)
extern

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 145 of file udp.c.

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

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 )
extern

Open a UDP connection.

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

Definition at line 131 of file udp.c.

132 {
133 return udp_open_common ( xfer, peer, local, 0 );
134}
struct mschapv2_challenge peer
Peer challenge.
Definition mschapv2.h:1

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