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 */ 31 uint16_t src; 32 /** Destination port */ 33 uint16_t dest; 34 /** Length */ 35 uint16_t len; 36 /** Checksum */ 37 uint16_t chksum; 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 46