diff options
author | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 1998-11-12 21:39:22 +0000 |
---|---|---|
committer | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 1998-11-12 21:39:22 +0000 |
commit | df42a161d48cc2fc0ec76533968570fa8e9b3df2 (patch) | |
tree | 0438142e4fa8f34cf7635a8142403361350800d0 /packet-bootp.c | |
parent | 10948bf7cdb0c67b7063b333a12c1093b7eb9675 (diff) |
Added a patch to wiretap from Guy Harris to help compile wiretap in
different situations. I also fixed bootp so that is properly handles
unknown BOOTP options.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@85 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-bootp.c')
-rw-r--r-- | packet-bootp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packet-bootp.c b/packet-bootp.c index e6e58a2008..83931d1cad 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.8 1998/11/12 00:06:24 gram Exp $ + * $Id: packet-bootp.c,v 1.9 1998/11/12 21:39:18 gram Exp $ * * The information used comes from: * RFC 2132: DHCP Options and BOOTP Vendor Extensions @@ -272,8 +272,8 @@ bootp_option(const u_char *pd, GtkWidget *bp_tree, int voff, int eoff) } /* Normal cases */ + consumed = vlen + 2; if (code < NUM_OPT_INFOS) { - consumed = vlen + 2; text = opt[code].text; ftype = opt[code].ftype; @@ -370,12 +370,13 @@ bootp_option(const u_char *pd, GtkWidget *bp_tree, int voff, int eoff) break; default: - add_item_to_tree(bp_tree, voff, consumed, "Option %d: %s", - code, text); + add_item_to_tree(bp_tree, voff, consumed, + "Option %d: %s (%d bytes)", code, text, vlen); } } else { - add_item_to_tree(bp_tree, voff, 1, "Unknown Option Code: %d", code); + add_item_to_tree(bp_tree, voff, consumed, + "Unknown Option Code: %d (%d bytes)", code, vlen); } return consumed; |