* Routines for the Generic Routing Encapsulation (GRE) protocol
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-gre.c,v 1.50 2002/01/21 07:36:34 guy Exp $
+ * $Id: packet-gre.c,v 1.55 2004/01/29 03:51:25 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
#include <glib.h>
#include <epan/packet.h>
#include "packet-wccp.h"
#include "etypes.h"
#include "greproto.h"
#include "ipproto.h"
+#include "llcsaps.h"
/*
* See RFC 1701 "Generic Routing Encapsulation (GRE)", RFC 1702
static const value_string typevals[] = {
{ ETHERTYPE_PPP, "PPP" },
{ ETHERTYPE_IP, "IP" },
+ { SAP_OSINL5, "OSI"},
{ GRE_WCCP, "WCCP"},
{ ETHERTYPE_IPX, "IPX"},
{ ETHERTYPE_ETHBRIDGE, "Transparent Ethernet bridging" },
{ GRE_FR, "Frame Relay"},
+ { ETHERTYPE_IPv6, "IPv6" },
{ 0, NULL }
};
offset += 4;
}
}
-
+
if (flags_and_ver & GH_B_S) {
if (tree) {
proto_tree_add_text(gre_tree, tvb, offset, 4,
proto_item * ti;
proto_tree * fv_tree;
int nbits = sizeof(flags_and_ver) * 8;
-
- ti = proto_tree_add_text(tree, tvb, offset, 2,
+
+ ti = proto_tree_add_text(tree, tvb, offset, 2,
"Flags and version: %#04x", flags_and_ver);
fv_tree = proto_item_add_subtree(ti, ett_gre_flags);
-
+
proto_tree_add_text(fv_tree, tvb, offset, sizeof(flags_and_ver), "%s",
decode_boolean_bitfield(flags_and_ver, GH_B_C, nbits,
"Checksum", "No checksum"));
proto_item * ti;
proto_tree * rh_tree;
guint8 rh_flags;
-
+
ti = proto_tree_add_text(tree, tvb, offset, 4, "Redirect header");
rh_tree = proto_item_add_subtree(ti, ett_gre_wccp2_redirect_header);
proto_tree_add_text(rh_tree, tvb, offset + 3, 1, "Primary bucket index: %u",
tvb_get_guint8(tvb, offset + 3));
}
-
+
void
proto_register_gre(void)
{