* Routines for the Generic Routing Encapsulation (GRE) protocol
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-gre.c,v 1.46 2001/11/25 22:51:13 hagbard Exp $
+ * $Id: packet-gre.c,v 1.50 2002/01/21 07:36:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <netinet/in.h>
#endif
#include <glib.h>
-#include "packet.h"
+#include <epan/packet.h>
#include "packet-wccp.h"
#include "in_cksum.h"
#include "etypes.h"
flags_and_ver = tvb_get_ntohs(tvb, offset);
type = tvb_get_ntohs(tvb, offset + sizeof(flags_and_ver));
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "GRE");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "GRE");
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "Encapsulated %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Encapsulated %s",
val_to_str(type, typevals, "0x%04X (unknown)"));
}
proto_register_subtree_array(ett, array_length(ett));
/* subdissector code */
- gre_dissector_table = register_dissector_table("gre.proto");
+ gre_dissector_table = register_dissector_table("gre.proto",
+ "GRE protocol type", FT_UINT16, BASE_HEX);
}
void
proto_reg_handoff_gre(void)
{
- dissector_add("ip.proto", IP_PROTO_GRE, dissect_gre, proto_gre);
+ dissector_handle_t gre_handle;
+
+ gre_handle = create_dissector_handle(dissect_gre, proto_gre);
+ dissector_add("ip.proto", IP_PROTO_GRE, gre_handle);
data_handle = find_dissector("data");
}