udp.h File Reference

UDP protocol. More...

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

Go to the source code of this file.

Data Structures

struct  udp_header
 A UDP header. More...

Defines

#define UDP_MAX_HLEN   72
 UDP constants.
#define UDP_MAX_TXIOB   ETH_MAX_MTU
#define UDP_MIN_TXIOB   ETH_ZLEN

Functions

 FILE_LICENCE (GPL2_OR_LATER)
int udp_open_promisc (struct xfer_interface *xfer)
 Open a promiscuous UDP connection.
int udp_open (struct xfer_interface *xfer, struct sockaddr *peer, struct sockaddr *local)
 Open a UDP connection.


Detailed Description

UDP protocol.

This file defines the gPXE UDP API.

Definition in file udp.h.


Define Documentation

#define UDP_MAX_HLEN   72

UDP constants.

Definition at line 25 of file udp.h.

Referenced by udp_alloc_iob(), and udp_tx().

#define UDP_MAX_TXIOB   ETH_MAX_MTU

Definition at line 26 of file udp.h.

#define UDP_MIN_TXIOB   ETH_ZLEN

Definition at line 27 of file udp.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

int udp_open_promisc ( struct xfer_interface xfer  ) 

Open a promiscuous UDP connection.

Parameters:
xfer Data transfer interface
Return values:
rc Return status code
Promiscuous UDP connections are required in order to support the PXE API.

Definition at line 159 of file udp.c.

References NULL, and udp_open_common().

Referenced by pxenv_udp_open().

00159                                                      {
00160         return udp_open_common ( xfer, NULL, NULL, 1 );
00161 }

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

Open a UDP connection.

Parameters:
xfer Data transfer interface
peer Peer socket address
local Local socket address, or NULL
Return values:
rc Return status code

Definition at line 145 of file udp.c.

References udp_open_common().

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


Generated on Tue Apr 6 20:01:52 2010 for gPXE by  doxygen 1.5.7.1