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