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-bootp.c | |
parent | 6f1d3a3be830da628246f7cea77fe9c491470d17 (diff) | |
download | wireshark-7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3.tar.gz wireshark-7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3.tar.bz2 wireshark-7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3.zip |
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-bootp.c')
-rw-r--r-- | packet-bootp.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/packet-bootp.c b/packet-bootp.c index 19fcf4f4dc..94d13636f3 100644 --- a/packet-bootp.c +++ b/packet-bootp.c @@ -2,7 +2,7 @@ * Routines for BOOTP/DHCP packet disassembly * Gilbert Ramirez <gram@verdict.uthscsa.edu> * - * $Id: packet-bootp.c,v 1.17 1999/07/07 22:51:40 gram Exp $ + * $Id: packet-bootp.c,v 1.18 1999/07/29 05:46:52 gram Exp $ * * The information used comes from: * RFC 2132: DHCP Options and BOOTP Vendor Extensions @@ -40,6 +40,8 @@ #include <glib.h> #include "packet.h" +static int proto_bootp = -1; + enum field_type { none, ipv4, string, toggle, yes_no, special, opaque, time_in_secs, val_u_byte, val_u_short, val_u_long, @@ -452,8 +454,7 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) } if (tree) { - ti = proto_tree_add_text(tree, offset, END_OF_FRAME, - "Bootstrap Protocol"); + ti = proto_tree_add_item(tree, proto_bootp, offset, END_OF_FRAME, NULL); bp_tree = proto_item_add_subtree(ti, ETT_BOOTP); proto_tree_add_text(bp_tree, offset, 1, pd[offset] == 1 ? @@ -524,3 +525,14 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) } } +void +proto_register_bootp(void) +{ +/* static hf_register_info hf[] = { + { &variable, + { "Name", "bootp.abbreviation", TYPE, VALS_POINTER }}, + };*/ + + proto_bootp = proto_register_protocol("Bootstrap Protocol", "bootp"); + /* proto_register_field_array(proto_bootp, hf, array_length(hf));*/ +} |