Print the sequence number and call number as unsigned quantities, and

print them with "%lu" and cast the result of "ntohl()" to "unsigned
long" (so as to cope with platforms where "ntohl()" returns a value with
an "int"-based type and platforms where it returns a value with a
"long"-sized type).

svn path=/trunk/; revision=907
This commit is contained in:
Guy Harris 1999-10-22 03:55:17 +00:00
parent 2d16674a5a
commit 1c7671d5f2
1 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@cmf.nrl.navy.mil>
*
* $Id: packet-rx.c,v 1.1 1999/10/20 16:41:19 gram Exp $
* $Id: packet-rx.c,v 1.2 1999/10/22 03:55:17 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@ -153,13 +153,13 @@ dissect_rx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (check_col(fd, COL_INFO))
col_add_fstr(fd, COL_INFO,
"Type: %s "
"Seq: %d "
"Call: %d "
"Seq: %lu "
"Call: %lu "
"Source Port: %s "
"Destination Port: %s ",
val_to_str(rxh->type, rx_types, "%d"),
ntohl(rxh->seq),
ntohl(rxh->callNumber),
(unsigned long)ntohl(rxh->seq),
(unsigned long)ntohl(rxh->callNumber),
get_udp_port(pi.srcport),
get_udp_port(pi.destport)
);