Tvbuffify the RSVP dissector.
Display the message checksum, and check it if possible. Fix some IPv6 entries to be 16 bytes long, not 4 bytes long. Make the routine to fetch an IEEE floating point number and turn it into a "long" take a tvbuff pointer and offset rather than a pointer to data. svn path=/trunk/; revision=2987
This commit is contained in:
parent
ebba9ea2d0
commit
52bf014948
|
@ -1,13 +1,13 @@
|
|||
/**********************************************************************
|
||||
*
|
||||
* ieee_float.h
|
||||
* ieee-float.h
|
||||
*
|
||||
* Implements simple stuff to convert from IEEE float types
|
||||
* to 32-bit longs
|
||||
*
|
||||
* (C) Ashok Narayanan, 2000
|
||||
*
|
||||
* $Id: ieee-float.h,v 1.1 2000/03/09 18:31:50 ashokn Exp $
|
||||
* $Id: ieee-float.h,v 1.2 2001/02/04 08:21:35 guy Exp $
|
||||
*
|
||||
* For license details, see the COPYING file with this distribution
|
||||
*
|
||||
|
@ -42,14 +42,14 @@ static inline int ieee_float_is_zero (long number)
|
|||
/*
|
||||
* simple conversion: ieee floating point to long
|
||||
*/
|
||||
static long pieee_to_long (const void *p)
|
||||
static long tvb_ieee_to_long (tvbuff_t *tvb, int offset)
|
||||
{
|
||||
long number;
|
||||
long sign;
|
||||
long exponent;
|
||||
long mantissa;
|
||||
|
||||
number = pntohl(p);
|
||||
number = tvb_get_ntohl(tvb, offset);
|
||||
sign = number & IEEE_SIGN_MASK;
|
||||
exponent = number & IEEE_EXPONENT_MASK;
|
||||
mantissa = number & IEEE_MANTISSA_MASK;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for OSPF packet disassembly
|
||||
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
|
||||
*
|
||||
* $Id: packet-ospf.c,v 1.36 2001/01/22 03:33:45 guy Exp $
|
||||
* $Id: packet-ospf.c,v 1.37 2001/02/04 08:21:35 guy Exp $
|
||||
*
|
||||
* At this time, this module is able to analyze OSPF
|
||||
* packets as specified in RFC2328. MOSPF (RFC1584) and other
|
||||
|
@ -621,14 +621,14 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
|
|||
case MPLS_LINK_MAX_RES_BW:
|
||||
ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
|
||||
"%s: %ld", stlv_name,
|
||||
pieee_to_long(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
|
||||
tvb_ieee_to_long(tvb, stlv_offset + 4));
|
||||
stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
|
||||
proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
|
||||
"TLV Type: %u: %s", stlv_type, stlv_name);
|
||||
proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u",
|
||||
stlv_len);
|
||||
proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 4, "%s: %ld", stlv_name,
|
||||
pieee_to_long(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
|
||||
tvb_ieee_to_long(tvb, stlv_offset + 4));
|
||||
break;
|
||||
|
||||
case MPLS_LINK_UNRES_BW:
|
||||
|
@ -642,7 +642,7 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
|
|||
for (i = 0; i < 8; i++) {
|
||||
proto_tree_add_text(stlv_tree, tvb, stlv_offset+4+(i*4), 4,
|
||||
"Pri %d: %ld", i,
|
||||
pieee_to_long(tvb_get_ptr(tvb, stlv_offset + 4 + i*4, 4)));
|
||||
tvb_ieee_to_long(tvb, stlv_offset + 4 + i*4));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
1619
packet-rsvp.c
1619
packet-rsvp.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue