xmalloc: put __hidden behind signature
[netsniff-ng.git] / ipv6.h
blob405220f866bfcb3931ed2471279b1d4b474e48bc
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * By Daniel Borkmann <daniel@netsniff-ng.org>.
4 * Copyright (C) 2009, 2010 Daniel Borkmann
5 * Copyright (C) 2012 Christoph Jaeger <christoph@netsniff-ng.org>
6 * Subject to the GPL, version 2.
7 */
9 #ifndef IPV6_H
10 #define IPV6_H
12 #include <asm/byteorder.h>
14 #include "built_in.h"
17 * IPv6 fixed header
19 * BEWARE, it is incorrect. The first 4 bits of flow_lbl
20 * are glued to priority now, forming "class".
22 struct ipv6hdr {
23 #if defined(__LITTLE_ENDIAN_BITFIELD)
24 __extension__ uint8_t priority:4,
25 version:4;
26 #elif defined(__BIG_ENDIAN_BITFIELD)
27 __extension__ uint8_t version:4,
28 priority:4;
29 #else
30 # error "Please fix <asm/byteorder.h>"
31 #endif
32 uint8_t flow_lbl[3];
33 uint16_t payload_len;
34 uint8_t nexthdr;
35 uint8_t hop_limit;
36 struct in6_addr saddr;
37 struct in6_addr daddr;
38 } __packed;
40 #endif /* IPV6_H */