summaryrefslogtreecommitdiff
path: root/usr/src/grub/grub-0.97/netboot/udp.h
blob: 9d4f6123ea03c3cd0233b62d45beeb1d54fe396f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef	_UDP_H
#define	_UDP_H

/* We need 'uint16_t' and 'uint8_t'  */
#include "types.h"
/* We need 'in_addr' */
#include "in.h"

struct udp_pseudo_hdr {
	in_addr  src;
	in_addr  dest;
	uint8_t  unused;
	uint8_t  protocol;
	uint16_t len;
};
struct udphdr {
	uint16_t src;
	uint16_t dest;
	uint16_t len;
	uint16_t chksum;
};

extern void build_udp_hdr(unsigned long __destip, unsigned int __srcsock, 
	      unsigned int __destsock, int __ttl, int __len, 
	      const void * __buf);

extern int udp_transmit(unsigned long __destip, unsigned int __srcsock,
			unsigned int __destsock, int __len, const void * __buf);

#endif	/* _UDP_H */