diff options
author | Gerald Combs <gerald@wireshark.org> | 1998-09-27 22:12:47 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 1998-09-27 22:12:47 +0000 |
commit | 2e7e493198543e3fdb4b404763b02a2ad22d180e (patch) | |
tree | 01aa8a843d84f24a66f7bd9af00e105efe1ffcdc /packet-ipx.c | |
parent | 385699d4310480e19aecf08dcff23e792667747a (diff) | |
download | wireshark-2e7e493198543e3fdb4b404763b02a2ad22d180e.tar.gz wireshark-2e7e493198543e3fdb4b404763b02a2ad22d180e.tar.bz2 wireshark-2e7e493198543e3fdb4b404763b02a2ad22d180e.zip |
Merged in a _huge_ patch from Guy Harris. It adds a time stap column,
generalizes the column printing code, adds a "frame" tree item to
the tree view, and fixes a bunch of miscellaneous coding bugs.
svn path=/trunk/; revision=31
Diffstat (limited to 'packet-ipx.c')
-rw-r--r-- | packet-ipx.c | 53 |
1 files changed, 18 insertions, 35 deletions
diff --git a/packet-ipx.c b/packet-ipx.c index c8b0160848..8a5a754359 100644 --- a/packet-ipx.c +++ b/packet-ipx.c @@ -2,7 +2,7 @@ * Routines for NetWare's IPX * Gilbert Ramirez <gram@verdict.uthscsa.edu> * - * $Id: packet-ipx.c,v 1.6 1998/09/27 03:43:44 gram Exp $ + * $Id: packet-ipx.c,v 1.7 1998/09/27 22:12:31 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -177,9 +177,9 @@ dissect_ipx(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { snet = network_to_string((guint8*)&pd[offset+18]); dsocket = pntohs(&pd[offset+16]); - if (fd->win_info[0]) { - strcpy(fd->win_info[3], "IPX"); - sprintf(fd->win_info[4], "%s (0x%04X)", port_text(dsocket), dsocket); + if (fd->win_info[COL_NUM]) { + strcpy(fd->win_info[COL_PROTOCOL], "IPX"); + sprintf(fd->win_info[COL_INFO], "%s (0x%04X)", port_text(dsocket), dsocket); } ipx_type = pd[offset+5]; @@ -283,9 +283,9 @@ dissect_spx(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { GtkWidget *spx_tree, *ti; - if (fd->win_info[0]) { - strcpy(fd->win_info[3], "SPX"); - strcpy(fd->win_info[4], "SPX"); + if (fd->win_info[COL_NUM]) { + strcpy(fd->win_info[COL_PROTOCOL], "SPX"); + strcpy(fd->win_info[COL_INFO], "SPX"); } if (tree) { @@ -325,11 +325,6 @@ dissect_spx(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { /* ================================================================= */ /* IPX RIP */ /* ================================================================= */ -/* I don't do NLSP in packet-ipx.c because we don't use Netware Link State - * Protocol at work, so I can't debug any ethereal code I write for it. If you - * can supply me a tcpdump output file showing NLSP packets, I'll gladly - * create dissect_ipxnlsp(). -- gram@verdict.uthscsa.edu - */ static void dissect_ipxrip(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { @@ -342,13 +337,13 @@ dissect_ipxrip(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { operation = pntohs(&pd[offset]) - 1; - if (fd->win_info[0]) { - strcpy(fd->win_info[3], "IPX RIP"); + if (fd->win_info[COL_NUM]) { + strcpy(fd->win_info[COL_PROTOCOL], "IPX RIP"); if (operation < 2) { - sprintf(fd->win_info[4], rip_type[operation]); + sprintf(fd->win_info[COL_INFO], rip_type[operation]); } else { - strcpy(fd->win_info[4], "Unknown Packet Type"); + strcpy(fd->win_info[COL_INFO], "Unknown Packet Type"); } } @@ -448,13 +443,13 @@ dissect_sap(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { query.query_type = pntohs(&pd[offset]); query.server_type = pntohs(&pd[offset+2]); - if (fd->win_info[0]) { - strcpy(fd->win_info[3], "SAP"); + if (fd->win_info[COL_NUM]) { + strcpy(fd->win_info[COL_PROTOCOL], "SAP"); if (query.query_type < 4) { - sprintf(fd->win_info[4], sap_type[query.query_type - 1]); + sprintf(fd->win_info[COL_INFO], sap_type[query.query_type - 1]); } else { - strcpy(fd->win_info[4], "Unknown Packet Type"); + strcpy(fd->win_info[COL_INFO], "Unknown Packet Type"); } } @@ -496,21 +491,9 @@ dissect_sap(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { ether_to_str((guint8*)&pd[cursor+54])); add_item_to_tree(s_tree, cursor+60, 2, "Socket: %s (0x%04X)", port_text(server.server_port), server.server_port); - - /* A hop-count of 16 is unreachable. This type of packet - * is the Server Down notification produced when a server - * is brought down gracefully. - */ - if (server.intermediate_network >= 16) { - add_item_to_tree(s_tree, cursor+62, 2, - "Intermediate Networks: %d (Unreachable)", - server.intermediate_network); - } - else { - add_item_to_tree(s_tree, cursor+62, 2, - "Intermediate Networks: %d", - server.intermediate_network); - } + add_item_to_tree(s_tree, cursor+62, 2, + "Intermediate Networks: %d", + server.intermediate_network); } } else { /* queries */ |