diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-29 05:47:07 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-29 05:47:07 +0000 |
commit | 7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3 (patch) | |
tree | 3e8a46fe6f7bb69698edb1187655e445bbfda37c /packet-rip.c | |
parent | 6f1d3a3be830da628246f7cea77fe9c491470d17 (diff) |
Made the protocol (but not the fields) use the new proto_tree routine,
allowing users to filter on the existence of these protocols. I also
added packet-clip.c to the Nmake makefile.
svn path=/trunk/; revision=402
Diffstat (limited to 'packet-rip.c')
-rw-r--r-- | packet-rip.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/packet-rip.c b/packet-rip.c index 7d1a780638..9b05d3e8bb 100644 --- a/packet-rip.c +++ b/packet-rip.c @@ -2,7 +2,7 @@ * Routines for RIPv1 and RIPv2 packet disassembly * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-rip.c,v 1.9 1999/07/07 22:51:52 gram Exp $ + * $Id: packet-rip.c,v 1.10 1999/07/29 05:47:02 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -38,6 +38,8 @@ #include "packet.h" #include "packet-rip.h" +static int proto_rip = -1; + static void dissect_ip_rip_vektor(guint8 version, const e_rip_vektor *rip_vektor, int offset, proto_tree *tree); static void dissect_rip_authentication(const e_rip_authentication *rip_authentication, @@ -90,7 +92,7 @@ dissect_rip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { col_add_str(fd, COL_INFO, packet_type[rip_header.command]); if (tree) { - ti = proto_tree_add_text(tree, offset, (fd->cap_len - offset), "Routing Information Protocol"); + ti = proto_tree_add_item(tree, proto_rip, offset, (fd->cap_len - offset), NULL); rip_tree = proto_item_add_subtree(ti, ETT_RIP); proto_tree_add_text(rip_tree, offset, 1, "Command: %d (%s)", rip_header.command, packet_type[rip_header.command]); @@ -175,3 +177,14 @@ dissect_rip_authentication(const e_rip_authentication *rip_authentication, rip_authentication->authentication); } +void +proto_register_rip(void) +{ +/* static hf_register_info hf[] = { + { &variable, + { "Name", "rip.abbreviation", TYPE, VALS_POINTER }}, + };*/ + + proto_rip = proto_register_protocol("Routing Information Protocol", "rip"); + /* proto_register_field_array(proto_rip, hf, array_length(hf));*/ +} |