Put in a comment warning that

1) "tvb_get_ntohll()" isn't available on all platforms (e.g.,
	   with at least some compilers on Siemens' Sinix)

and

	2) "%ll{d,o,x}" won't necessarily print a "long long int"
	   quantity (e.g., on FreeBSD and Digital UNIX).

svn path=/trunk/; revision=3394
This commit is contained in:
Guy Harris 2001-05-01 21:39:41 +00:00
parent abe5eaef80
commit 279aeaade0
1 changed files with 19 additions and 1 deletions

View File

@ -2,7 +2,7 @@
* Routines for BOOTP/DHCP packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-bootp.c,v 1.49 2001/05/01 03:54:04 ashokn Exp $
* $Id: packet-bootp.c,v 1.50 2001/05/01 21:39:41 guy Exp $
*
* The information used comes from:
* RFC 951: Bootstrap Protocol
@ -520,6 +520,24 @@ bootp_option(tvbuff_t *tvb, proto_tree *bp_tree, int voff, int eoff)
tvb_get_guint8(tvb, voff+3));
proto_tree_add_text(v_tree, tvb, voff+4, 1, "Replay Detection Method: %d",
tvb_get_guint8(tvb, voff+4));
/*
* XXX:
*
* 1) this won't compile if you have a compiler that
* doesn't support 64-bit integral quantities;
*
* 2) there is no standard for the printf format to
* be used for 64-bit integral quantities, so
* this may not display correctly.
*
* We need to figure out how to handle 64-bit integral
* quantities portably, with some form of fallback if
* the compiler doesn't support it, and some way of
* handling "%ll{d,o,x}" (most platforms) vs. "%q{d,o.x}"
* (FreeBSD, perhaps some versions of other BSDs) vs.
* "sorry, we're an LP64 platform, %l{d,o,x} is good enough
* for you" (Digital UNIX).
*/
proto_tree_add_text(v_tree, tvb, voff+5, 8, "Replay Detection Value: %0llX",
tvb_get_ntohll(tvb, voff+5));
if (vlen > 11) {