Merge branch 'master' of git://github.com/illumos/illumos-gate
[unleashed.git] / usr / src / grub / grub-0.97 / netboot / ip.h
blob496134e1e512e134f3b4830d1380628bc48ec5bd
1 #ifndef _IP_H
2 #define _IP_H
4 /* We need 'uint16_t' */
5 #include "types.h"
6 /* We need 'in_addr' */
7 #include "in.h"
9 struct iphdr {
10 uint8_t verhdrlen;
11 uint8_t service;
12 uint16_t len;
13 uint16_t ident;
14 uint16_t frags;
15 uint8_t ttl;
16 uint8_t protocol;
17 uint16_t chksum;
18 in_addr src;
19 in_addr dest;
22 extern void build_ip_hdr(unsigned long __destip, int __ttl, int __protocol,
23 int __option_len, int __len, const void * __buf);
25 extern int ip_transmit(int __len, const void * __buf);
27 extern uint16_t ipchksum(const void * __data, unsigned long __length);
29 extern uint16_t add_ipchksums(unsigned long __offset, uint16_t __sum,
30 uint16_t __new);
36 #endif /* _IP_H */