diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-05-01 21:39:41 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-05-01 21:39:41 +0000 |
commit | 279aeaade0ccf0862d4080c529205659b1d4ba9e (patch) | |
tree | 19d29477c735bcb2c06c03722d40caaf1211f457 /packet-bootp.c | |
parent | abe5eaef80f61d706ed5c8320fe568d2cd984ca2 (diff) |
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
Diffstat (limited to 'packet-bootp.c')
-rw-r--r-- | packet-bootp.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/packet-bootp.c b/packet-bootp.c index 667047083e..fb65a9616a 100644 --- a/packet-bootp.c +++ b/packet-bootp.c @@ -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) { |