diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-12-03 20:01:20 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-12-03 20:01:20 +0000 |
commit | d4ebb360c6db0d2470369d1f5b480648532f54c3 (patch) | |
tree | 8b95297e275e5cd7696e8c42af1700c856aed0ad /packet-bootp.c | |
parent | 408556759428576b1e94ad8b11dd6352dabdc7fc (diff) |
From Greg Morris: handle the backwards compatibility flag for options 78
and 79.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9156 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-bootp.c')
-rw-r--r-- | packet-bootp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/packet-bootp.c b/packet-bootp.c index 01265d24c3..a00853ba44 100644 --- a/packet-bootp.c +++ b/packet-bootp.c @@ -2,7 +2,7 @@ * Routines for BOOTP/DHCP packet disassembly * Gilbert Ramirez <gram@alumni.rice.edu> * - * $Id: packet-bootp.c,v 1.76 2003/11/18 19:56:37 guy Exp $ + * $Id: packet-bootp.c,v 1.77 2003/12/03 20:01:20 guy Exp $ * * The information used comes from: * RFC 951: Bootstrap Protocol @@ -716,11 +716,18 @@ bootp_option(tvbuff_t *tvb, proto_tree *bp_tree, int voff, int eoff, "Option %d: %s = %s", code, text, val_to_str(byte, slpda_vals, "Unknown (0x%02x)")); + if (byte == 0x80) { + voff++; + consumed--; + } v_tree = proto_item_add_subtree(vti, ett_bootp_option); - for (i = voff + 4; i < voff + consumed; i += 4) { + for (i = voff + 3; i < voff + consumed; i += 4) { proto_tree_add_text(v_tree, tvb, i, 4, "SLPDA Address: %s", ip_to_str(tvb_get_ptr(tvb, i, 4))); } + if (byte == 0x80) { + consumed++; + } break; case 79: /* SLP Service Scope Option RFC2610 Added by Greg Morris (gmorris@novell.com)*/ @@ -730,8 +737,9 @@ bootp_option(tvbuff_t *tvb, proto_tree *bp_tree, int voff, int eoff, val_to_str(byte, slp_scope_vals, "Unknown (0x%02x)")); v_tree = proto_item_add_subtree(vti, ett_bootp_option); - proto_tree_add_text(v_tree, tvb, voff+4, consumed-4, "SLP Scope: %s", - tvb_get_ptr(tvb, voff+4, consumed-4)); + proto_tree_add_text(v_tree, tvb, voff+3, consumed-3, + "%s = \"%.*s\"", text, vlen-1, + tvb_get_ptr(tvb, voff+3, vlen-1)); break; case 82: /* Relay Agent Information Option */ |