1998-09-16 02:39:15 +00:00
|
|
|
/* packet-ipx.c
|
|
|
|
* Routines for NetWare's IPX
|
2001-11-13 23:55:44 +00:00
|
|
|
* Gilbert Ramirez <gram@alumni.rice.edu>
|
2003-04-08 00:39:27 +00:00
|
|
|
* NDPS support added by Greg Morris (gmorris@novell.com)
|
1998-09-16 02:39:15 +00:00
|
|
|
*
|
2003-04-08 00:39:27 +00:00
|
|
|
* Portions Copyright (c) 2000-2002 by Gilbert Ramirez.
|
|
|
|
* Portions Copyright (c) Novell, Inc. 2002-2003
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
1998-09-16 03:22:19 +00:00
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
1998-09-16 02:39:15 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1998-09-16 02:39:15 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1998-09-16 02:39:15 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1998-09-16 02:39:15 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
1999-03-23 03:14:46 +00:00
|
|
|
#include <stdio.h>
|
2000-11-17 21:00:40 +00:00
|
|
|
#include <string.h>
|
1999-03-23 03:14:46 +00:00
|
|
|
#include <glib.h>
|
2002-01-21 07:37:49 +00:00
|
|
|
#include <epan/packet.h>
|
2001-04-17 06:43:21 +00:00
|
|
|
#include "packet-ipx.h"
|
2004-08-06 19:57:49 +00:00
|
|
|
#include <epan/addr_resolv.h>
|
2005-09-17 00:02:31 +00:00
|
|
|
#include <epan/etypes.h>
|
|
|
|
#include <epan/ppptypes.h>
|
|
|
|
#include <epan/llcsaps.h>
|
|
|
|
#include <epan/aftypes.h>
|
|
|
|
#include <epan/arcnet_pids.h>
|
2003-04-08 00:39:27 +00:00
|
|
|
#include <epan/conversation.h>
|
2004-09-29 00:06:36 +00:00
|
|
|
#include <epan/tap.h>
|
2005-08-12 23:00:01 +00:00
|
|
|
#include <epan/emem.h>
|
2003-08-24 05:17:51 +00:00
|
|
|
|
|
|
|
static int ipx_tap = -1;
|
2003-04-08 00:39:27 +00:00
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
/* The information in this module (IPX, SPX, NCP) comes from:
|
|
|
|
NetWare LAN Analysis, Second Edition
|
|
|
|
Laura A. Chappell and Dan E. Hakes
|
|
|
|
(c) 1994 Novell, Inc.
|
|
|
|
Novell Press, San Jose.
|
|
|
|
ISBN: 0-7821-1362-1
|
1998-09-23 05:25:12 +00:00
|
|
|
|
|
|
|
And from the ncpfs source code by Volker Lendecke
|
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
*/
|
2002-08-28 21:04:11 +00:00
|
|
|
|
1999-07-29 05:47:07 +00:00
|
|
|
static int proto_ipx = -1;
|
|
|
|
static int hf_ipx_checksum = -1;
|
|
|
|
static int hf_ipx_len = -1;
|
2003-10-03 09:09:35 +00:00
|
|
|
static int hf_ipx_src = -1;
|
|
|
|
static int hf_ipx_dst = -1;
|
|
|
|
static int hf_ipx_addr = -1;
|
1999-07-29 05:47:07 +00:00
|
|
|
static int hf_ipx_hops = -1;
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
static int hf_ipx_packet_type = -1;
|
|
|
|
static int hf_ipx_dnet = -1;
|
1999-07-29 05:47:07 +00:00
|
|
|
static int hf_ipx_dnode = -1;
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
static int hf_ipx_dsocket = -1;
|
|
|
|
static int hf_ipx_snet = -1;
|
1999-07-29 05:47:07 +00:00
|
|
|
static int hf_ipx_snode = -1;
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
static int hf_ipx_ssocket = -1;
|
2003-08-04 23:55:39 +00:00
|
|
|
static int hf_ipx_net = -1;
|
|
|
|
static int hf_ipx_node = -1;
|
|
|
|
static int hf_ipx_socket = -1;
|
1999-07-20 02:56:44 +00:00
|
|
|
|
1999-11-16 11:44:20 +00:00
|
|
|
static gint ett_ipx = -1;
|
|
|
|
|
2000-05-30 03:35:55 +00:00
|
|
|
static dissector_table_t ipx_type_dissector_table;
|
|
|
|
static dissector_table_t ipx_socket_dissector_table;
|
Add a new port type, PT_IPX, for IPX socket numbers; set "pinfo->ptype",
"pinfo->srcport", and "pinfo->destport" appropriately in the IPX
dissector. Add support for PT_IPX port types in display columns.
Have an "spx.socket" dissector table, similar to the "ipx.socket"
dissector table, and have the SPX dissector use that, with the IPX
socket numbers from "pinfo->srcport" and "pinfo->destport", so that
dissectors for protocols that run atop SPX can register with particular
socket numbers. (Think of it as similar to what would have been the
case had the IP header had 16-bit source and destination port numbers,
and had TCP and UDP used those port numbers rather than having port
numbers in their headers.) Also, have the SPX dissector dissect
subprotocols regardless of whether we're building a protocol tree or not.
Use the dissector handle for the IPX message dissector for both IPX
socket numbers; there's no need to create separate handles for both
registrations.
Have NDPS register as a subdissector of the SPX dissector, using
"spx.socket", and get rid of the duplicate SPX dissection in the NDPS
dissector.
Make the NDPS dissector set the columns regardless of whether a protocol
tree is being built, and clean up the dissector (fixing some bugs).
Get rid of unneeded includes in "packet-ndps.c".
svn path=/trunk/; revision=6424
2002-10-15 04:31:00 +00:00
|
|
|
static dissector_table_t spx_socket_dissector_table;
|
2000-05-30 03:35:55 +00:00
|
|
|
|
1999-07-29 05:47:07 +00:00
|
|
|
static int proto_spx = -1;
|
1999-10-17 09:23:43 +00:00
|
|
|
static int hf_spx_connection_control = -1;
|
2003-04-09 22:33:19 +00:00
|
|
|
static int hf_spx_connection_control_sys = -1;
|
|
|
|
static int hf_spx_connection_control_send_ack = -1;
|
|
|
|
static int hf_spx_connection_control_attn = -1;
|
|
|
|
static int hf_spx_connection_control_eom = -1;
|
1999-10-17 09:23:43 +00:00
|
|
|
static int hf_spx_datastream_type = -1;
|
|
|
|
static int hf_spx_src_id = -1;
|
|
|
|
static int hf_spx_dst_id = -1;
|
|
|
|
static int hf_spx_seq_nr = -1;
|
|
|
|
static int hf_spx_ack_nr = -1;
|
|
|
|
static int hf_spx_all_nr = -1;
|
2003-04-09 22:33:19 +00:00
|
|
|
static int hf_spx_rexmt_frame = -1;
|
1999-10-17 09:23:43 +00:00
|
|
|
|
1999-11-16 11:44:20 +00:00
|
|
|
static gint ett_spx = -1;
|
2003-04-09 22:33:19 +00:00
|
|
|
static gint ett_spx_connctrl = -1;
|
1999-11-16 11:44:20 +00:00
|
|
|
|
1999-07-29 05:47:07 +00:00
|
|
|
static int proto_ipxrip = -1;
|
1999-10-17 09:23:43 +00:00
|
|
|
static int hf_ipxrip_request = -1;
|
|
|
|
static int hf_ipxrip_response = -1;
|
|
|
|
|
1999-11-16 11:44:20 +00:00
|
|
|
static gint ett_ipxrip = -1;
|
|
|
|
|
2003-12-29 19:04:05 +00:00
|
|
|
static int proto_serialization = -1;
|
|
|
|
|
|
|
|
static gint ett_serialization = -1;
|
|
|
|
|
1999-07-29 05:47:07 +00:00
|
|
|
static int proto_sap = -1;
|
1999-10-17 09:23:43 +00:00
|
|
|
static int hf_sap_request = -1;
|
|
|
|
static int hf_sap_response = -1;
|
1998-09-16 02:39:15 +00:00
|
|
|
|
1999-11-16 11:44:20 +00:00
|
|
|
static gint ett_ipxsap = -1;
|
|
|
|
static gint ett_ipxsap_server = -1;
|
|
|
|
|
1999-12-08 21:59:12 +00:00
|
|
|
static gint ett_ipxmsg = -1;
|
|
|
|
static int proto_ipxmsg = -1;
|
|
|
|
static int hf_msg_conn = -1;
|
|
|
|
static int hf_msg_sigchar = -1;
|
|
|
|
|
2001-11-25 22:51:14 +00:00
|
|
|
static dissector_handle_t data_handle;
|
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
static void
|
Allow either old-style (pre-tvbuff) or new-style (tvbuffified)
dissectors to be registered as dissectors for particular ports,
registered as heuristic dissectors, and registered as dissectors for
conversations, and have routines to be used both by old-style and
new-style dissectors to call registered dissectors.
Have the code that calls those dissectors translate the arguments as
necessary. (For conversation dissectors, replace
"find_conversation_dissector()", which just returns a pointer to the
dissector, with "old_try_conversation_dissector()" and
"try_conversation_dissector()", which actually call the dissector, so
that there's a single place at which we can do that translation. Also
make "dissector_lookup()" static and, instead of calling it and, if it
returns a non-null pointer, calling that dissector, just use
"old_dissector_try_port()" or "dissector_try_port()", for the same
reason.)
This allows some dissectors that took old-style arguments and
immediately translated them to new-style arguments to just take
new-style arguments; make them do so. It also allows some new-style
dissectors not to have to translate arguments before calling routines to
look up and call dissectors; make them not do so.
Get rid of checks for too-short frames in new-style dissectors - the
tvbuff code does those checks for you.
Give the routines to register old-style dissectors, and to call
dissectors from old-style dissectors, names beginning with "old_", with
the routines for new-style dissectors not having the "old_". Update the
dissectors that use those routines appropriately.
Rename "dissect_data()" to "old_dissect_data()", and
"dissect_data_tvb()" to "dissect_data()".
svn path=/trunk/; revision=2218
2000-08-07 03:21:25 +00:00
|
|
|
dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
1998-09-16 02:39:15 +00:00
|
|
|
|
1998-09-23 05:25:12 +00:00
|
|
|
static void
|
Allow either old-style (pre-tvbuff) or new-style (tvbuffified)
dissectors to be registered as dissectors for particular ports,
registered as heuristic dissectors, and registered as dissectors for
conversations, and have routines to be used both by old-style and
new-style dissectors to call registered dissectors.
Have the code that calls those dissectors translate the arguments as
necessary. (For conversation dissectors, replace
"find_conversation_dissector()", which just returns a pointer to the
dissector, with "old_try_conversation_dissector()" and
"try_conversation_dissector()", which actually call the dissector, so
that there's a single place at which we can do that translation. Also
make "dissector_lookup()" static and, instead of calling it and, if it
returns a non-null pointer, calling that dissector, just use
"old_dissector_try_port()" or "dissector_try_port()", for the same
reason.)
This allows some dissectors that took old-style arguments and
immediately translated them to new-style arguments to just take
new-style arguments; make them do so. It also allows some new-style
dissectors not to have to translate arguments before calling routines to
look up and call dissectors; make them not do so.
Get rid of checks for too-short frames in new-style dissectors - the
tvbuff code does those checks for you.
Give the routines to register old-style dissectors, and to call
dissectors from old-style dissectors, names beginning with "old_", with
the routines for new-style dissectors not having the "old_". Update the
dissectors that use those routines appropriately.
Rename "dissect_data()" to "old_dissect_data()", and
"dissect_data_tvb()" to "dissect_data()".
svn path=/trunk/; revision=2218
2000-08-07 03:21:25 +00:00
|
|
|
dissect_ipxrip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2003-12-29 19:04:05 +00:00
|
|
|
static void
|
|
|
|
dissect_serialization(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
|
|
|
|
1998-09-24 04:22:08 +00:00
|
|
|
static void
|
Allow either old-style (pre-tvbuff) or new-style (tvbuffified)
dissectors to be registered as dissectors for particular ports,
registered as heuristic dissectors, and registered as dissectors for
conversations, and have routines to be used both by old-style and
new-style dissectors to call registered dissectors.
Have the code that calls those dissectors translate the arguments as
necessary. (For conversation dissectors, replace
"find_conversation_dissector()", which just returns a pointer to the
dissector, with "old_try_conversation_dissector()" and
"try_conversation_dissector()", which actually call the dissector, so
that there's a single place at which we can do that translation. Also
make "dissector_lookup()" static and, instead of calling it and, if it
returns a non-null pointer, calling that dissector, just use
"old_dissector_try_port()" or "dissector_try_port()", for the same
reason.)
This allows some dissectors that took old-style arguments and
immediately translated them to new-style arguments to just take
new-style arguments; make them do so. It also allows some new-style
dissectors not to have to translate arguments before calling routines to
look up and call dissectors; make them not do so.
Get rid of checks for too-short frames in new-style dissectors - the
tvbuff code does those checks for you.
Give the routines to register old-style dissectors, and to call
dissectors from old-style dissectors, names beginning with "old_", with
the routines for new-style dissectors not having the "old_". Update the
dissectors that use those routines appropriately.
Rename "dissect_data()" to "old_dissect_data()", and
"dissect_data_tvb()" to "dissect_data()".
svn path=/trunk/; revision=2218
2000-08-07 03:21:25 +00:00
|
|
|
dissect_ipxsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
Have the IPX code set "pi.len" and "pi.captured_len" based on the length
in the IPX header, and have the dissectors it calls use it rather than
being passed the length as an argument.
Treat both packet type 20 ("WAN Broadcast") and 4 ("IPX", although 3 is
also "IPX", according to Network Monitor) as potentially being NetBIOS
packets.
The packet types for the IPX NetBIOS socket (0x0455) and the NWLink
sockets (0x0551 and 0x0553) are different (perhaps because there's one
socket for the 0x0455 NBIPX, so you have to do name service and datagram
service and have the packet types distinguish them, but NWLink has
separate sockets for name service and datagram service).
The packet type for name service and for datagram service are at
*different locations* in the packet, which is unfortunate if you want to
use the packet type to distinguish name service and datagram service
packets. Use the packet length, for now, to distinguish them, with
socket 0x0455.
Dissect datagram packets differently from name service packets.
Export "packet-netbios.c"'s "netbios_add_name()" routine, and use it
when dissecting NBIPX packets as well.
Label NBIPX packets as "NBIPX" rather than "NetBIOS".
svn path=/trunk/; revision=627
1999-09-02 23:17:58 +00:00
|
|
|
|
1999-12-08 21:59:12 +00:00
|
|
|
static void
|
Allow either old-style (pre-tvbuff) or new-style (tvbuffified)
dissectors to be registered as dissectors for particular ports,
registered as heuristic dissectors, and registered as dissectors for
conversations, and have routines to be used both by old-style and
new-style dissectors to call registered dissectors.
Have the code that calls those dissectors translate the arguments as
necessary. (For conversation dissectors, replace
"find_conversation_dissector()", which just returns a pointer to the
dissector, with "old_try_conversation_dissector()" and
"try_conversation_dissector()", which actually call the dissector, so
that there's a single place at which we can do that translation. Also
make "dissector_lookup()" static and, instead of calling it and, if it
returns a non-null pointer, calling that dissector, just use
"old_dissector_try_port()" or "dissector_try_port()", for the same
reason.)
This allows some dissectors that took old-style arguments and
immediately translated them to new-style arguments to just take
new-style arguments; make them do so. It also allows some new-style
dissectors not to have to translate arguments before calling routines to
look up and call dissectors; make them not do so.
Get rid of checks for too-short frames in new-style dissectors - the
tvbuff code does those checks for you.
Give the routines to register old-style dissectors, and to call
dissectors from old-style dissectors, names beginning with "old_", with
the routines for new-style dissectors not having the "old_". Update the
dissectors that use those routines appropriately.
Rename "dissect_data()" to "old_dissect_data()", and
"dissect_data_tvb()" to "dissect_data()".
svn path=/trunk/; revision=2218
2000-08-07 03:21:25 +00:00
|
|
|
dissect_ipxmsg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
1999-12-08 21:59:12 +00:00
|
|
|
|
2000-04-08 07:07:42 +00:00
|
|
|
#define UDP_PORT_IPX 213 /* RFC 1234 */
|
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
#define IPX_HEADER_LEN 30 /* It's *always* 30 bytes */
|
1998-09-24 04:22:08 +00:00
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
/* ================================================================= */
|
|
|
|
/* IPX */
|
|
|
|
/* ================================================================= */
|
2003-03-31 08:10:08 +00:00
|
|
|
const value_string ipx_socket_vals[] = {
|
2000-05-30 03:35:55 +00:00
|
|
|
{ IPX_SOCKET_PING_CISCO, "CISCO PING" },
|
|
|
|
{ IPX_SOCKET_NCP, "NCP" },
|
|
|
|
{ IPX_SOCKET_SAP, "SAP" },
|
|
|
|
{ IPX_SOCKET_IPXRIP, "RIP" },
|
|
|
|
{ IPX_SOCKET_NETBIOS, "NetBIOS" },
|
|
|
|
{ IPX_SOCKET_DIAGNOSTIC, "Diagnostic" },
|
|
|
|
{ IPX_SOCKET_SERIALIZATION, "Serialization" },
|
2001-02-27 07:28:48 +00:00
|
|
|
{ IPX_SOCKET_NWLINK_SMB_SERVER, "NWLink SMB Server" },
|
2000-05-30 03:35:55 +00:00
|
|
|
{ IPX_SOCKET_NWLINK_SMB_NAMEQUERY, "NWLink SMB Name Query" },
|
2001-02-27 07:28:48 +00:00
|
|
|
{ IPX_SOCKET_NWLINK_SMB_REDIR, "NWLink SMB Redirector" },
|
|
|
|
{ IPX_SOCKET_NWLINK_SMB_MAILSLOT, "NWLink SMB Mailslot Datagram" },
|
|
|
|
{ IPX_SOCKET_NWLINK_SMB_MESSENGER, "NWLink SMB Messenger" },
|
2000-05-30 03:35:55 +00:00
|
|
|
{ IPX_SOCKET_NWLINK_SMB_BROWSE, "NWLink SMB Browse" },
|
|
|
|
{ IPX_SOCKET_ATTACHMATE_GW, "Attachmate Gateway" },
|
|
|
|
{ IPX_SOCKET_IPX_MESSAGE, "IPX Message" },
|
2002-10-10 21:05:05 +00:00
|
|
|
{ IPX_SOCKET_IPX_MESSAGE1, "IPX Message" },
|
2000-05-30 03:35:55 +00:00
|
|
|
{ IPX_SOCKET_SNMP_AGENT, "SNMP Agent" },
|
|
|
|
{ IPX_SOCKET_SNMP_SINK, "SNMP Sink" },
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
{ IPX_SOCKET_PING_NOVELL, "Novell PING" },
|
2000-05-30 03:35:55 +00:00
|
|
|
{ IPX_SOCKET_UDP_TUNNEL, "UDP Tunnel" },
|
|
|
|
{ IPX_SOCKET_TCP_TUNNEL, "TCP Tunnel" },
|
|
|
|
{ IPX_SOCKET_TCP_TUNNEL, "TCP Tunnel" },
|
|
|
|
{ IPX_SOCKET_ADSM, "ADSM" },
|
|
|
|
{ IPX_SOCKET_EIGRP, "Cisco EIGRP for IPX" },
|
2003-03-31 08:10:08 +00:00
|
|
|
{ IPX_SOCKET_NLSP, "NetWare Link Services Protocol" },
|
2003-04-06 02:32:38 +00:00
|
|
|
{ IPX_SOCKET_IPXWAN, "IPX WAN" },
|
2002-10-10 21:05:05 +00:00
|
|
|
{ SPX_SOCKET_PA, "NDPS Printer Agent/PSM" },
|
|
|
|
{ SPX_SOCKET_BROKER, "NDPS Broker" },
|
|
|
|
{ SPX_SOCKET_SRS, "NDPS Service Registry Service" },
|
|
|
|
{ SPX_SOCKET_ENS, "NDPS Event Notification Service" },
|
|
|
|
{ SPX_SOCKET_RMS, "NDPS Remote Management Service" },
|
|
|
|
{ SPX_SOCKET_NOTIFY_LISTENER, "NDPS Notify Listener" },
|
2001-10-08 18:20:01 +00:00
|
|
|
{ 0xE885, "NT Server-RPC/GW" },
|
|
|
|
{ 0x400C, "HP LaserJet/QuickSilver" },
|
|
|
|
{ 0x907B, "SMS Testing and Development" },
|
|
|
|
{ 0x8F83, "Powerchute UPS Monitoring" },
|
2002-06-26 07:39:48 +00:00
|
|
|
{ 0x4006, "NetWare Directory Server" },
|
|
|
|
{ 0x8104, "NetWare 386" },
|
2000-05-30 03:35:55 +00:00
|
|
|
{ 0x0000, NULL }
|
1998-09-23 05:25:12 +00:00
|
|
|
};
|
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
static const char*
|
|
|
|
socket_text(guint16 socket)
|
|
|
|
{
|
2001-10-20 18:10:39 +00:00
|
|
|
return val_to_str(socket, ipx_socket_vals, "Unknown");
|
1998-09-16 02:39:15 +00:00
|
|
|
}
|
|
|
|
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
static const value_string ipx_packet_type_vals[] = {
|
Have the IPX code set "pi.len" and "pi.captured_len" based on the length
in the IPX header, and have the dissectors it calls use it rather than
being passed the length as an argument.
Treat both packet type 20 ("WAN Broadcast") and 4 ("IPX", although 3 is
also "IPX", according to Network Monitor) as potentially being NetBIOS
packets.
The packet types for the IPX NetBIOS socket (0x0455) and the NWLink
sockets (0x0551 and 0x0553) are different (perhaps because there's one
socket for the 0x0455 NBIPX, so you have to do name service and datagram
service and have the packet types distinguish them, but NWLink has
separate sockets for name service and datagram service).
The packet type for name service and for datagram service are at
*different locations* in the packet, which is unfortunate if you want to
use the packet type to distinguish name service and datagram service
packets. Use the packet length, for now, to distinguish them, with
socket 0x0455.
Dissect datagram packets differently from name service packets.
Export "packet-netbios.c"'s "netbios_add_name()" routine, and use it
when dissecting NBIPX packets as well.
Label NBIPX packets as "NBIPX" rather than "NetBIOS".
svn path=/trunk/; revision=627
1999-09-02 23:17:58 +00:00
|
|
|
{ IPX_PACKET_TYPE_IPX, "IPX" },
|
1999-11-30 08:45:39 +00:00
|
|
|
{ IPX_PACKET_TYPE_RIP, "RIP" },
|
1999-11-30 09:01:55 +00:00
|
|
|
{ IPX_PACKET_TYPE_ECHO, "Echo" },
|
|
|
|
{ IPX_PACKET_TYPE_ERROR, "Error" },
|
|
|
|
{ IPX_PACKET_TYPE_PEP, "PEP" }, /* Packet Exchange Packet */
|
Have the IPX code set "pi.len" and "pi.captured_len" based on the length
in the IPX header, and have the dissectors it calls use it rather than
being passed the length as an argument.
Treat both packet type 20 ("WAN Broadcast") and 4 ("IPX", although 3 is
also "IPX", according to Network Monitor) as potentially being NetBIOS
packets.
The packet types for the IPX NetBIOS socket (0x0455) and the NWLink
sockets (0x0551 and 0x0553) are different (perhaps because there's one
socket for the 0x0455 NBIPX, so you have to do name service and datagram
service and have the packet types distinguish them, but NWLink has
separate sockets for name service and datagram service).
The packet type for name service and for datagram service are at
*different locations* in the packet, which is unfortunate if you want to
use the packet type to distinguish name service and datagram service
packets. Use the packet length, for now, to distinguish them, with
socket 0x0455.
Dissect datagram packets differently from name service packets.
Export "packet-netbios.c"'s "netbios_add_name()" routine, and use it
when dissecting NBIPX packets as well.
Label NBIPX packets as "NBIPX" rather than "NetBIOS".
svn path=/trunk/; revision=627
1999-09-02 23:17:58 +00:00
|
|
|
{ IPX_PACKET_TYPE_SPX, "SPX" },
|
|
|
|
{ 16, "Experimental Protocol" },
|
|
|
|
{ IPX_PACKET_TYPE_NCP, "NCP" },
|
|
|
|
{ 18, "Experimental Protocol" },
|
|
|
|
{ 19, "Experimental Protocol" },
|
|
|
|
{ IPX_PACKET_TYPE_WANBCAST, "NetBIOS Broadcast" },
|
|
|
|
{ 21, "Experimental Protocol" },
|
|
|
|
{ 22, "Experimental Protocol" },
|
|
|
|
{ 23, "Experimental Protocol" },
|
|
|
|
{ 24, "Experimental Protocol" },
|
|
|
|
{ 25, "Experimental Protocol" },
|
|
|
|
{ 26, "Experimental Protocol" },
|
|
|
|
{ 27, "Experimental Protocol" },
|
|
|
|
{ 28, "Experimental Protocol" },
|
|
|
|
{ 29, "Experimental Protocol" },
|
|
|
|
{ 30, "Experimental Protocol" },
|
|
|
|
{ 31, "Experimental Protocol" },
|
|
|
|
{ 0, NULL }
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
};
|
1998-09-16 02:39:15 +00:00
|
|
|
|
1999-12-08 21:59:12 +00:00
|
|
|
static const value_string ipxmsg_sigchar_vals[] = {
|
|
|
|
{ '?', "Poll inactive station" },
|
2002-07-02 07:32:04 +00:00
|
|
|
{ 'Y', "Station is still using the connection" },
|
|
|
|
{ '!', "Broadcast message waiting" },
|
1999-12-08 21:59:12 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
1999-11-30 23:56:37 +00:00
|
|
|
void
|
2002-04-24 06:03:34 +00:00
|
|
|
capture_ipx(packet_counts *ld)
|
1999-11-30 23:56:37 +00:00
|
|
|
{
|
|
|
|
ld->ipx++;
|
|
|
|
}
|
|
|
|
|
2001-01-09 09:59:28 +00:00
|
|
|
static void
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
|
|
|
tvbuff_t *next_tvb;
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2003-08-24 05:17:51 +00:00
|
|
|
proto_tree *ipx_tree = NULL;
|
2008-05-14 01:47:41 +00:00
|
|
|
proto_item *ti = NULL, *hidden_item;
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
|
2001-03-13 21:34:28 +00:00
|
|
|
const guint8 *src_net_node, *dst_net_node;
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
|
2003-08-24 05:17:51 +00:00
|
|
|
guint8 ipx_hops;
|
2003-10-03 09:09:35 +00:00
|
|
|
char *str;
|
2003-04-06 22:50:00 +00:00
|
|
|
guint16 first_socket, second_socket;
|
2003-08-04 23:55:39 +00:00
|
|
|
guint32 ipx_snet, ipx_dnet;
|
|
|
|
const guint8 *ipx_snode, *ipx_dnode;
|
2003-08-24 05:17:51 +00:00
|
|
|
static ipxhdr_t ipxh_arr[4];
|
|
|
|
static int ipx_current=0;
|
|
|
|
ipxhdr_t *ipxh;
|
2008-07-24 16:46:09 +00:00
|
|
|
|
2003-08-24 05:17:51 +00:00
|
|
|
ipx_current++;
|
|
|
|
if(ipx_current==4){
|
|
|
|
ipx_current=0;
|
|
|
|
}
|
|
|
|
ipxh=&ipxh_arr[ipx_current];
|
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPX");
|
2009-08-09 07:36:13 +00:00
|
|
|
col_clear(pinfo->cinfo, COL_INFO);
|
1998-09-16 02:39:15 +00:00
|
|
|
|
1998-11-17 04:29:13 +00:00
|
|
|
/* Calculate here for use in pinfo and in tree */
|
2003-08-24 05:17:51 +00:00
|
|
|
ipxh->ipx_dsocket = tvb_get_ntohs(tvb, 16);
|
|
|
|
ipxh->ipx_ssocket = tvb_get_ntohs(tvb, 28);
|
|
|
|
ipxh->ipx_type = tvb_get_guint8(tvb, 5);
|
|
|
|
ipxh->ipx_length = tvb_get_ntohs(tvb, 2);
|
Have the IPX code set "pi.len" and "pi.captured_len" based on the length
in the IPX header, and have the dissectors it calls use it rather than
being passed the length as an argument.
Treat both packet type 20 ("WAN Broadcast") and 4 ("IPX", although 3 is
also "IPX", according to Network Monitor) as potentially being NetBIOS
packets.
The packet types for the IPX NetBIOS socket (0x0455) and the NWLink
sockets (0x0551 and 0x0553) are different (perhaps because there's one
socket for the 0x0455 NBIPX, so you have to do name service and datagram
service and have the packet types distinguish them, but NWLink has
separate sockets for name service and datagram service).
The packet type for name service and for datagram service are at
*different locations* in the packet, which is unfortunate if you want to
use the packet type to distinguish name service and datagram service
packets. Use the packet length, for now, to distinguish them, with
socket 0x0455.
Dissect datagram packets differently from name service packets.
Export "packet-netbios.c"'s "netbios_add_name()" routine, and use it
when dissecting NBIPX packets as well.
Label NBIPX packets as "NBIPX" rather than "NetBIOS".
svn path=/trunk/; revision=627
1999-09-02 23:17:58 +00:00
|
|
|
|
Add a new port type, PT_IPX, for IPX socket numbers; set "pinfo->ptype",
"pinfo->srcport", and "pinfo->destport" appropriately in the IPX
dissector. Add support for PT_IPX port types in display columns.
Have an "spx.socket" dissector table, similar to the "ipx.socket"
dissector table, and have the SPX dissector use that, with the IPX
socket numbers from "pinfo->srcport" and "pinfo->destport", so that
dissectors for protocols that run atop SPX can register with particular
socket numbers. (Think of it as similar to what would have been the
case had the IP header had 16-bit source and destination port numbers,
and had TCP and UDP used those port numbers rather than having port
numbers in their headers.) Also, have the SPX dissector dissect
subprotocols regardless of whether we're building a protocol tree or not.
Use the dissector handle for the IPX message dissector for both IPX
socket numbers; there's no need to create separate handles for both
registrations.
Have NDPS register as a subdissector of the SPX dissector, using
"spx.socket", and get rid of the duplicate SPX dissection in the NDPS
dissector.
Make the NDPS dissector set the columns regardless of whether a protocol
tree is being built, and clean up the dissector (fixing some bugs).
Get rid of unneeded includes in "packet-ndps.c".
svn path=/trunk/; revision=6424
2002-10-15 04:31:00 +00:00
|
|
|
pinfo->ptype = PT_IPX;
|
2003-08-24 05:17:51 +00:00
|
|
|
pinfo->srcport = ipxh->ipx_ssocket;
|
|
|
|
pinfo->destport = ipxh->ipx_dsocket;
|
Add a new port type, PT_IPX, for IPX socket numbers; set "pinfo->ptype",
"pinfo->srcport", and "pinfo->destport" appropriately in the IPX
dissector. Add support for PT_IPX port types in display columns.
Have an "spx.socket" dissector table, similar to the "ipx.socket"
dissector table, and have the SPX dissector use that, with the IPX
socket numbers from "pinfo->srcport" and "pinfo->destport", so that
dissectors for protocols that run atop SPX can register with particular
socket numbers. (Think of it as similar to what would have been the
case had the IP header had 16-bit source and destination port numbers,
and had TCP and UDP used those port numbers rather than having port
numbers in their headers.) Also, have the SPX dissector dissect
subprotocols regardless of whether we're building a protocol tree or not.
Use the dissector handle for the IPX message dissector for both IPX
socket numbers; there's no need to create separate handles for both
registrations.
Have NDPS register as a subdissector of the SPX dissector, using
"spx.socket", and get rid of the duplicate SPX dissection in the NDPS
dissector.
Make the NDPS dissector set the columns regardless of whether a protocol
tree is being built, and clean up the dissector (fixing some bugs).
Get rid of unneeded includes in "packet-ndps.c".
svn path=/trunk/; revision=6424
2002-10-15 04:31:00 +00:00
|
|
|
|
2001-06-29 09:46:54 +00:00
|
|
|
/* Adjust the tvbuff length to include only the IPX datagram. */
|
2003-08-24 05:17:51 +00:00
|
|
|
set_actual_length(tvb, ipxh->ipx_length);
|
1998-09-16 02:39:15 +00:00
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
src_net_node = tvb_get_ptr(tvb, 18, 10);
|
|
|
|
dst_net_node = tvb_get_ptr(tvb, 6, 10);
|
|
|
|
|
2001-07-03 04:56:46 +00:00
|
|
|
SET_ADDRESS(&pinfo->net_src, AT_IPX, 10, src_net_node);
|
|
|
|
SET_ADDRESS(&pinfo->src, AT_IPX, 10, src_net_node);
|
2003-08-24 05:17:51 +00:00
|
|
|
SET_ADDRESS(&ipxh->ipx_src, AT_IPX, 10, src_net_node);
|
2001-07-03 04:56:46 +00:00
|
|
|
SET_ADDRESS(&pinfo->net_dst, AT_IPX, 10, dst_net_node);
|
|
|
|
SET_ADDRESS(&pinfo->dst, AT_IPX, 10, dst_net_node);
|
2003-08-24 05:38:23 +00:00
|
|
|
SET_ADDRESS(&ipxh->ipx_dst, AT_IPX, 10, dst_net_node);
|
1999-03-20 04:38:57 +00:00
|
|
|
|
2001-12-10 00:26:21 +00:00
|
|
|
if (check_col(pinfo->cinfo, COL_INFO))
|
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%04x)",
|
2003-08-24 05:17:51 +00:00
|
|
|
socket_text(ipxh->ipx_dsocket), ipxh->ipx_dsocket);
|
1998-09-16 02:39:15 +00:00
|
|
|
|
|
|
|
if (tree) {
|
1999-03-20 04:38:57 +00:00
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_ipx, tvb, 0, IPX_HEADER_LEN, FALSE);
|
1999-11-16 11:44:20 +00:00
|
|
|
ipx_tree = proto_item_add_subtree(ti, ett_ipx);
|
1998-09-16 02:39:15 +00:00
|
|
|
}
|
|
|
|
|
2009-09-06 14:25:47 +00:00
|
|
|
str=ep_address_to_str(&pinfo->net_src);
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_string(ipx_tree, hf_ipx_src, tvb, 0, 0, str);
|
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
|
|
|
hidden_item = proto_tree_add_string(ipx_tree, hf_ipx_addr, tvb, 0, 0, str);
|
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
2009-09-06 14:25:47 +00:00
|
|
|
str=ep_address_to_str(&pinfo->net_dst);
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_string(ipx_tree, hf_ipx_dst, tvb, 0, 0, str);
|
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
|
|
|
hidden_item = proto_tree_add_string(ipx_tree, hf_ipx_addr, tvb, 0, 0, str);
|
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
2003-10-03 09:09:35 +00:00
|
|
|
|
2003-08-24 05:21:01 +00:00
|
|
|
proto_tree_add_item(ipx_tree, hf_ipx_checksum, tvb, 0, 2, FALSE);
|
|
|
|
proto_tree_add_uint_format(ipx_tree, hf_ipx_len, tvb, 2, 2, ipxh->ipx_length,
|
|
|
|
"Length: %d bytes", ipxh->ipx_length);
|
|
|
|
ipx_hops = tvb_get_guint8(tvb, 4);
|
|
|
|
proto_tree_add_uint_format(ipx_tree, hf_ipx_hops, tvb, 4, 1, ipx_hops,
|
|
|
|
"Transport Control: %d hops", ipx_hops);
|
|
|
|
proto_tree_add_uint(ipx_tree, hf_ipx_packet_type, tvb, 5, 1, ipxh->ipx_type);
|
|
|
|
|
|
|
|
/* Destination */
|
|
|
|
ipx_dnet = tvb_get_ntohl(tvb, 6);
|
|
|
|
proto_tree_add_ipxnet(ipx_tree, hf_ipx_dnet, tvb, 6, 4,
|
|
|
|
ipx_dnet);
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_ipxnet(ipx_tree, hf_ipx_net, tvb, 6, 4,
|
2003-08-24 05:21:01 +00:00
|
|
|
ipx_dnet);
|
2008-05-14 01:47:41 +00:00
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
2003-08-24 05:21:01 +00:00
|
|
|
ipx_dnode = tvb_get_ptr(tvb, 10, 6);
|
|
|
|
proto_tree_add_ether(ipx_tree, hf_ipx_dnode, tvb, 10, 6,
|
|
|
|
ipx_dnode);
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_ether(ipx_tree, hf_ipx_node, tvb, 10, 6,
|
2003-08-24 05:21:01 +00:00
|
|
|
ipx_dnode);
|
2008-05-14 01:47:41 +00:00
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
2003-08-24 05:21:01 +00:00
|
|
|
proto_tree_add_uint(ipx_tree, hf_ipx_dsocket, tvb, 16, 2,
|
|
|
|
ipxh->ipx_dsocket);
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_uint(ipx_tree, hf_ipx_socket, tvb, 16, 2,
|
2003-08-24 05:21:01 +00:00
|
|
|
ipxh->ipx_dsocket);
|
2008-05-14 01:47:41 +00:00
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
2003-08-24 05:21:01 +00:00
|
|
|
|
|
|
|
/* Source */
|
|
|
|
ipx_snet = tvb_get_ntohl(tvb, 18);
|
|
|
|
proto_tree_add_ipxnet(ipx_tree, hf_ipx_snet, tvb, 18, 4,
|
|
|
|
ipx_snet);
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_ipxnet(ipx_tree, hf_ipx_net, tvb, 18, 4,
|
2003-08-24 05:21:01 +00:00
|
|
|
ipx_snet);
|
2008-05-14 01:47:41 +00:00
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
2003-08-24 05:21:01 +00:00
|
|
|
ipx_snode = tvb_get_ptr(tvb, 22, 6);
|
|
|
|
proto_tree_add_ether(ipx_tree, hf_ipx_snode, tvb, 22, 6,
|
|
|
|
ipx_snode);
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_ether(ipx_tree, hf_ipx_node, tvb, 22, 6,
|
2003-08-24 05:21:01 +00:00
|
|
|
ipx_snode);
|
2008-05-14 01:47:41 +00:00
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
2003-08-24 05:21:01 +00:00
|
|
|
proto_tree_add_uint(ipx_tree, hf_ipx_ssocket, tvb, 28, 2,
|
|
|
|
ipxh->ipx_ssocket);
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_uint(ipx_tree, hf_ipx_socket, tvb, 28, 2,
|
2003-08-24 05:21:01 +00:00
|
|
|
ipxh->ipx_ssocket);
|
2008-05-14 01:47:41 +00:00
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
2003-08-24 05:21:01 +00:00
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
/* Make the next tvbuff */
|
2009-08-16 12:36:22 +00:00
|
|
|
next_tvb = tvb_new_subset_remaining(tvb, IPX_HEADER_LEN);
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
|
2001-02-27 07:28:48 +00:00
|
|
|
/*
|
|
|
|
* Let the subdissector know what type of IPX packet this is.
|
|
|
|
*/
|
2003-08-24 05:17:51 +00:00
|
|
|
pinfo->ipxptype = ipxh->ipx_type;
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
|
2002-07-02 07:32:04 +00:00
|
|
|
/*
|
|
|
|
* Check the socket numbers before we check the packet type;
|
|
|
|
* we've seen non-NCP packets with a type of NCP and a
|
|
|
|
* destination socket of IPX_SOCKET_IPX_MESSAGE, and SAP
|
|
|
|
* packets with a type of NCP and a destination socket of
|
|
|
|
* IPX_SOCKET_SAP.
|
|
|
|
*
|
2003-04-06 22:50:00 +00:00
|
|
|
* We've seen NCP packets with a type of NCP, a source socket of
|
|
|
|
* IPX_SOCKET_NCP, and a destination socket of IPX_SOCKET_IPX_MESSAGE,
|
|
|
|
* and we've seen NCP packets with a type of NCP, a source socket of
|
2002-07-02 07:32:04 +00:00
|
|
|
* IPX_SOCKET_IPX_MESSAGE, and a destination socket of
|
2003-04-06 22:50:00 +00:00
|
|
|
* IPX_SOCKET_NCP, so testing the destination socket first doesn't
|
|
|
|
* always give the right answer. We've also seen SAP packets with
|
|
|
|
* a source socket of IPX_SOCKET_SAP and a destination socket of
|
|
|
|
* IPX_SOCKET_IPX_MESSAGE.
|
|
|
|
*
|
|
|
|
* Unfortunately, we've also seen packets with a source socket
|
|
|
|
* of IPX_SOCKET_NWLINK_SMB_SERVER and a destination socket
|
|
|
|
* of IPX_SOCKET_NWLINK_SMB_NAMEQUERY that were NMPI packets,
|
|
|
|
* not SMB packets, so testing the lower-valued socket first
|
|
|
|
* also doesn't always give the right answer.
|
|
|
|
*
|
|
|
|
* So we start out assuming we should test the lower-numbered
|
|
|
|
* socket number first, but, if the higher-numbered socket is
|
|
|
|
* IPX_SOCKET_NWLINK_SMB_NAMEQUERY, we assume that it's a
|
|
|
|
* NMPI query, and test only that socket.
|
2002-07-02 07:32:04 +00:00
|
|
|
*/
|
2003-08-24 05:17:51 +00:00
|
|
|
if (ipxh->ipx_ssocket > ipxh->ipx_dsocket) {
|
|
|
|
first_socket = ipxh->ipx_dsocket;
|
|
|
|
second_socket = ipxh->ipx_ssocket;
|
2002-07-02 07:32:04 +00:00
|
|
|
} else {
|
2003-08-24 05:17:51 +00:00
|
|
|
first_socket = ipxh->ipx_ssocket;
|
|
|
|
second_socket = ipxh->ipx_dsocket;
|
2002-07-02 07:32:04 +00:00
|
|
|
}
|
2003-08-24 05:17:51 +00:00
|
|
|
|
|
|
|
tap_queue_packet(ipx_tap, pinfo, ipxh);
|
|
|
|
|
2003-04-06 22:50:00 +00:00
|
|
|
if (second_socket != IPX_SOCKET_NWLINK_SMB_NAMEQUERY) {
|
|
|
|
if (dissector_try_port(ipx_socket_dissector_table, first_socket,
|
|
|
|
next_tvb, pinfo, tree))
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (dissector_try_port(ipx_socket_dissector_table, second_socket,
|
Allow either old-style (pre-tvbuff) or new-style (tvbuffified)
dissectors to be registered as dissectors for particular ports,
registered as heuristic dissectors, and registered as dissectors for
conversations, and have routines to be used both by old-style and
new-style dissectors to call registered dissectors.
Have the code that calls those dissectors translate the arguments as
necessary. (For conversation dissectors, replace
"find_conversation_dissector()", which just returns a pointer to the
dissector, with "old_try_conversation_dissector()" and
"try_conversation_dissector()", which actually call the dissector, so
that there's a single place at which we can do that translation. Also
make "dissector_lookup()" static and, instead of calling it and, if it
returns a non-null pointer, calling that dissector, just use
"old_dissector_try_port()" or "dissector_try_port()", for the same
reason.)
This allows some dissectors that took old-style arguments and
immediately translated them to new-style arguments to just take
new-style arguments; make them do so. It also allows some new-style
dissectors not to have to translate arguments before calling routines to
look up and call dissectors; make them not do so.
Get rid of checks for too-short frames in new-style dissectors - the
tvbuff code does those checks for you.
Give the routines to register old-style dissectors, and to call
dissectors from old-style dissectors, names beginning with "old_", with
the routines for new-style dissectors not having the "old_". Update the
dissectors that use those routines appropriately.
Rename "dissect_data()" to "old_dissect_data()", and
"dissect_data_tvb()" to "dissect_data()".
svn path=/trunk/; revision=2218
2000-08-07 03:21:25 +00:00
|
|
|
next_tvb, pinfo, tree))
|
2000-05-30 03:35:55 +00:00
|
|
|
return;
|
2002-07-02 07:32:04 +00:00
|
|
|
|
|
|
|
/*
|
2002-07-04 20:47:28 +00:00
|
|
|
* Neither of them are known; try the packet type, which will
|
|
|
|
* at least let us, for example, dissect SPX packets as SPX.
|
2002-07-02 07:32:04 +00:00
|
|
|
*/
|
2003-08-24 05:17:51 +00:00
|
|
|
if (dissector_try_port(ipx_type_dissector_table, ipxh->ipx_type, next_tvb,
|
2002-07-02 07:32:04 +00:00
|
|
|
pinfo, tree))
|
|
|
|
return;
|
|
|
|
|
2001-11-25 22:51:14 +00:00
|
|
|
call_dissector(data_handle,next_tvb, pinfo, tree);
|
1998-09-16 02:39:15 +00:00
|
|
|
}
|
2003-04-08 00:39:27 +00:00
|
|
|
/* ================================================================= */
|
|
|
|
/* SPX Hash Functions */
|
|
|
|
/* ================================================================= */
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2003-04-08 00:39:27 +00:00
|
|
|
typedef struct {
|
|
|
|
conversation_t *conversation;
|
2003-04-12 07:35:52 +00:00
|
|
|
guint32 spx_src;
|
|
|
|
guint16 spx_seq;
|
2003-04-08 00:39:27 +00:00
|
|
|
} spx_hash_key;
|
|
|
|
|
2003-04-09 20:45:04 +00:00
|
|
|
typedef struct {
|
|
|
|
guint16 spx_ack;
|
|
|
|
guint16 spx_all;
|
|
|
|
guint32 num;
|
|
|
|
} spx_hash_value;
|
|
|
|
|
2003-04-09 22:33:19 +00:00
|
|
|
/*
|
|
|
|
* Structure attached to retransmitted SPX frames; it contains the
|
|
|
|
* frame number of the original transmission.
|
|
|
|
*/
|
|
|
|
typedef struct {
|
|
|
|
guint32 num;
|
|
|
|
} spx_rexmit_info;
|
|
|
|
|
2003-04-08 00:39:27 +00:00
|
|
|
static GHashTable *spx_hash = NULL;
|
|
|
|
|
|
|
|
/* Hash Functions */
|
2005-07-30 16:34:38 +00:00
|
|
|
static gint
|
2003-04-08 00:39:27 +00:00
|
|
|
spx_equal(gconstpointer v, gconstpointer v2)
|
|
|
|
{
|
|
|
|
const spx_hash_key *val1 = (const spx_hash_key*)v;
|
|
|
|
const spx_hash_key *val2 = (const spx_hash_key*)v2;
|
|
|
|
|
|
|
|
if (val1->conversation == val2->conversation &&
|
2003-04-12 07:35:52 +00:00
|
|
|
val1->spx_src == val2->spx_src &&
|
|
|
|
val1->spx_seq == val2->spx_seq) {
|
2003-04-08 00:39:27 +00:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2005-07-30 16:34:38 +00:00
|
|
|
static guint
|
2003-04-08 00:39:27 +00:00
|
|
|
spx_hash_func(gconstpointer v)
|
|
|
|
{
|
|
|
|
const spx_hash_key *spx_key = (const spx_hash_key*)v;
|
|
|
|
return GPOINTER_TO_UINT(spx_key->conversation) + spx_key->spx_src;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Initializes the hash table and the mem_chunk area each time a new
|
2006-05-21 04:49:01 +00:00
|
|
|
* file is loaded or re-loaded in wireshark */
|
2003-04-08 00:39:27 +00:00
|
|
|
static void
|
|
|
|
spx_init_protocol(void)
|
|
|
|
{
|
|
|
|
|
|
|
|
if (spx_hash)
|
|
|
|
g_hash_table_destroy(spx_hash);
|
|
|
|
|
|
|
|
spx_hash = g_hash_table_new(spx_hash_func, spx_equal);
|
|
|
|
}
|
|
|
|
|
2003-04-09 20:45:04 +00:00
|
|
|
/* After the sequential run, we don't need the spx hash table, or
|
|
|
|
* the keys and values, anymore; the lookups have already been done
|
|
|
|
* and the relevant info saved as SPX private data with the frame
|
|
|
|
* if the frame was a retransmission. */
|
2003-04-08 00:39:27 +00:00
|
|
|
static void
|
|
|
|
spx_postseq_cleanup(void)
|
|
|
|
{
|
|
|
|
if (spx_hash) {
|
|
|
|
/* Destroy the hash, but don't clean up request_condition data. */
|
|
|
|
g_hash_table_destroy(spx_hash);
|
|
|
|
spx_hash = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-07-30 16:34:38 +00:00
|
|
|
static spx_hash_value*
|
2003-04-12 07:35:52 +00:00
|
|
|
spx_hash_insert(conversation_t *conversation, guint32 spx_src, guint16 spx_seq)
|
2003-04-08 00:39:27 +00:00
|
|
|
{
|
|
|
|
spx_hash_key *key;
|
2003-04-09 20:45:04 +00:00
|
|
|
spx_hash_value *value;
|
2003-04-08 00:39:27 +00:00
|
|
|
|
|
|
|
/* Now remember the packet, so we can find it if we later. */
|
2005-08-12 23:00:01 +00:00
|
|
|
key = se_alloc(sizeof(spx_hash_key));
|
2003-04-08 00:39:27 +00:00
|
|
|
key->conversation = conversation;
|
|
|
|
key->spx_src = spx_src;
|
2003-04-12 07:35:52 +00:00
|
|
|
key->spx_seq = spx_seq;
|
2003-04-08 00:39:27 +00:00
|
|
|
|
2010-01-25 11:47:39 +00:00
|
|
|
value = se_alloc0(sizeof(spx_hash_value));
|
2003-04-09 20:45:04 +00:00
|
|
|
|
2003-04-08 00:39:27 +00:00
|
|
|
g_hash_table_insert(spx_hash, key, value);
|
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2003-04-09 20:45:04 +00:00
|
|
|
/* Returns the spx_hash_value*, or NULL if not found. */
|
2005-07-30 16:34:38 +00:00
|
|
|
static spx_hash_value*
|
2003-04-12 07:35:52 +00:00
|
|
|
spx_hash_lookup(conversation_t *conversation, guint32 spx_src, guint32 spx_seq)
|
2003-04-08 00:39:27 +00:00
|
|
|
{
|
|
|
|
spx_hash_key key;
|
|
|
|
|
|
|
|
key.conversation = conversation;
|
|
|
|
key.spx_src = spx_src;
|
2003-04-12 07:35:52 +00:00
|
|
|
key.spx_seq = spx_seq;
|
2003-04-08 00:39:27 +00:00
|
|
|
|
|
|
|
return g_hash_table_lookup(spx_hash, &key);
|
|
|
|
}
|
1998-09-16 02:39:15 +00:00
|
|
|
|
|
|
|
/* ================================================================= */
|
|
|
|
/* SPX */
|
|
|
|
/* ================================================================= */
|
2003-04-09 22:33:19 +00:00
|
|
|
|
|
|
|
#define SPX_SYS_PACKET 0x80
|
|
|
|
#define SPX_SEND_ACK 0x40
|
|
|
|
#define SPX_ATTN 0x20
|
|
|
|
#define SPX_EOM 0x10
|
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
static const char*
|
|
|
|
spx_conn_ctrl(guint8 ctrl)
|
1998-09-16 02:39:15 +00:00
|
|
|
{
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
const char *p;
|
1998-09-16 02:39:15 +00:00
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
static const value_string conn_vals[] = {
|
2003-04-12 07:48:36 +00:00
|
|
|
{ 0x00, "Data, No Ack Required" },
|
2003-04-09 22:33:19 +00:00
|
|
|
{ SPX_EOM, "End-of-Message" },
|
|
|
|
{ SPX_ATTN, "Attention" },
|
|
|
|
{ SPX_SEND_ACK, "Acknowledgment Required"},
|
|
|
|
{ SPX_SEND_ACK|SPX_EOM, "Send Ack: End Message"},
|
|
|
|
{ SPX_SYS_PACKET, "System Packet"},
|
|
|
|
{ SPX_SYS_PACKET|SPX_SEND_ACK, "System Packet: Send Ack"},
|
|
|
|
{ 0x00, NULL }
|
1998-09-16 02:39:15 +00:00
|
|
|
};
|
|
|
|
|
2002-09-23 17:14:54 +00:00
|
|
|
p = match_strval((ctrl & 0xf0), conn_vals );
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
|
|
|
|
if (p) {
|
|
|
|
return p;
|
|
|
|
}
|
|
|
|
else {
|
2002-10-10 21:05:05 +00:00
|
|
|
return "Unknown";
|
1998-09-16 02:39:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
static const char*
|
|
|
|
spx_datastream(guint8 type)
|
1998-09-16 02:39:15 +00:00
|
|
|
{
|
|
|
|
switch (type) {
|
|
|
|
case 0xfe:
|
|
|
|
return "End-of-Connection";
|
|
|
|
case 0xff:
|
|
|
|
return "End-of-Connection Acknowledgment";
|
|
|
|
default:
|
2003-04-14 01:26:57 +00:00
|
|
|
return NULL;
|
1998-09-16 02:39:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
#define SPX_HEADER_LEN 12
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
2002-10-08 09:29:48 +00:00
|
|
|
proto_tree *spx_tree = NULL;
|
1999-03-23 03:14:46 +00:00
|
|
|
proto_item *ti;
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
tvbuff_t *next_tvb;
|
|
|
|
guint8 conn_ctrl;
|
2003-04-09 22:33:19 +00:00
|
|
|
proto_tree *cc_tree;
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
guint8 datastream_type;
|
2003-04-14 01:26:57 +00:00
|
|
|
const char *datastream_type_string;
|
2003-04-12 07:35:52 +00:00
|
|
|
guint16 spx_seq;
|
2002-10-10 21:05:05 +00:00
|
|
|
const char *spx_msg_string;
|
Add a new port type, PT_IPX, for IPX socket numbers; set "pinfo->ptype",
"pinfo->srcport", and "pinfo->destport" appropriately in the IPX
dissector. Add support for PT_IPX port types in display columns.
Have an "spx.socket" dissector table, similar to the "ipx.socket"
dissector table, and have the SPX dissector use that, with the IPX
socket numbers from "pinfo->srcport" and "pinfo->destport", so that
dissectors for protocols that run atop SPX can register with particular
socket numbers. (Think of it as similar to what would have been the
case had the IP header had 16-bit source and destination port numbers,
and had TCP and UDP used those port numbers rather than having port
numbers in their headers.) Also, have the SPX dissector dissect
subprotocols regardless of whether we're building a protocol tree or not.
Use the dissector handle for the IPX message dissector for both IPX
socket numbers; there's no need to create separate handles for both
registrations.
Have NDPS register as a subdissector of the SPX dissector, using
"spx.socket", and get rid of the duplicate SPX dissection in the NDPS
dissector.
Make the NDPS dissector set the columns regardless of whether a protocol
tree is being built, and clean up the dissector (fixing some bugs).
Get rid of unneeded includes in "packet-ndps.c".
svn path=/trunk/; revision=6424
2002-10-15 04:31:00 +00:00
|
|
|
guint16 low_socket, high_socket;
|
2003-04-08 00:39:27 +00:00
|
|
|
guint32 src;
|
2003-04-09 20:45:04 +00:00
|
|
|
conversation_t *conversation;
|
|
|
|
spx_hash_value *pkt_value;
|
2010-01-18 21:37:34 +00:00
|
|
|
spx_rexmit_info *spx_rexmit_info_p;
|
|
|
|
spx_info spx_infox;
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SPX");
|
2009-08-09 07:01:26 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "SPX");
|
1998-09-16 02:39:15 +00:00
|
|
|
|
|
|
|
if (tree) {
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_spx, tvb, 0, SPX_HEADER_LEN, FALSE);
|
1999-11-16 11:44:20 +00:00
|
|
|
spx_tree = proto_item_add_subtree(ti, ett_spx);
|
2002-10-08 09:29:48 +00:00
|
|
|
}
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2002-10-08 09:29:48 +00:00
|
|
|
conn_ctrl = tvb_get_guint8(tvb, 0);
|
|
|
|
spx_msg_string = spx_conn_ctrl(conn_ctrl);
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO))
|
2002-10-10 21:05:05 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", spx_msg_string);
|
2002-10-08 09:29:48 +00:00
|
|
|
if (tree) {
|
2003-04-09 22:33:19 +00:00
|
|
|
ti = proto_tree_add_uint_format(spx_tree, hf_spx_connection_control, tvb,
|
|
|
|
0, 1, conn_ctrl,
|
|
|
|
"Connection Control: %s (0x%02X)",
|
|
|
|
spx_msg_string, conn_ctrl);
|
|
|
|
cc_tree = proto_item_add_subtree(ti, ett_spx_connctrl);
|
|
|
|
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_sys, tvb,
|
|
|
|
0, 1, conn_ctrl);
|
|
|
|
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_send_ack, tvb,
|
|
|
|
0, 1, conn_ctrl);
|
|
|
|
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_attn, tvb,
|
|
|
|
0, 1, conn_ctrl);
|
|
|
|
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_eom, tvb,
|
|
|
|
0, 1, conn_ctrl);
|
|
|
|
}
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2003-04-09 22:33:19 +00:00
|
|
|
datastream_type = tvb_get_guint8(tvb, 1);
|
2003-04-14 01:26:57 +00:00
|
|
|
datastream_type_string = spx_datastream(datastream_type);
|
|
|
|
if (datastream_type_string != NULL) {
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO))
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
|
|
|
|
datastream_type_string);
|
|
|
|
}
|
2003-04-09 22:33:19 +00:00
|
|
|
if (tree) {
|
2003-04-14 01:26:57 +00:00
|
|
|
if (datastream_type_string != NULL) {
|
|
|
|
proto_tree_add_uint_format(spx_tree, hf_spx_datastream_type, tvb,
|
|
|
|
1, 1, datastream_type,
|
|
|
|
"Datastream Type: %s (0x%02X)",
|
|
|
|
datastream_type_string,
|
|
|
|
datastream_type);
|
|
|
|
} else {
|
|
|
|
proto_tree_add_uint_format(spx_tree, hf_spx_datastream_type, tvb,
|
|
|
|
1, 1, datastream_type,
|
|
|
|
"Datastream Type: 0x%02X",
|
|
|
|
datastream_type);
|
|
|
|
}
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_item(spx_tree, hf_spx_src_id, tvb, 2, 2, FALSE);
|
|
|
|
proto_tree_add_item(spx_tree, hf_spx_dst_id, tvb, 4, 2, FALSE);
|
2003-04-12 07:35:52 +00:00
|
|
|
}
|
|
|
|
spx_seq = tvb_get_ntohs(tvb, 6);
|
|
|
|
if (tree) {
|
|
|
|
proto_tree_add_uint(spx_tree, hf_spx_seq_nr, tvb, 6, 2, spx_seq);
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_item(spx_tree, hf_spx_ack_nr, tvb, 8, 2, FALSE);
|
|
|
|
proto_tree_add_item(spx_tree, hf_spx_all_nr, tvb, 10, 2, FALSE);
|
Add a new port type, PT_IPX, for IPX socket numbers; set "pinfo->ptype",
"pinfo->srcport", and "pinfo->destport" appropriately in the IPX
dissector. Add support for PT_IPX port types in display columns.
Have an "spx.socket" dissector table, similar to the "ipx.socket"
dissector table, and have the SPX dissector use that, with the IPX
socket numbers from "pinfo->srcport" and "pinfo->destport", so that
dissectors for protocols that run atop SPX can register with particular
socket numbers. (Think of it as similar to what would have been the
case had the IP header had 16-bit source and destination port numbers,
and had TCP and UDP used those port numbers rather than having port
numbers in their headers.) Also, have the SPX dissector dissect
subprotocols regardless of whether we're building a protocol tree or not.
Use the dissector handle for the IPX message dissector for both IPX
socket numbers; there's no need to create separate handles for both
registrations.
Have NDPS register as a subdissector of the SPX dissector, using
"spx.socket", and get rid of the duplicate SPX dissection in the NDPS
dissector.
Make the NDPS dissector set the columns regardless of whether a protocol
tree is being built, and clean up the dissector (fixing some bugs).
Get rid of unneeded includes in "packet-ndps.c".
svn path=/trunk/; revision=6424
2002-10-15 04:31:00 +00:00
|
|
|
}
|
2003-04-08 02:00:54 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* SPX is Connection Oriented and Delivery Guaranteed.
|
2003-04-09 20:45:04 +00:00
|
|
|
* On the first pass, we need to flag retransmissions by the SPX
|
|
|
|
* protocol, so that subdissectors know whether a packet was
|
|
|
|
* retransmitted.
|
|
|
|
*
|
|
|
|
* We start out by creating a conversation for this direction of the
|
|
|
|
* IPX session; we use "pinfo->srcport" twice, so that we have
|
|
|
|
* separate conversations for the two directions.
|
2003-04-08 02:00:54 +00:00
|
|
|
*
|
2003-04-09 20:45:04 +00:00
|
|
|
* XXX - that might not work correctly if there's more than one
|
|
|
|
* SPX session using that source port; can that happen? If so,
|
|
|
|
* we should probably use the direction, as well as the conversation,
|
|
|
|
* as part of the hash key; if we do that, we can probably just
|
|
|
|
* use PT_IPX as the port type, and possibly get rid of PT_NCP.
|
2003-04-12 07:35:52 +00:00
|
|
|
*
|
|
|
|
* According to
|
|
|
|
*
|
|
|
|
* http://developer.novell.com/research/appnotes/1995/december/03/apv.htm
|
|
|
|
*
|
|
|
|
* the sequence number is not incremented for system packets, so
|
|
|
|
* presumably that means there is no notion of a system packet
|
|
|
|
* being retransmitted; that document also says that system
|
|
|
|
* packets are used as "I'm still here" keepalives and as
|
|
|
|
* acknowledgements (presumably meaning ACK-only packets), which
|
|
|
|
* suggests that they might not be ACKed and thus might not
|
|
|
|
* be retransmitted.
|
2003-04-08 00:39:27 +00:00
|
|
|
*/
|
2003-04-12 07:35:52 +00:00
|
|
|
if (conn_ctrl & SPX_SYS_PACKET) {
|
2003-04-08 00:39:27 +00:00
|
|
|
/*
|
2003-04-12 07:35:52 +00:00
|
|
|
* It's a system packet, so it isn't a retransmission.
|
2003-04-09 20:45:04 +00:00
|
|
|
*/
|
2010-01-18 21:37:34 +00:00
|
|
|
spx_rexmit_info_p = NULL;
|
2003-04-12 07:35:52 +00:00
|
|
|
} else {
|
|
|
|
/*
|
|
|
|
* Not a system packet - check for retransmissions.
|
|
|
|
*/
|
|
|
|
if (!pinfo->fd->flags.visited) {
|
2005-02-02 20:07:03 +00:00
|
|
|
conversation = find_conversation(pinfo->fd->num, &pinfo->src,
|
2003-04-12 07:35:52 +00:00
|
|
|
&pinfo->dst, PT_NCP, pinfo->srcport,
|
|
|
|
pinfo->srcport, 0);
|
|
|
|
if (conversation == NULL) {
|
|
|
|
/*
|
|
|
|
* It's not part of any conversation - create
|
|
|
|
* a new one.
|
|
|
|
*/
|
2005-02-02 20:07:03 +00:00
|
|
|
conversation = conversation_new(pinfo->fd->num, &pinfo->src,
|
2003-04-12 07:35:52 +00:00
|
|
|
&pinfo->dst, PT_NCP, pinfo->srcport,
|
|
|
|
pinfo->srcport, 0);
|
|
|
|
}
|
2003-04-09 20:45:04 +00:00
|
|
|
|
|
|
|
/*
|
2003-04-12 07:35:52 +00:00
|
|
|
* Now we'll hash the SPX header and use the result
|
|
|
|
* of that, plus the conversation, as a hash key to
|
|
|
|
* identify this packet.
|
|
|
|
*
|
|
|
|
* If we don't find it in the hash table, it's not a
|
|
|
|
* retransmission, otherwise it is. If we don't find
|
|
|
|
* it, we enter it into the hash table, with the
|
|
|
|
* frame number.
|
|
|
|
* If we do, we attach to this frame a structure giving
|
|
|
|
* the frame number of the original transmission, so
|
|
|
|
* that we, and subdissectors, know it's a
|
|
|
|
* retransmission.
|
2003-04-09 20:45:04 +00:00
|
|
|
*/
|
2003-04-12 07:35:52 +00:00
|
|
|
src = tvb_get_ntohs(tvb, 0)+tvb_get_ntohs(tvb, 2)+tvb_get_ntohs(tvb, 4)+tvb_get_ntohs(tvb, 6)+tvb_get_ntohs(tvb, 8);
|
|
|
|
pkt_value = spx_hash_lookup(conversation, src, spx_seq);
|
|
|
|
if (pkt_value == NULL) {
|
|
|
|
/*
|
|
|
|
* Not found in the hash table.
|
|
|
|
* Enter it into the hash table.
|
|
|
|
*/
|
|
|
|
pkt_value = spx_hash_insert(conversation, src,
|
|
|
|
spx_seq);
|
|
|
|
pkt_value->spx_ack = tvb_get_ntohs(tvb, 8);
|
|
|
|
pkt_value->spx_all = tvb_get_ntohs(tvb, 10);
|
|
|
|
pkt_value->num = pinfo->fd->num;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This is not a retransmission, so we shouldn't
|
|
|
|
* have any retransmission indicator.
|
|
|
|
*/
|
2010-01-18 21:37:34 +00:00
|
|
|
spx_rexmit_info_p = NULL;
|
2003-04-12 07:35:52 +00:00
|
|
|
} else {
|
|
|
|
/*
|
|
|
|
* Found in the hash table. Mark this frame as
|
|
|
|
* a retransmission.
|
|
|
|
*/
|
2010-01-18 21:37:34 +00:00
|
|
|
spx_rexmit_info_p = se_alloc(sizeof(spx_rexmit_info));
|
|
|
|
spx_rexmit_info_p->num = pkt_value->num;
|
2003-04-12 07:35:52 +00:00
|
|
|
p_add_proto_data(pinfo->fd, proto_spx,
|
2010-01-18 21:37:34 +00:00
|
|
|
spx_rexmit_info_p);
|
2003-04-12 07:35:52 +00:00
|
|
|
}
|
2003-04-09 20:45:04 +00:00
|
|
|
} else {
|
|
|
|
/*
|
2003-04-12 07:35:52 +00:00
|
|
|
* Do we have per-packet SPX data for this frame?
|
|
|
|
* If so, it's a retransmission, and the per-packet
|
|
|
|
* data indicates which frame had the original
|
|
|
|
* transmission.
|
2003-04-09 20:45:04 +00:00
|
|
|
*/
|
2010-01-18 21:37:34 +00:00
|
|
|
spx_rexmit_info_p = p_get_proto_data(pinfo->fd,
|
2003-04-12 07:35:52 +00:00
|
|
|
proto_spx);
|
2003-04-09 20:45:04 +00:00
|
|
|
}
|
2003-04-08 02:00:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2003-04-09 20:45:04 +00:00
|
|
|
* It's a retransmission if we have a retransmission indicator.
|
2003-04-09 22:33:19 +00:00
|
|
|
* Flag this as a retransmission, but don't pass it to the
|
|
|
|
* subdissector.
|
2003-04-08 02:00:54 +00:00
|
|
|
*/
|
2010-01-18 21:37:34 +00:00
|
|
|
if (spx_rexmit_info_p != NULL) {
|
2003-04-08 02:00:54 +00:00
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)) {
|
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO,
|
|
|
|
"[Retransmission] Original Packet %u",
|
2010-01-18 21:37:34 +00:00
|
|
|
spx_rexmit_info_p->num);
|
2003-04-09 22:33:19 +00:00
|
|
|
}
|
|
|
|
if (tree) {
|
|
|
|
proto_tree_add_uint_format(spx_tree, hf_spx_rexmt_frame,
|
2010-01-18 21:37:34 +00:00
|
|
|
tvb, 0, 0, spx_rexmit_info_p->num,
|
2003-04-09 22:33:19 +00:00
|
|
|
"This is a retransmission of frame %u",
|
2010-01-18 21:37:34 +00:00
|
|
|
spx_rexmit_info_p->num);
|
2003-04-12 05:36:10 +00:00
|
|
|
if (tvb_length_remaining(tvb, SPX_HEADER_LEN) > 0) {
|
|
|
|
proto_tree_add_text(spx_tree, tvb,
|
|
|
|
SPX_HEADER_LEN, -1,
|
|
|
|
"Retransmitted data");
|
|
|
|
}
|
2003-04-08 02:00:54 +00:00
|
|
|
}
|
2003-04-09 22:33:19 +00:00
|
|
|
return;
|
2003-04-08 00:39:27 +00:00
|
|
|
}
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2002-10-19 01:17:13 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, SPX_HEADER_LEN) > 0) {
|
2009-05-19 17:16:14 +00:00
|
|
|
void* pd_save;
|
2002-10-19 01:17:13 +00:00
|
|
|
/*
|
|
|
|
* Call subdissectors based on the IPX socket numbers; a
|
|
|
|
* subdissector might have registered with our IPX socket
|
|
|
|
* dissector table rather than the IPX dissector's socket
|
|
|
|
* dissector table.
|
|
|
|
*
|
|
|
|
* Assume the lower-numbered socket number is more likely
|
|
|
|
* to be the right one, along the lines of what we do for
|
|
|
|
* TCP and UDP. We've seen NCP packets with a type of NCP,
|
|
|
|
* a source socket of IPX_SOCKET_NCP, and a destination
|
|
|
|
* socket of IPX_SOCKET_IPX_MESSAGE, and we've seen NCP
|
|
|
|
* packets with a type of NCP, a source socket of
|
|
|
|
* IPX_SOCKET_IPX_MESSAGE, and a destination socket of
|
|
|
|
* IPX_SOCKET_NCP.
|
|
|
|
*/
|
|
|
|
if (pinfo->srcport > pinfo->destport) {
|
|
|
|
low_socket = pinfo->destport;
|
|
|
|
high_socket = pinfo->srcport;
|
|
|
|
} else {
|
|
|
|
low_socket = pinfo->srcport;
|
|
|
|
high_socket = pinfo->destport;
|
|
|
|
}
|
|
|
|
|
2003-04-08 02:00:54 +00:00
|
|
|
/*
|
2003-04-09 22:33:19 +00:00
|
|
|
* Pass information to subdissectors.
|
2003-04-08 02:00:54 +00:00
|
|
|
*/
|
2010-01-18 21:37:34 +00:00
|
|
|
spx_infox.eom = conn_ctrl & SPX_EOM;
|
|
|
|
spx_infox.datastream_type = datastream_type;
|
2009-05-19 17:16:14 +00:00
|
|
|
pd_save = pinfo->private_data;
|
2010-01-18 21:37:34 +00:00
|
|
|
pinfo->private_data = &spx_infox;
|
2003-04-08 02:00:54 +00:00
|
|
|
|
2009-08-16 12:36:22 +00:00
|
|
|
next_tvb = tvb_new_subset_remaining(tvb, SPX_HEADER_LEN);
|
2002-10-19 01:17:13 +00:00
|
|
|
if (dissector_try_port(spx_socket_dissector_table, low_socket,
|
|
|
|
next_tvb, pinfo, tree))
|
2009-05-19 17:16:14 +00:00
|
|
|
{
|
|
|
|
pinfo->private_data = pd_save;
|
2002-10-19 01:17:13 +00:00
|
|
|
return;
|
2009-05-19 17:16:14 +00:00
|
|
|
}
|
2002-10-19 01:17:13 +00:00
|
|
|
if (dissector_try_port(spx_socket_dissector_table, high_socket,
|
|
|
|
next_tvb, pinfo, tree))
|
2009-05-19 17:16:14 +00:00
|
|
|
{
|
|
|
|
pinfo->private_data = pd_save;
|
2002-10-19 01:17:13 +00:00
|
|
|
return;
|
2009-05-19 17:16:14 +00:00
|
|
|
}
|
2002-10-19 01:17:13 +00:00
|
|
|
call_dissector(data_handle, next_tvb, pinfo, tree);
|
2009-05-19 17:16:14 +00:00
|
|
|
pinfo->private_data = pd_save;
|
1998-09-16 02:39:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-12-08 21:59:12 +00:00
|
|
|
/* ================================================================= */
|
2000-05-11 08:18:09 +00:00
|
|
|
/* IPX Message */
|
1999-12-08 21:59:12 +00:00
|
|
|
/* ================================================================= */
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
static void
|
|
|
|
dissect_ipxmsg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
1999-12-08 21:59:12 +00:00
|
|
|
proto_tree *msg_tree;
|
|
|
|
proto_item *ti;
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
guint8 conn_number, sig_char;
|
1999-12-08 21:59:12 +00:00
|
|
|
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPX MSG");
|
2009-08-09 07:36:13 +00:00
|
|
|
col_clear(pinfo->cinfo, COL_INFO);
|
1999-12-08 21:59:12 +00:00
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
conn_number = tvb_get_guint8(tvb, 0);
|
|
|
|
sig_char = tvb_get_guint8(tvb, 1);
|
1999-12-08 21:59:12 +00:00
|
|
|
|
2001-12-10 00:26:21 +00:00
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)) {
|
2002-08-28 21:04:11 +00:00
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO,
|
|
|
|
"%s, Connection %d",
|
1999-12-08 22:07:26 +00:00
|
|
|
val_to_str(sig_char, ipxmsg_sigchar_vals, "Unknown Signature Char"), conn_number);
|
1999-12-08 21:59:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (tree) {
|
2002-01-24 09:20:54 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_ipxmsg, tvb, 0, -1, FALSE);
|
1999-12-08 21:59:12 +00:00
|
|
|
msg_tree = proto_item_add_subtree(ti, ett_ipxmsg);
|
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_uint(msg_tree, hf_msg_conn, tvb, 0, 1, conn_number);
|
|
|
|
proto_tree_add_uint(msg_tree, hf_msg_sigchar, tvb, 1, 1, sig_char);
|
1999-12-08 21:59:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
/* ================================================================= */
|
1998-09-23 05:25:12 +00:00
|
|
|
/* IPX RIP */
|
1998-09-16 02:39:15 +00:00
|
|
|
/* ================================================================= */
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
static void
|
|
|
|
dissect_ipxrip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
1999-03-23 03:14:46 +00:00
|
|
|
proto_tree *rip_tree;
|
2008-05-14 01:47:41 +00:00
|
|
|
proto_item *ti, *hidden_item;
|
1998-09-23 05:25:12 +00:00
|
|
|
guint16 operation;
|
|
|
|
struct ipx_rt_def route;
|
Have the IPX code set "pi.len" and "pi.captured_len" based on the length
in the IPX header, and have the dissectors it calls use it rather than
being passed the length as an argument.
Treat both packet type 20 ("WAN Broadcast") and 4 ("IPX", although 3 is
also "IPX", according to Network Monitor) as potentially being NetBIOS
packets.
The packet types for the IPX NetBIOS socket (0x0455) and the NWLink
sockets (0x0551 and 0x0553) are different (perhaps because there's one
socket for the 0x0455 NBIPX, so you have to do name service and datagram
service and have the packet types distinguish them, but NWLink has
separate sockets for name service and datagram service).
The packet type for name service and for datagram service are at
*different locations* in the packet, which is unfortunate if you want to
use the packet type to distinguish name service and datagram service
packets. Use the packet length, for now, to distinguish them, with
socket 0x0455.
Dissect datagram packets differently from name service packets.
Export "packet-netbios.c"'s "netbios_add_name()" routine, and use it
when dissecting NBIPX packets as well.
Label NBIPX packets as "NBIPX" rather than "NetBIOS".
svn path=/trunk/; revision=627
1999-09-02 23:17:58 +00:00
|
|
|
int cursor;
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
int available_length;
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2005-07-30 16:34:38 +00:00
|
|
|
static const char *rip_type[3] = { "Request", "Response", "Unknown" };
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPX RIP");
|
2009-08-09 07:36:13 +00:00
|
|
|
col_clear(pinfo->cinfo, COL_INFO);
|
1998-09-16 02:39:15 +00:00
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
operation = tvb_get_ntohs(tvb, 0) - 1;
|
|
|
|
|
2001-12-10 00:26:21 +00:00
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)) {
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
/* rip_types 0 and 1 are valid, anything else becomes 2 or "Unknown" */
|
2002-01-21 23:35:32 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, rip_type[MIN(operation, 2)]);
|
1998-09-16 02:39:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (tree) {
|
2002-01-24 09:20:54 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_ipxrip, tvb, 0, -1, FALSE);
|
1999-11-16 11:44:20 +00:00
|
|
|
rip_tree = proto_item_add_subtree(ti, ett_ipxrip);
|
1998-09-23 05:25:12 +00:00
|
|
|
|
|
|
|
if (operation < 2) {
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_text(rip_tree, tvb, 0, 2,
|
1998-09-23 05:25:12 +00:00
|
|
|
"RIP packet type: %s", rip_type[operation]);
|
1999-10-17 09:23:43 +00:00
|
|
|
|
|
|
|
if (operation == 0) {
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_boolean(rip_tree,
|
2002-08-28 21:04:11 +00:00
|
|
|
hf_ipxrip_request,
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
tvb, 0, 2, 1);
|
1999-10-17 09:23:43 +00:00
|
|
|
} else {
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_boolean(rip_tree,
|
2002-08-28 21:04:11 +00:00
|
|
|
hf_ipxrip_response,
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
tvb, 0, 2, 1);
|
1999-10-17 09:23:43 +00:00
|
|
|
}
|
2008-05-14 01:47:41 +00:00
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
1999-10-17 09:23:43 +00:00
|
|
|
|
1998-09-23 05:25:12 +00:00
|
|
|
}
|
|
|
|
else {
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_text(rip_tree, tvb, 0, 2, "Unknown RIP packet type");
|
1998-09-16 02:39:15 +00:00
|
|
|
}
|
|
|
|
|
2002-01-24 09:20:54 +00:00
|
|
|
available_length = tvb_reported_length(tvb);
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
for (cursor = 2; cursor < available_length; cursor += 8) {
|
2002-01-24 09:20:54 +00:00
|
|
|
tvb_memcpy(tvb, (guint8 *)&route.network, cursor, 4);
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
route.hops = tvb_get_ntohs(tvb, cursor+4);
|
|
|
|
route.ticks = tvb_get_ntohs(tvb, cursor+6);
|
1998-09-16 02:39:15 +00:00
|
|
|
|
1998-09-23 14:46:06 +00:00
|
|
|
if (operation == IPX_RIP_REQUEST - 1) {
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_text(rip_tree, tvb, cursor, 8,
|
1998-09-23 14:46:06 +00:00
|
|
|
"Route Vector: %s, %d hop%s, %d tick%s",
|
1998-10-14 04:09:15 +00:00
|
|
|
ipxnet_to_string((guint8*)&route.network),
|
1998-09-23 14:46:06 +00:00
|
|
|
route.hops, route.hops == 1 ? "" : "s",
|
|
|
|
route.ticks, route.ticks == 1 ? "" : "s");
|
|
|
|
}
|
|
|
|
else {
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_text(rip_tree, tvb, cursor, 8,
|
1998-09-23 14:46:06 +00:00
|
|
|
"Route Vector: %s, %d hop%s, %d tick%s (%d ms)",
|
1998-10-14 04:09:15 +00:00
|
|
|
ipxnet_to_string((guint8*)&route.network),
|
1998-09-23 14:46:06 +00:00
|
|
|
route.hops, route.hops == 1 ? "" : "s",
|
|
|
|
route.ticks, route.ticks == 1 ? "" : "s",
|
|
|
|
route.ticks * 1000 / 18);
|
|
|
|
}
|
1998-09-16 02:39:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
1998-09-24 04:22:08 +00:00
|
|
|
|
2003-12-29 19:04:05 +00:00
|
|
|
/* ================================================================= */
|
|
|
|
/* IPX Serialization */
|
|
|
|
/* ================================================================= */
|
|
|
|
static void
|
|
|
|
dissect_serialization(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
|
|
|
proto_tree *ser_tree = NULL;
|
|
|
|
proto_item *ti;
|
|
|
|
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "NW_SERIAL");
|
2009-08-09 07:36:13 +00:00
|
|
|
col_clear(pinfo->cinfo, COL_INFO);
|
2003-12-29 19:04:05 +00:00
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
ti = proto_tree_add_item(tree, proto_serialization, tvb, 0, -1,
|
|
|
|
FALSE);
|
|
|
|
ser_tree = proto_item_add_subtree(ti, ett_serialization);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)) {
|
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "Serial number %s",
|
|
|
|
tvb_bytes_to_str(tvb, 0, 6));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
proto_tree_add_text(ser_tree, tvb, 0, 6,
|
|
|
|
"Serial number: %s", tvb_bytes_to_str(tvb, 0, 6));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-01-30 05:21:34 +00:00
|
|
|
/*
|
|
|
|
* Some of these are from ncpfs, others are from the book,
|
|
|
|
* others are from the page at
|
|
|
|
*
|
|
|
|
* http://www.iana.org/assignments/novell-sap-numbers
|
|
|
|
*
|
|
|
|
* and some from the page at
|
|
|
|
*
|
|
|
|
* http://www.rware.demon.co.uk/ipxsap.htm
|
|
|
|
*
|
|
|
|
* (see also the page at
|
|
|
|
*
|
|
|
|
* http://developer.novell.com/research/appnotes/1998/february/03/06.htm
|
|
|
|
*
|
|
|
|
* which has a huge list - but many of the entries list only the
|
|
|
|
* organization owning the SAP type, not what the type is for).
|
|
|
|
*/
|
2003-03-31 08:10:08 +00:00
|
|
|
const value_string server_vals[] = {
|
2003-01-30 05:21:34 +00:00
|
|
|
{ 0x0000, "Unknown" },
|
|
|
|
{ 0x0001, "User" },
|
|
|
|
{ 0x0002, "User Group" },
|
|
|
|
{ 0x0003, "Print Queue or Print Group" },
|
|
|
|
{ 0x0004, "File Server (SLIST source)" },
|
|
|
|
{ 0x0005, "Job Server" },
|
|
|
|
{ 0x0006, "Gateway" },
|
|
|
|
{ 0x0007, "Print Server or Silent Print Server" },
|
|
|
|
{ 0x0008, "Archive Queue" },
|
|
|
|
{ 0x0009, "Archive Server" },
|
|
|
|
{ 0x000a, "Job Queue" },
|
|
|
|
{ 0x000b, "Administration" },
|
|
|
|
{ 0x000F, "Novell TI-RPC" },
|
|
|
|
{ 0x0017, "Diagnostics" },
|
|
|
|
{ 0x0020, "NetBIOS" },
|
|
|
|
{ 0x0021, "NAS SNA Gateway" },
|
|
|
|
{ 0x0023, "NACS Async Gateway or Asynchronous Gateway" },
|
|
|
|
{ 0x0024, "Remote Bridge or Routing Service" },
|
|
|
|
{ 0x0026, "Bridge Server or Asynchronous Bridge Server" },
|
|
|
|
{ 0x0027, "TCP/IP Gateway Server" },
|
|
|
|
{ 0x0028, "Point to Point (Eicon) X.25 Bridge Server" },
|
|
|
|
{ 0x0029, "Eicon 3270 Gateway" },
|
|
|
|
{ 0x002a, "CHI Corp" },
|
|
|
|
{ 0x002c, "PC Chalkboard" },
|
|
|
|
{ 0x002d, "Time Synchronization Server or Asynchronous Timer" },
|
|
|
|
{ 0x002e, "ARCserve 5.0 / Palindrome Backup Director 4.x (PDB4)" },
|
|
|
|
{ 0x0045, "DI3270 Gateway" },
|
|
|
|
{ 0x0047, "Advertising Print Server" },
|
|
|
|
{ 0x004a, "NetBlazer Modems" },
|
|
|
|
{ 0x004b, "Btrieve VAP/NLM 5.0" },
|
|
|
|
{ 0x004c, "NetWare SQL VAP/NLM Server" },
|
|
|
|
{ 0x004d, "Xtree Network Version/NetWare XTree" },
|
|
|
|
{ 0x0050, "Btrieve VAP 4.11" },
|
|
|
|
{ 0x0052, "QuickLink (Cubix)" },
|
|
|
|
{ 0x0053, "Print Queue User" },
|
|
|
|
{ 0x0058, "Multipoint X.25 Eicon Router" },
|
|
|
|
{ 0x0060, "STLB/NLM" },
|
|
|
|
{ 0x0064, "ARCserve" },
|
|
|
|
{ 0x0066, "ARCserve 3.0" },
|
|
|
|
{ 0x0072, "WAN Copy Utility" },
|
|
|
|
{ 0x007a, "TES-NetWare for VMS" },
|
|
|
|
{ 0x0092, "WATCOM Debugger or Emerald Tape Backup Server" },
|
|
|
|
{ 0x0095, "DDA OBGYN" },
|
|
|
|
{ 0x0098, "NetWare Access Server (Asynchronous gateway)" },
|
|
|
|
{ 0x009a, "NetWare for VMS II or Named Pipe Server" },
|
|
|
|
{ 0x009b, "NetWare Access Server" },
|
|
|
|
{ 0x009e, "Portable NetWare Server or SunLink NVT" },
|
|
|
|
{ 0x00a1, "Powerchute APC UPS NLM" },
|
|
|
|
{ 0x00aa, "LAWserve" },
|
|
|
|
{ 0x00ac, "Compaq IDA Status Monitor" },
|
|
|
|
{ 0x0100, "PIPE STAIL" },
|
|
|
|
{ 0x0102, "LAN Protect Bindery" },
|
|
|
|
{ 0x0103, "Oracle DataBase Server" },
|
|
|
|
{ 0x0107, "NetWare 386 or RSPX Remote Console" },
|
|
|
|
{ 0x010f, "Novell SNA Gateway" },
|
|
|
|
{ 0x0111, "Test Server" },
|
|
|
|
{ 0x0112, "Print Server (HP)" },
|
|
|
|
{ 0x0114, "CSA MUX (f/Communications Executive)" },
|
|
|
|
{ 0x0115, "CSA LCA (f/Communications Executive)" },
|
|
|
|
{ 0x0116, "CSA CM (f/Communications Executive)" },
|
|
|
|
{ 0x0117, "CSA SMA (f/Communications Executive)" },
|
|
|
|
{ 0x0118, "CSA DBA (f/Communications Executive)" },
|
|
|
|
{ 0x0119, "CSA NMA (f/Communications Executive)" },
|
|
|
|
{ 0x011a, "CSA SSA (f/Communications Executive)" },
|
|
|
|
{ 0x011b, "CSA STATUS (f/Communications Executive)" },
|
|
|
|
{ 0x011e, "CSA APPC (f/Communications Executive)" },
|
|
|
|
{ 0x0126, "SNA TEST SSA Profile" },
|
|
|
|
{ 0x012a, "CSA TRACE (f/Communications Executive)" },
|
|
|
|
{ 0x012b, "NetWare for SAA" },
|
|
|
|
{ 0x012e, "IKARUS virus scan utility" },
|
|
|
|
{ 0x0130, "Communications Executive" },
|
|
|
|
{ 0x0133, "NNS Domain Server or NetWare Naming Services Domain" },
|
|
|
|
{ 0x0135, "NetWare Naming Services Profile" },
|
|
|
|
{ 0x0137, "NetWare 386 Print Queue or NNS Print Queue" },
|
|
|
|
{ 0x0141, "LAN Spool Server (Vap, Intel)" },
|
|
|
|
{ 0x0152, "IRMALAN Gateway" },
|
|
|
|
{ 0x0154, "Named Pipe Server" },
|
|
|
|
{ 0x0166, "NetWare Management" },
|
|
|
|
{ 0x0168, "Intel PICKIT Comm Server or Intel CAS Talk Server" },
|
|
|
|
{ 0x0173, "Compaq" },
|
|
|
|
{ 0x0174, "Compaq SNMP Agent" },
|
|
|
|
{ 0x0175, "Compaq" },
|
|
|
|
{ 0x0180, "XTree Server or XTree Tools" },
|
|
|
|
{ 0x018A, "NASI services broadcast server (Novell)" },
|
|
|
|
{ 0x01b0, "GARP Gateway (net research)" },
|
|
|
|
{ 0x01b1, "Binfview (Lan Support Group)" },
|
|
|
|
{ 0x01bf, "Intel LanDesk Manager" },
|
|
|
|
{ 0x01ca, "AXTEC" },
|
|
|
|
{ 0x01cb, "Shiva NetModem/E" },
|
|
|
|
{ 0x01cc, "Shiva LanRover/E" },
|
|
|
|
{ 0x01cd, "Shiva LanRover/T" },
|
|
|
|
{ 0x01ce, "Shiva Universal" },
|
|
|
|
{ 0x01d8, "Castelle FAXPress Server" },
|
|
|
|
{ 0x01da, "Castelle LANPress Print Server" },
|
|
|
|
{ 0x01dc, "Castelle FAX/Xerox 7033 Fax Server/Excel Lan Fax" },
|
|
|
|
{ 0x01f0, "LEGATO" },
|
|
|
|
{ 0x01f5, "LEGATO" },
|
|
|
|
{ 0x0233, "NMS Agent or NetWare Management Agent" },
|
|
|
|
{ 0x0237, "NMS IPX Discovery or LANtern Read/Write Channel" },
|
|
|
|
{ 0x0238, "NMS IP Discovery or LANtern Trap/Alarm Channel" },
|
|
|
|
{ 0x023a, "LANtern" },
|
|
|
|
{ 0x023c, "MAVERICK" },
|
|
|
|
{ 0x023f, "SMS Testing and Development" },
|
|
|
|
{ 0x024e, "NetWare Connect" },
|
|
|
|
{ 0x024f, "NASI server broadcast (Cisco)" },
|
|
|
|
{ 0x026a, "Network Management (NMS) Service Console" },
|
|
|
|
{ 0x026b, "Time Synchronization Server (NetWare 4.x)" },
|
|
|
|
{ 0x0278, "Directory Server (NetWare 4.x)" },
|
|
|
|
{ 0x027b, "NetWare Management Agent" },
|
|
|
|
{ 0x0280, "Novell File and Printer Sharing Service for PC" },
|
|
|
|
{ 0x0304, "Novell SAA Gateway" },
|
|
|
|
{ 0x0308, "COM or VERMED 1" },
|
|
|
|
{ 0x030a, "Galacticomm's Worldgroup Server" },
|
|
|
|
{ 0x030c, "Intel Netport 2 or HP JetDirect or HP Quicksilver" },
|
|
|
|
{ 0x0320, "Attachmate Gateway" },
|
|
|
|
{ 0x0327, "Microsoft Diagnostics" },
|
|
|
|
{ 0x0328, "WATCOM SQL server" },
|
|
|
|
{ 0x0335, "MultiTech Systems Multisynch Comm Server" },
|
|
|
|
{ 0x0343, "Xylogics Remote Access Server or LAN Modem" },
|
|
|
|
{ 0x0355, "Arcada Backup Exec" },
|
|
|
|
{ 0x0358, "MSLCD1" },
|
|
|
|
{ 0x0361, "NETINELO" },
|
|
|
|
{ 0x037e, "Powerchute UPS Monitoring" },
|
|
|
|
{ 0x037f, "ViruSafe Notify" },
|
|
|
|
{ 0x0386, "HP Bridge" },
|
|
|
|
{ 0x0387, "HP Hub" },
|
|
|
|
{ 0x0394, "NetWare SAA Gateway" },
|
|
|
|
{ 0x039b, "Lotus Notes" },
|
|
|
|
{ 0x03b7, "Certus Anti Virus NLM" },
|
|
|
|
{ 0x03c4, "ARCserve 4.0 (Cheyenne)" },
|
|
|
|
{ 0x03c7, "LANspool 3.5 (Intel)" },
|
|
|
|
{ 0x03d7, "Lexmark printer server (type 4033-011)" },
|
|
|
|
{ 0x03d8, "Lexmark XLE printer server (type 4033-301)" },
|
|
|
|
{ 0x03dd, "Banyan ENS for NetWare Client NLM" },
|
|
|
|
{ 0x03de, "Gupta Sequel Base Server or NetWare SQL" },
|
|
|
|
{ 0x03e1, "Univel Unixware" },
|
|
|
|
{ 0x03e4, "Univel Unixware" },
|
|
|
|
{ 0x03fc, "Intel Netport" },
|
|
|
|
{ 0x03fd, "Intel Print Server Queue" },
|
|
|
|
{ 0x040A, "ipnServer" },
|
|
|
|
{ 0x040D, "LVERRMAN" },
|
|
|
|
{ 0x040E, "LVLIC" },
|
|
|
|
{ 0x0414, "NET Silicon (DPI)/Kyocera" },
|
|
|
|
{ 0x0429, "Site Lock Virus (Brightworks)" },
|
|
|
|
{ 0x0432, "UFHELP R" },
|
|
|
|
{ 0x0433, "Synoptics 281x Advanced SNMP Agent" },
|
|
|
|
{ 0x0444, "Microsoft NT SNA Server" },
|
|
|
|
{ 0x0448, "Oracle" },
|
|
|
|
{ 0x044c, "ARCserve 5.01" },
|
|
|
|
{ 0x0457, "Canon GP55 Running on a Canon GP55 network printer" },
|
|
|
|
{ 0x045a, "QMS Printers" },
|
|
|
|
{ 0x045b, "Dell SCSI Array (DSA) Monitor" },
|
|
|
|
{ 0x0491, "NetBlazer Modems" },
|
|
|
|
{ 0x04ac, "On-Time Scheduler NLM" },
|
|
|
|
{ 0x04b0, "CD-Net (Meridian)" },
|
|
|
|
{ 0x0513, "Emulex NQA" },
|
|
|
|
{ 0x0520, "Site Lock Checks" },
|
|
|
|
{ 0x0529, "Site Lock Checks (Brightworks)" },
|
|
|
|
{ 0x052d, "Citrix OS/2 App Server" },
|
|
|
|
{ 0x0535, "Tektronix" },
|
|
|
|
{ 0x0536, "Milan" },
|
|
|
|
{ 0x055d, "Attachmate SNA gateway" },
|
|
|
|
{ 0x056b, "IBM 8235 modem server" },
|
|
|
|
{ 0x056c, "Shiva LanRover/E PLUS" },
|
|
|
|
{ 0x056d, "Shiva LanRover/T PLUS" },
|
|
|
|
{ 0x0580, "McAfee's NetShield anti-virus" },
|
|
|
|
{ 0x05B8, "NLM to workstation communication (Revelation Software)" },
|
|
|
|
{ 0x05BA, "Compatible Systems Routers" },
|
|
|
|
{ 0x05BE, "Cheyenne Hierarchical Storage Manager" },
|
|
|
|
{ 0x0606, "JCWatermark Imaging" },
|
|
|
|
{ 0x060c, "AXIS Network Printer" },
|
|
|
|
{ 0x0610, "Adaptec SCSI Management" },
|
|
|
|
{ 0x0621, "IBM AntiVirus NLM" },
|
|
|
|
{ 0x0640, "Microsoft Gateway Services for NetWare" },
|
|
|
|
/* { 0x0640, "NT Server-RPC/GW for NW/Win95 User Level Sec" }, */
|
|
|
|
{ 0x064e, "Microsoft Internet Information Server" },
|
|
|
|
{ 0x067b, "Microsoft Win95/98 File and Print Sharing for NetWare" },
|
|
|
|
{ 0x067c, "Microsoft Win95/98 File and Print Sharing for NetWare" },
|
|
|
|
{ 0x076C, "Xerox" },
|
|
|
|
{ 0x079b, "Shiva LanRover/E 115" },
|
|
|
|
{ 0x079c, "Shiva LanRover/T 115" },
|
|
|
|
{ 0x07B4, "Cubix WorldDesk" },
|
|
|
|
{ 0x07c2, "Quarterdeck IWare Connect V2.x NLM" },
|
|
|
|
{ 0x07c1, "Quarterdeck IWare Connect V3.x NLM" },
|
|
|
|
{ 0x0810, "ELAN License Server Demo" },
|
|
|
|
{ 0x0824, "Shiva LanRover Access Switch/E" },
|
|
|
|
{ 0x086a, "ISSC collector NLMs" },
|
|
|
|
{ 0x087f, "ISSC DAS agent for AIX" },
|
|
|
|
{ 0x0880, "Intel Netport PRO" },
|
|
|
|
{ 0x0881, "Intel Netport PRO" },
|
|
|
|
{ 0x0b29, "Site Lock" },
|
|
|
|
{ 0x0c29, "Site Lock Applications" },
|
|
|
|
{ 0x0c2c, "Licensing Server" },
|
|
|
|
{ 0x2101, "Performance Technology Instant Internet" },
|
|
|
|
{ 0x2380, "LAI Site Lock" },
|
|
|
|
{ 0x238c, "Meeting Maker" },
|
|
|
|
{ 0x4808, "Site Lock Server or Site Lock Metering VAP/NLM" },
|
|
|
|
{ 0x5555, "Site Lock User" },
|
|
|
|
{ 0x6312, "Tapeware" },
|
|
|
|
{ 0x6f00, "Rabbit Gateway (3270)" },
|
|
|
|
{ 0x7703, "MODEM" },
|
|
|
|
{ 0x8002, "NetPort Printers (Intel) or LANport" },
|
|
|
|
{ 0x8003, "SEH InterCon Printserver" },
|
|
|
|
{ 0x8008, "WordPerfect Network Version" },
|
|
|
|
{ 0x85BE, "Cisco Enhanced Interior Routing Protocol (EIGRP)" },
|
|
|
|
{ 0x8888, "WordPerfect Network Version or Quick Network Management" },
|
|
|
|
{ 0x9000, "McAfee's NetShield anti-virus" },
|
|
|
|
{ 0x9604, "CSA-NT_MON" },
|
|
|
|
{ 0xb6a8, "Ocean Isle Reachout Remote Control" },
|
|
|
|
{ 0xf11f, "Site Lock Metering VAP/NLM" },
|
|
|
|
{ 0xf1ff, "Site Lock" },
|
|
|
|
{ 0xf503, "Microsoft SQL Server" },
|
|
|
|
{ 0xf905, "IBM Time and Place/2 application" },
|
|
|
|
{ 0xfbfb, "TopCall III fax server" },
|
|
|
|
{ 0xffff, "Any Service or Wildcard" },
|
|
|
|
{ 0x0000, NULL }
|
|
|
|
};
|
1998-09-24 04:22:08 +00:00
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
static void
|
|
|
|
dissect_ipxsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
1999-03-23 03:14:46 +00:00
|
|
|
proto_tree *sap_tree, *s_tree;
|
2008-05-14 01:47:41 +00:00
|
|
|
proto_item *ti, *hidden_item;
|
Have the IPX code set "pi.len" and "pi.captured_len" based on the length
in the IPX header, and have the dissectors it calls use it rather than
being passed the length as an argument.
Treat both packet type 20 ("WAN Broadcast") and 4 ("IPX", although 3 is
also "IPX", according to Network Monitor) as potentially being NetBIOS
packets.
The packet types for the IPX NetBIOS socket (0x0455) and the NWLink
sockets (0x0551 and 0x0553) are different (perhaps because there's one
socket for the 0x0455 NBIPX, so you have to do name service and datagram
service and have the packet types distinguish them, but NWLink has
separate sockets for name service and datagram service).
The packet type for name service and for datagram service are at
*different locations* in the packet, which is unfortunate if you want to
use the packet type to distinguish name service and datagram service
packets. Use the packet length, for now, to distinguish them, with
socket 0x0455.
Dissect datagram packets differently from name service packets.
Export "packet-netbios.c"'s "netbios_add_name()" routine, and use it
when dissecting NBIPX packets as well.
Label NBIPX packets as "NBIPX" rather than "NetBIOS".
svn path=/trunk/; revision=627
1999-09-02 23:17:58 +00:00
|
|
|
int cursor;
|
1998-09-24 04:22:08 +00:00
|
|
|
struct sap_query query;
|
2003-01-30 05:21:34 +00:00
|
|
|
guint16 server_type;
|
2008-07-24 16:46:09 +00:00
|
|
|
gchar *server_name;
|
2003-01-30 05:21:34 +00:00
|
|
|
guint16 server_port;
|
|
|
|
guint16 intermediate_network;
|
1998-09-24 04:22:08 +00:00
|
|
|
|
2005-07-30 16:34:38 +00:00
|
|
|
static const char *sap_type[4] = { "General Query", "General Response",
|
1998-09-24 04:22:08 +00:00
|
|
|
"Nearest Query", "Nearest Response" };
|
|
|
|
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPX SAP");
|
2009-08-09 07:36:13 +00:00
|
|
|
col_clear(pinfo->cinfo, COL_INFO);
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
|
|
|
|
query.query_type = tvb_get_ntohs(tvb, 0);
|
|
|
|
query.server_type = tvb_get_ntohs(tvb, 2);
|
1998-09-24 04:22:08 +00:00
|
|
|
|
2001-12-10 00:26:21 +00:00
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)) {
|
1999-09-15 22:33:17 +00:00
|
|
|
if (query.query_type >= 1 && query.query_type <= 4) {
|
2002-01-21 23:35:32 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, sap_type[query.query_type - 1]);
|
1998-09-24 04:22:08 +00:00
|
|
|
}
|
|
|
|
else {
|
2001-12-10 00:26:21 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "Unknown Packet Type");
|
1998-09-24 04:22:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tree) {
|
2002-01-24 09:20:54 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_sap, tvb, 0, -1, FALSE);
|
1999-11-16 11:44:20 +00:00
|
|
|
sap_tree = proto_item_add_subtree(ti, ett_ipxsap);
|
1998-09-24 04:22:08 +00:00
|
|
|
|
1999-09-15 22:33:17 +00:00
|
|
|
if (query.query_type >= 1 && query.query_type <= 4) {
|
2008-10-31 15:11:57 +00:00
|
|
|
proto_tree_add_text(sap_tree, tvb, 0, 2, "%s", sap_type[query.query_type - 1]);
|
1999-10-17 09:23:43 +00:00
|
|
|
if ((query.query_type - 1) % 2) {
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_boolean(sap_tree,
|
2002-08-28 21:04:11 +00:00
|
|
|
hf_sap_response,
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
tvb, 0, 2, 1);
|
1999-10-17 09:23:43 +00:00
|
|
|
} else {
|
2008-05-14 01:47:41 +00:00
|
|
|
hidden_item = proto_tree_add_boolean(sap_tree,
|
2002-08-28 21:04:11 +00:00
|
|
|
hf_sap_request,
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
tvb, 0, 2, 1);
|
1999-10-17 09:23:43 +00:00
|
|
|
}
|
2008-05-14 01:47:41 +00:00
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
1998-09-24 04:22:08 +00:00
|
|
|
}
|
|
|
|
else {
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_text(sap_tree, tvb, 0, 2,
|
1998-09-24 04:22:08 +00:00
|
|
|
"Unknown SAP Packet Type %d", query.query_type);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (query.query_type == IPX_SAP_GENERAL_RESPONSE ||
|
|
|
|
query.query_type == IPX_SAP_NEAREST_RESPONSE) { /* responses */
|
|
|
|
|
2002-01-24 09:20:54 +00:00
|
|
|
int available_length = tvb_reported_length(tvb);
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
for (cursor = 2; (cursor + 64) <= available_length; cursor += 64) {
|
2003-01-30 05:21:34 +00:00
|
|
|
server_type = tvb_get_ntohs(tvb, cursor);
|
2008-07-24 16:46:09 +00:00
|
|
|
server_name = tvb_format_stringzpad(tvb, cursor+2, 48);
|
1998-09-24 04:22:08 +00:00
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
ti = proto_tree_add_text(sap_tree, tvb, cursor+2, 48,
|
2008-07-24 16:46:09 +00:00
|
|
|
"Server Name: %s", server_name);
|
1999-11-16 11:44:20 +00:00
|
|
|
s_tree = proto_item_add_subtree(ti, ett_ipxsap_server);
|
1998-09-24 04:22:08 +00:00
|
|
|
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_text(s_tree, tvb, cursor, 2, "Server Type: %s (0x%04X)",
|
2003-01-30 05:21:34 +00:00
|
|
|
val_to_str(server_type, server_vals, "Unknown"),
|
|
|
|
server_type);
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_text(s_tree, tvb, cursor+50, 4, "Network: %s",
|
2002-12-02 23:43:30 +00:00
|
|
|
ipxnet_to_string(tvb_get_ptr(tvb, cursor+50, 4)));
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_text(s_tree, tvb, cursor+54, 6, "Node: %s",
|
2002-12-02 23:43:30 +00:00
|
|
|
ether_to_str(tvb_get_ptr(tvb, cursor+54, 6)));
|
2003-01-30 05:21:34 +00:00
|
|
|
server_port = tvb_get_ntohs(tvb, cursor+60);
|
2001-10-20 18:10:39 +00:00
|
|
|
proto_tree_add_text(s_tree, tvb, cursor+60, 2, "Socket: %s (0x%04x)",
|
2003-01-30 05:21:34 +00:00
|
|
|
socket_text(server_port),
|
|
|
|
server_port);
|
|
|
|
intermediate_network = tvb_get_ntohs(tvb, cursor+62);
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_text(s_tree, tvb, cursor+62, 2,
|
1998-09-27 22:12:47 +00:00
|
|
|
"Intermediate Networks: %d",
|
2003-01-30 05:21:34 +00:00
|
|
|
intermediate_network);
|
1998-09-24 04:22:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else { /* queries */
|
Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.
In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.
So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().
I converted the lines that followed my suggestion to use
tvb_create_from_top().
In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.
svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
|
|
|
proto_tree_add_text(sap_tree, tvb, 2, 2, "Server Type: %s (0x%04X)",
|
2003-01-30 05:21:34 +00:00
|
|
|
val_to_str(query.server_type, server_vals, "Unknown"),
|
|
|
|
query.server_type);
|
1998-09-24 04:22:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-07-17 04:19:15 +00:00
|
|
|
void
|
|
|
|
proto_register_ipx(void)
|
|
|
|
{
|
1999-07-20 02:56:44 +00:00
|
|
|
static hf_register_info hf_ipx[] = {
|
|
|
|
{ &hf_ipx_checksum,
|
1999-10-12 06:21:15 +00:00
|
|
|
{ "Checksum", "ipx.checksum", FT_UINT16, BASE_HEX, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-07-20 02:56:44 +00:00
|
|
|
|
2003-10-03 09:09:35 +00:00
|
|
|
{ &hf_ipx_src,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Source Address", "ipx.src", FT_STRING, BASE_NONE, NULL, 0x0,
|
2003-10-03 09:09:35 +00:00
|
|
|
"Source IPX Address \"network.node\"", HFILL }},
|
|
|
|
|
|
|
|
{ &hf_ipx_dst,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Destination Address", "ipx.dst", FT_STRING, BASE_NONE, NULL, 0x0,
|
2003-10-03 09:09:35 +00:00
|
|
|
"Destination IPX Address \"network.node\"", HFILL }},
|
|
|
|
{ &hf_ipx_addr,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Src/Dst Address", "ipx.addr", FT_STRING, BASE_NONE, NULL, 0x0,
|
2003-10-03 09:09:35 +00:00
|
|
|
"Source or Destination IPX Address \"network.node\"", HFILL }},
|
|
|
|
|
1999-07-20 02:56:44 +00:00
|
|
|
{ &hf_ipx_len,
|
1999-10-12 06:21:15 +00:00
|
|
|
{ "Length", "ipx.len", FT_UINT16, BASE_DEC, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-07-20 02:56:44 +00:00
|
|
|
|
|
|
|
{ &hf_ipx_hops,
|
1999-10-12 06:21:15 +00:00
|
|
|
{ "Transport Control (Hops)", "ipx.hops", FT_UINT8, BASE_DEC, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-07-20 02:56:44 +00:00
|
|
|
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
{ &hf_ipx_packet_type,
|
1999-10-12 06:21:15 +00:00
|
|
|
{ "Packet Type", "ipx.packet_type", FT_UINT8, BASE_HEX, VALS(ipx_packet_type_vals),
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
|
|
|
|
{ &hf_ipx_dnet,
|
1999-10-12 06:21:15 +00:00
|
|
|
{ "Destination Network","ipx.dst.net", FT_IPXNET, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
|
1999-07-20 02:56:44 +00:00
|
|
|
{ &hf_ipx_dnode,
|
1999-10-12 06:21:15 +00:00
|
|
|
{ "Destination Node", "ipx.dst.node", FT_ETHER, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-07-20 02:56:44 +00:00
|
|
|
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
{ &hf_ipx_dsocket,
|
2001-10-20 18:10:39 +00:00
|
|
|
{ "Destination Socket", "ipx.dst.socket", FT_UINT16, BASE_HEX,
|
|
|
|
VALS(ipx_socket_vals), 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
|
|
|
|
{ &hf_ipx_snet,
|
1999-10-12 06:21:15 +00:00
|
|
|
{ "Source Network","ipx.src.net", FT_IPXNET, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
|
1999-07-20 02:56:44 +00:00
|
|
|
{ &hf_ipx_snode,
|
1999-10-12 06:21:15 +00:00
|
|
|
{ "Source Node", "ipx.src.node", FT_ETHER, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
|
|
|
|
|
|
|
{ &hf_ipx_ssocket,
|
2001-10-20 18:10:39 +00:00
|
|
|
{ "Source Socket", "ipx.src.socket", FT_UINT16, BASE_HEX,
|
|
|
|
VALS(ipx_socket_vals), 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2003-08-04 23:55:39 +00:00
|
|
|
|
|
|
|
{ &hf_ipx_net,
|
|
|
|
{ "Source or Destination Network","ipx.net", FT_IPXNET, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2003-08-04 23:55:39 +00:00
|
|
|
|
|
|
|
{ &hf_ipx_node,
|
|
|
|
{ "Source or Destination Node", "ipx.node", FT_ETHER, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2008-07-24 16:46:09 +00:00
|
|
|
|
2003-08-04 23:55:39 +00:00
|
|
|
{ &hf_ipx_socket,
|
|
|
|
{ "Source or Destination Socket", "ipx.socket", FT_UINT16, BASE_HEX,
|
|
|
|
VALS(ipx_socket_vals), 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-07-20 02:56:44 +00:00
|
|
|
};
|
1999-10-17 09:23:43 +00:00
|
|
|
|
|
|
|
static hf_register_info hf_spx[] = {
|
|
|
|
{ &hf_spx_connection_control,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Connection Control", "spx.ctl",
|
1999-10-17 09:23:43 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-10-17 09:23:43 +00:00
|
|
|
|
2003-04-09 22:33:19 +00:00
|
|
|
{ &hf_spx_connection_control_sys,
|
|
|
|
{ "System Packet", "spx.ctl.sys",
|
|
|
|
FT_BOOLEAN, 8, NULL, SPX_SYS_PACKET,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2003-04-09 22:33:19 +00:00
|
|
|
|
|
|
|
{ &hf_spx_connection_control_send_ack,
|
|
|
|
{ "Send Ack", "spx.ctl.send_ack",
|
|
|
|
FT_BOOLEAN, 8, NULL, SPX_SEND_ACK,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2003-04-09 22:33:19 +00:00
|
|
|
|
|
|
|
{ &hf_spx_connection_control_attn,
|
|
|
|
{ "Attention", "spx.ctl.attn",
|
|
|
|
FT_BOOLEAN, 8, NULL, SPX_ATTN,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2003-04-09 22:33:19 +00:00
|
|
|
|
|
|
|
{ &hf_spx_connection_control_eom,
|
|
|
|
{ "End of Message", "spx.ctl.eom",
|
|
|
|
FT_BOOLEAN, 8, NULL, SPX_EOM,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2003-04-09 22:33:19 +00:00
|
|
|
|
1999-10-17 09:23:43 +00:00
|
|
|
{ &hf_spx_datastream_type,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Datastream type", "spx.type",
|
1999-10-17 09:23:43 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-10-17 09:23:43 +00:00
|
|
|
|
|
|
|
{ &hf_spx_src_id,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Source Connection ID", "spx.src",
|
1999-10-17 09:23:43 +00:00
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-10-17 09:23:43 +00:00
|
|
|
|
|
|
|
{ &hf_spx_dst_id,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Destination Connection ID", "spx.dst",
|
1999-10-17 09:23:43 +00:00
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-10-17 09:23:43 +00:00
|
|
|
|
|
|
|
{ &hf_spx_seq_nr,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Sequence Number", "spx.seq",
|
1999-10-17 09:23:43 +00:00
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-10-17 09:23:43 +00:00
|
|
|
|
|
|
|
{ &hf_spx_ack_nr,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Acknowledgment Number", "spx.ack",
|
1999-10-17 09:23:43 +00:00
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-10-17 09:23:43 +00:00
|
|
|
|
|
|
|
{ &hf_spx_all_nr,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Allocation Number", "spx.alloc",
|
1999-10-17 09:23:43 +00:00
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2003-04-09 22:33:19 +00:00
|
|
|
|
|
|
|
{ &hf_spx_rexmt_frame,
|
|
|
|
{ "Retransmitted Frame Number", "spx.rexmt_frame",
|
|
|
|
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2003-04-09 22:33:19 +00:00
|
|
|
};
|
1999-10-17 09:23:43 +00:00
|
|
|
|
|
|
|
static hf_register_info hf_ipxrip[] = {
|
|
|
|
{ &hf_ipxrip_request,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Request", "ipxrip.request",
|
1999-10-17 09:23:43 +00:00
|
|
|
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"TRUE if IPX RIP request", HFILL }},
|
1999-10-17 09:23:43 +00:00
|
|
|
|
|
|
|
{ &hf_ipxrip_response,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Response", "ipxrip.response",
|
1999-10-17 09:23:43 +00:00
|
|
|
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"TRUE if IPX RIP response", HFILL }}
|
1999-10-17 09:23:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static hf_register_info hf_sap[] = {
|
|
|
|
{ &hf_sap_request,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Request", "ipxsap.request",
|
1999-10-17 09:23:43 +00:00
|
|
|
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"TRUE if SAP request", HFILL }},
|
1999-10-17 09:23:43 +00:00
|
|
|
|
|
|
|
{ &hf_sap_response,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Response", "ipxsap.response",
|
1999-10-17 09:23:43 +00:00
|
|
|
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"TRUE if SAP response", HFILL }}
|
1999-10-17 09:23:43 +00:00
|
|
|
};
|
1999-12-08 21:59:12 +00:00
|
|
|
|
|
|
|
static hf_register_info hf_ipxmsg[] = {
|
|
|
|
{ &hf_msg_conn,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Connection Number", "ipxmsg.conn",
|
2001-04-19 23:02:44 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
1999-12-08 21:59:12 +00:00
|
|
|
|
|
|
|
{ &hf_msg_sigchar,
|
2002-08-28 21:04:11 +00:00
|
|
|
{ "Signature Char", "ipxmsg.sigchar",
|
2001-04-19 23:02:44 +00:00
|
|
|
FT_UINT8, BASE_DEC, VALS(ipxmsg_sigchar_vals), 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }}
|
1999-12-08 21:59:12 +00:00
|
|
|
};
|
|
|
|
|
1999-11-16 11:44:20 +00:00
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_ipx,
|
|
|
|
&ett_spx,
|
2003-04-09 22:33:19 +00:00
|
|
|
&ett_spx_connctrl,
|
1999-12-08 21:59:12 +00:00
|
|
|
&ett_ipxmsg,
|
1999-11-16 11:44:20 +00:00
|
|
|
&ett_ipxrip,
|
2003-12-29 19:04:05 +00:00
|
|
|
&ett_serialization,
|
1999-11-16 11:44:20 +00:00
|
|
|
&ett_ipxsap,
|
|
|
|
&ett_ipxsap_server,
|
|
|
|
};
|
|
|
|
|
2001-01-03 06:56:03 +00:00
|
|
|
proto_ipx = proto_register_protocol("Internetwork Packet eXchange",
|
|
|
|
"IPX", "ipx");
|
1999-07-20 02:56:44 +00:00
|
|
|
proto_register_field_array(proto_ipx, hf_ipx, array_length(hf_ipx));
|
1999-07-17 04:19:15 +00:00
|
|
|
|
2001-01-09 09:59:28 +00:00
|
|
|
register_dissector("ipx", dissect_ipx, proto_ipx);
|
|
|
|
|
2001-01-03 06:56:03 +00:00
|
|
|
proto_spx = proto_register_protocol("Sequenced Packet eXchange",
|
|
|
|
"SPX", "spx");
|
1999-10-17 09:23:43 +00:00
|
|
|
proto_register_field_array(proto_spx, hf_spx, array_length(hf_spx));
|
|
|
|
|
2001-01-03 06:56:03 +00:00
|
|
|
proto_ipxrip = proto_register_protocol("IPX Routing Information Protocol",
|
|
|
|
"IPX RIP", "ipxrip");
|
1999-10-17 09:23:43 +00:00
|
|
|
proto_register_field_array(proto_ipxrip, hf_ipxrip, array_length(hf_ipxrip));
|
1999-07-17 04:19:15 +00:00
|
|
|
|
2003-12-29 19:04:05 +00:00
|
|
|
proto_serialization = proto_register_protocol("NetWare Serialization Protocol",
|
|
|
|
"NW_SERIAL", "nw_serial");
|
|
|
|
|
2001-01-03 06:56:03 +00:00
|
|
|
proto_ipxmsg = proto_register_protocol("IPX Message", "IPX MSG",
|
|
|
|
"ipxmsg");
|
1999-12-08 21:59:12 +00:00
|
|
|
proto_register_field_array(proto_ipxmsg, hf_ipxmsg, array_length(hf_ipxmsg));
|
|
|
|
|
2001-01-03 06:56:03 +00:00
|
|
|
proto_sap = proto_register_protocol("Service Advertisement Protocol",
|
|
|
|
"IPX SAP", "ipxsap");
|
2001-05-03 22:50:33 +00:00
|
|
|
register_dissector("ipxsap", dissect_ipxsap, proto_sap);
|
|
|
|
|
1999-10-17 09:23:43 +00:00
|
|
|
proto_register_field_array(proto_sap, hf_sap, array_length(hf_sap));
|
1999-11-16 11:44:20 +00:00
|
|
|
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2000-05-30 03:35:55 +00:00
|
|
|
|
2001-12-08 06:41:48 +00:00
|
|
|
ipx_type_dissector_table = register_dissector_table("ipx.packet_type",
|
|
|
|
"IPX packet type", FT_UINT8, BASE_HEX);
|
|
|
|
ipx_socket_dissector_table = register_dissector_table("ipx.socket",
|
|
|
|
"IPX socket", FT_UINT16, BASE_HEX);
|
Add a new port type, PT_IPX, for IPX socket numbers; set "pinfo->ptype",
"pinfo->srcport", and "pinfo->destport" appropriately in the IPX
dissector. Add support for PT_IPX port types in display columns.
Have an "spx.socket" dissector table, similar to the "ipx.socket"
dissector table, and have the SPX dissector use that, with the IPX
socket numbers from "pinfo->srcport" and "pinfo->destport", so that
dissectors for protocols that run atop SPX can register with particular
socket numbers. (Think of it as similar to what would have been the
case had the IP header had 16-bit source and destination port numbers,
and had TCP and UDP used those port numbers rather than having port
numbers in their headers.) Also, have the SPX dissector dissect
subprotocols regardless of whether we're building a protocol tree or not.
Use the dissector handle for the IPX message dissector for both IPX
socket numbers; there's no need to create separate handles for both
registrations.
Have NDPS register as a subdissector of the SPX dissector, using
"spx.socket", and get rid of the duplicate SPX dissection in the NDPS
dissector.
Make the NDPS dissector set the columns regardless of whether a protocol
tree is being built, and clean up the dissector (fixing some bugs).
Get rid of unneeded includes in "packet-ndps.c".
svn path=/trunk/; revision=6424
2002-10-15 04:31:00 +00:00
|
|
|
spx_socket_dissector_table = register_dissector_table("spx.socket",
|
|
|
|
"SPX socket", FT_UINT16, BASE_HEX);
|
2008-07-24 16:46:09 +00:00
|
|
|
|
2003-04-08 00:39:27 +00:00
|
|
|
register_init_routine(&spx_init_protocol);
|
|
|
|
register_postseq_cleanup_routine(&spx_postseq_cleanup);
|
2003-08-24 05:17:51 +00:00
|
|
|
ipx_tap=register_tap("ipx");
|
1999-07-17 04:19:15 +00:00
|
|
|
}
|
2000-04-08 07:07:42 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_ipx(void)
|
|
|
|
{
|
2001-12-03 04:00:26 +00:00
|
|
|
dissector_handle_t ipx_handle, spx_handle;
|
|
|
|
dissector_handle_t ipxsap_handle, ipxrip_handle;
|
2003-12-29 19:04:05 +00:00
|
|
|
dissector_handle_t serialization_handle, ipxmsg_handle;
|
2001-12-03 04:00:26 +00:00
|
|
|
|
|
|
|
ipx_handle = find_dissector("ipx");
|
|
|
|
dissector_add("udp.port", UDP_PORT_IPX, ipx_handle);
|
|
|
|
dissector_add("ethertype", ETHERTYPE_IPX, ipx_handle);
|
|
|
|
dissector_add("chdlctype", ETHERTYPE_IPX, ipx_handle);
|
|
|
|
dissector_add("ppp.protocol", PPP_IPX, ipx_handle);
|
2003-06-10 05:38:52 +00:00
|
|
|
dissector_add("llc.dsap", SAP_NETWARE1, ipx_handle);
|
|
|
|
dissector_add("llc.dsap", SAP_NETWARE2, ipx_handle);
|
2001-12-03 04:00:26 +00:00
|
|
|
dissector_add("null.type", BSD_AF_IPX, ipx_handle);
|
|
|
|
dissector_add("gre.proto", ETHERTYPE_IPX, ipx_handle);
|
2003-04-08 00:39:27 +00:00
|
|
|
dissector_add("arcnet.protocol_id", ARCNET_PROTO_IPX, ipx_handle);
|
|
|
|
dissector_add("arcnet.protocol_id", ARCNET_PROTO_NOVELL_EC, ipx_handle);
|
2002-10-18 21:00:01 +00:00
|
|
|
|
2001-12-03 04:00:26 +00:00
|
|
|
spx_handle = create_dissector_handle(dissect_spx, proto_spx);
|
|
|
|
dissector_add("ipx.packet_type", IPX_PACKET_TYPE_SPX, spx_handle);
|
2002-10-18 21:00:01 +00:00
|
|
|
|
2001-12-03 04:00:26 +00:00
|
|
|
ipxsap_handle = find_dissector("ipxsap");
|
|
|
|
dissector_add("ipx.socket", IPX_SOCKET_SAP, ipxsap_handle);
|
2002-10-18 21:00:01 +00:00
|
|
|
|
2001-12-03 04:00:26 +00:00
|
|
|
ipxrip_handle = create_dissector_handle(dissect_ipxrip, proto_ipxrip);
|
|
|
|
dissector_add("ipx.socket", IPX_SOCKET_IPXRIP, ipxrip_handle);
|
2002-10-18 21:00:01 +00:00
|
|
|
|
2003-12-29 19:04:05 +00:00
|
|
|
serialization_handle = create_dissector_handle(dissect_serialization,
|
|
|
|
proto_serialization);
|
|
|
|
dissector_add("ipx.socket", IPX_SOCKET_SERIALIZATION,
|
|
|
|
serialization_handle);
|
|
|
|
|
2001-12-03 04:00:26 +00:00
|
|
|
ipxmsg_handle = create_dissector_handle(dissect_ipxmsg, proto_ipxmsg);
|
|
|
|
dissector_add("ipx.socket", IPX_SOCKET_IPX_MESSAGE, ipxmsg_handle);
|
2002-09-10 23:47:07 +00:00
|
|
|
dissector_add("ipx.socket", IPX_SOCKET_IPX_MESSAGE1, ipxmsg_handle);
|
2002-10-18 21:00:01 +00:00
|
|
|
|
2001-11-25 22:51:14 +00:00
|
|
|
data_handle = find_dissector("data");
|
2000-04-08 07:07:42 +00:00
|
|
|
}
|