iPXE
udp.h
Go to the documentation of this file.
1#ifndef _IPXE_UDP_H
2#define _IPXE_UDP_H
3
4/** @file
5 *
6 * UDP protocol
7 *
8 * This file defines the iPXE UDP API.
9 *
10 */
11
12FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
13FILE_SECBOOT ( PERMITTED );
14
15#include <stddef.h>
16#include <ipxe/iobuf.h>
17#include <ipxe/tcpip.h>
18#include <ipxe/if_ether.h>
19
20struct interface;
21struct sockaddr;
22
23/**
24 * UDP constants
25 */
26
27/**
28 * A UDP header
29 */
30struct udp_header {
31 /** Source port */
33 /** Destination port */
35 /** Length */
37 /** Checksum */
39};
40
41extern int udp_open_promisc ( struct interface *xfer );
42extern int udp_open ( struct interface *xfer, struct sockaddr *peer,
43 struct sockaddr *local );
44
45#endif /* _IPXE_UDP_H */
46
unsigned short uint16_t
Definition stdint.h:11
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
Transport-network layer interface.
I/O buffers.
struct mschapv2_challenge peer
Peer challenge.
Definition mschapv2.h:1
An object interface.
Definition interface.h:125
Generalized socket address structure.
Definition socket.h:97
UDP constants.
Definition udp.h:30
uint16_t dest
Destination port.
Definition udp.h:34
uint16_t src
Source port.
Definition udp.h:32
uint16_t len
Length.
Definition udp.h:36
uint16_t chksum
Checksum.
Definition udp.h:38
int udp_open_promisc(struct interface *xfer)
Open a promiscuous UDP connection.
Definition udp.c:145
int udp_open(struct interface *xfer, struct sockaddr *peer, struct sockaddr *local)
Open a UDP connection.
Definition udp.c:131