Add checks in "rd_add_field_to_tree()" for the length of the field.
[obnox/wireshark/wip.git] / epan / ipv6-utils.h
1 /* ipv6-utils.h
2  * Definitions for IPv6 packet disassembly
3  *
4  * $Id$
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@ethereal.com>
8  *
9  * Copyright 1998 Gerald Combs
10  *
11  * MobileIPv6 support added by Tomislav Borosa <tomislav.borosa@siemens.hr>
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26  */
27
28 #ifndef __IPV6_UTILS_H__
29 #define __IPV6_UTILS_H__
30
31 struct e_in6_addr {
32         union {
33                 guint32  u6_addr32[4];
34                 guint16  u6_addr16[8];
35                 guint8   u6_addr8[16];
36         } u6_addr;                      /* 128 bit IP6 address */
37 };
38
39 #ifdef s6_addr32
40 #undef s6_addr32
41 #endif
42
43 #ifdef s6_addr16
44 #undef s6_addr16
45 #endif
46
47 #ifdef s6_addr8
48 #undef s6_addr8
49 #endif
50
51 #ifdef s6_addr
52 #undef s6_addr
53 #endif
54
55 #define s6_addr32 u6_addr.u6_addr32
56 #define s6_addr16 u6_addr.u6_addr16
57 #define s6_addr8  u6_addr.u6_addr8
58 #define s6_addr   u6_addr.u6_addr8
59
60 #endif /* __IPV6_UTILS_H__ */