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-ospf.c | |
parent | 6f1d3a3be830da628246f7cea77fe9c491470d17 (diff) | |
download | wireshark-7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3.tar.gz |
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-ospf.c')
-rw-r--r-- | packet-ospf.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/packet-ospf.c b/packet-ospf.c index f4fd8b2584..fe5d6f0d7a 100644 --- a/packet-ospf.c +++ b/packet-ospf.c @@ -2,7 +2,7 @@ * Routines for OSPF packet disassembly * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-ospf.c,v 1.11 1999/07/07 22:51:50 gram Exp $ + * $Id: packet-ospf.c,v 1.12 1999/07/29 05:47:01 gram Exp $ * * At this time, this module is able to analyze OSPF * packets as specified in RFC2328. MOSPF (RFC1584) and other @@ -50,6 +50,7 @@ #include "packet.h" #include "packet-ospf.h" +static int proto_ospf = -1; void dissect_ospf(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { @@ -80,7 +81,7 @@ dissect_ospf(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { } if (tree) { - ti = proto_tree_add_text(tree, offset, ntohs(ospfh.length), "Open Shortest Path First"); + ti = proto_tree_add_item(tree, proto_ospf, offset, ntohs(ospfh.length), NULL); ospf_tree = proto_item_add_subtree(ti, ETT_OSPF); ti = proto_tree_add_text(ospf_tree, offset, OSPF_HEADER_LENGTH, "OSPF Header"); @@ -572,3 +573,15 @@ dissect_ospf_lsa(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, /* return the length of this LSA */ return ntohs(lsa_hdr.length); } + +void +proto_register_ospf(void) +{ +/* static hf_register_info hf[] = { + { &variable, + { "Name", "ospf.abbreviation", TYPE, VALS_POINTER }}, + };*/ + + proto_ospf = proto_register_protocol("Open Shortest Path First", "ospf"); + /* proto_register_field_array(proto_ospf, hf, array_length(hf));*/ +} |