xref: /titanic_41/usr/src/grub/grub-0.97/netboot/udp.h (revision 1b8adde7ba7d5e04395c141c5400dc2cffd7d809)
1 #ifndef	_UDP_H
2 #define	_UDP_H
3 
4 /* We need 'uint16_t' and 'uint8_t'  */
5 #include "types.h"
6 /* We need 'in_addr' */
7 #include "in.h"
8 
9 struct udp_pseudo_hdr {
10 	in_addr  src;
11 	in_addr  dest;
12 	uint8_t  unused;
13 	uint8_t  protocol;
14 	uint16_t len;
15 };
16 struct udphdr {
17 	uint16_t src;
18 	uint16_t dest;
19 	uint16_t len;
20 	uint16_t chksum;
21 };
22 
23 extern void build_udp_hdr(unsigned long __destip, unsigned int __srcsock,
24 	      unsigned int __destsock, int __ttl, int __len,
25 	      const void * __buf);
26 
27 extern int udp_transmit(unsigned long __destip, unsigned int __srcsock,
28 			unsigned int __destsock, int __len, const void * __buf);
29 
30 #endif	/* _UDP_H */
31