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.
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 ( GPL2_OR_LATER_OR_UBDL  )
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.

References NULL, and udp_open_common().

Referenced by efi_pxe_udp_open(), and pxenv_udp_open().

                                                {
        return udp_open_common ( xfer, NULL, NULL, 1 );
}
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.

References udp_open_common().

                                        {
        return udp_open_common ( xfer, peer, local, 0 );
}