- fix potential buffer overflow problems.
[obnox/wireshark/wip.git] / packet-rip.h
1 /* packet-rip.h
2  *
3  * $Id: packet-rip.h,v 1.6 2000/08/11 13:34:02 deniel Exp $
4  *
5  * (c) 1998 Hannes Boehm
6  *
7  * Ethereal - Network traffic analyzer
8  * By Gerald Combs <gerald@zing.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * 
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  * 
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  * 
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25  */
26
27 #ifndef __PACKET_RIP_H__
28 #define __PACKET_RIP_H__
29
30 #define RIPv1   1
31 #define RIPv2   2
32
33 #define RIP_HEADER_LENGTH 4
34 #define RIP_ENTRY_LENGTH 20
35
36 typedef struct _e_riphdr {
37     guint8      command;
38     guint8      version;
39     guint16     domain;
40 } e_riphdr;
41
42 typedef struct _e_rip_vektor {
43     guint16     family;
44     guint16     tag;
45     guint32     ip;
46     guint32     mask;
47     guint32     next_hop;
48     guint32     metric;
49 } e_rip_vektor;
50
51 typedef struct _e_rip_authentication {
52     guint16     family;
53     guint16     authtype;
54     guint8      authentication[16];
55 } e_rip_authentication;
56
57 typedef union _e_rip_entry {
58     e_rip_vektor        vektor;
59     e_rip_authentication authentication;
60 } e_rip_entry;
61
62 #endif