diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-03-01 18:28:12 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-03-01 18:28:12 +0000 |
commit | 2744866326f422d4293f5ecf7ac2c6de8bee0237 (patch) | |
tree | 17dd58e3e242ddbaf6bdc514bf04a66d58cbede5 | |
parent | 8eecc6e4880dae3259bb9e52a44274c33ad7a548 (diff) | |
download | wireshark-2744866326f422d4293f5ecf7ac2c6de8bee0237.tar.gz wireshark-2744866326f422d4293f5ecf7ac2c6de8bee0237.tar.bz2 wireshark-2744866326f422d4293f5ecf7ac2c6de8bee0237.zip |
Small fixes for alignment, and #include for gtk+-1.1.x/glib-1.1.x
svn path=/trunk/; revision=197
-rw-r--r-- | packet-cdp.c | 3 | ||||
-rw-r--r-- | packet-ncp.c | 4 | ||||
-rw-r--r-- | packet-tr.c | 6 | ||||
-rw-r--r-- | packet-trmac.c | 6 | ||||
-rw-r--r-- | packet-udp.c | 3 |
5 files changed, 12 insertions, 10 deletions
diff --git a/packet-cdp.c b/packet-cdp.c index b00956a3ea..119d4cbafc 100644 --- a/packet-cdp.c +++ b/packet-cdp.c @@ -2,7 +2,7 @@ * Routines for the disassembly of the "Cisco Discovery Protocol" * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-cdp.c,v 1.6 1999/01/24 21:18:15 hannes Exp $ + * $Id: packet-cdp.c,v 1.7 1999/03/01 18:28:11 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -28,6 +28,7 @@ #include <gtk/gtk.h> +#include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/packet-ncp.c b/packet-ncp.c index e014eba868..8c62a446fe 100644 --- a/packet-ncp.c +++ b/packet-ncp.c @@ -2,7 +2,7 @@ * Routines for NetWare Core Protocol * Gilbert Ramirez <gram@verdict.uthscsa.edu> * - * $Id: packet-ncp.c,v 1.7 1998/11/17 04:28:59 gerald Exp $ + * $Id: packet-ncp.c,v 1.8 1999/03/01 18:28:11 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -252,7 +252,7 @@ dissect_ncp(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { else { add_item_to_tree(ncp_tree, offset+6, 1, "Function Code: %s (%d)", - match_strval(request.function, ncp2222_func), + val_to_str(request.function, ncp2222_func, "Unknown"), request.function); } diff --git a/packet-tr.c b/packet-tr.c index eeb27f7db7..709a41b825 100644 --- a/packet-tr.c +++ b/packet-tr.c @@ -2,7 +2,7 @@ * Routines for Token-Ring packet disassembly * Gilbert Ramirez <gram@verdict.uthscsa.edu> * - * $Id: packet-tr.c,v 1.10 1999/02/09 00:35:38 guy Exp $ + * $Id: packet-tr.c,v 1.11 1999/03/01 18:28:11 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -397,11 +397,11 @@ add_ring_bridge_pairs(int rcf_len, const u_char *pd, GtkWidget *tree) for(j = 1; j < rcf_len; j++) { if (j==1) { - segment=ntohs(*((unsigned short*)&pd[16])) >> 4; + segment=pntohs(&pd[16]) >> 4; size = sprintf(buffer,"%03X",segment); buff_offset += size; } - segment=ntohs(*((unsigned short*)&pd[17+j])) >> 4; + segment=pntohs(&pd[17+j]) >> 4; brdgnmb=pd[16+j] & 0x0f; size = sprintf(buffer+buff_offset,"-%01X-%03X",brdgnmb,segment); buff_offset += size; diff --git a/packet-trmac.c b/packet-trmac.c index 7b95141444..549bf9cac9 100644 --- a/packet-trmac.c +++ b/packet-trmac.c @@ -2,7 +2,7 @@ * Routines for Token-Ring Media Access Control * Gilbert Ramirez <gram@verdict.uthscsa.edu> * - * $Id: packet-trmac.c,v 1.9 1999/01/12 17:44:52 gram Exp $ + * $Id: packet-trmac.c,v 1.10 1999/03/01 18:28:11 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -264,7 +264,7 @@ dissect_trmac(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { "Ring Error Monitor" }; char *mv_text; - mv_length = ntohs(*((guint16*)&pd[offset])); + mv_length = pntohs(&pd[offset]); if (tree) { ti = add_item_to_tree(GTK_WIDGET(tree), offset, mv_length, @@ -274,7 +274,7 @@ dissect_trmac(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { } /* Interpret the major vector */ - mv_text = match_strval(pd[offset+3], major_vectors); + mv_text = val_to_str(pd[offset+3], major_vectors, "Unknown Major Vector: %d\n"); /* Summary information */ if (check_col(fd, COL_PROTOCOL)) diff --git a/packet-udp.c b/packet-udp.c index a5d6f86e78..1476537160 100644 --- a/packet-udp.c +++ b/packet-udp.c @@ -1,7 +1,7 @@ /* packet-udp.c * Routines for UDP packet disassembly * - * $Id: packet-udp.c,v 1.12 1999/02/15 06:36:57 guy Exp $ + * $Id: packet-udp.c,v 1.13 1999/03/01 18:28:12 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -32,6 +32,7 @@ #include <gtk/gtk.h> #include <stdio.h> +#include <stdlib.h> #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> |