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 
12 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
13 FILE_SECBOOT ( PERMITTED );
14 
15 #include <stddef.h>
16 #include <ipxe/iobuf.h>
17 #include <ipxe/tcpip.h>
18 #include <ipxe/if_ether.h>
19 
20 struct interface;
21 struct sockaddr;
22 
23 /**
24  * UDP constants
25  */
26 
27 /**
28  * A UDP header
29  */
30 struct udp_header {
31  /** Source port */
33  /** Destination port */
35  /** Length */
37  /** Checksum */
39 };
40 
41 extern int udp_open_promisc ( struct interface *xfer );
42 extern int udp_open ( struct interface *xfer, struct sockaddr *peer,
43  struct sockaddr *local );
44 
45 #endif /* _IPXE_UDP_H */
46 
int udp_open_promisc(struct interface *xfer)
Open a promiscuous UDP connection.
Definition: udp.c:145
unsigned short uint16_t
Definition: stdint.h:11
uint16_t chksum
Checksum.
Definition: udp.h:38
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
I/O buffers.
uint16_t src
Source port.
Definition: udp.h:32
uint16_t len
Length.
Definition: udp.h:36
An object interface.
Definition: interface.h:125
FILE_SECBOOT(PERMITTED)
Transport-network layer interface.
Generalized socket address structure.
Definition: socket.h:97
uint16_t dest
Destination port.
Definition: udp.h:34
struct mschapv2_challenge peer
Peer challenge.
Definition: mschapv2.h:12
UDP constants.
Definition: udp.h:30
int udp_open(struct interface *xfer, struct sockaddr *peer, struct sockaddr *local)
Open a UDP connection.
Definition: udp.c:131