2 * Routines for NetWare's IPX
3 * Gilbert Ramirez <gram@alumni.rice.edu>
4 * NDPS support and SPX Defragmentation added by Greg Morris (gmorris@novell.com)
6 * Portions Copyright (c) by Gilbert Ramirez 2000-2002
7 * Portions Copyright (c) Novell, Inc. 2002-2003
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
33 * Copyright (C) 1995 by Volker Lendecke
37 #ifndef __PACKET_IPX_H__
38 #define __PACKET_IPX_H__
40 #define IPX_NODE_LEN 6
42 typedef guint32 IPXNet
;
43 typedef guint16 IPXPort
;
44 typedef guint8 IPXNode
[IPX_NODE_LEN
];
45 typedef const guint8 CIPXNode
[IPX_NODE_LEN
];
47 #define IPX_USER_PTYPE (0x00)
48 #define IPX_RIP_PTYPE (0x01)
49 #define IPX_SAP_PTYPE (0x04)
50 #define IPX_AUTO_PORT (0x0000)
51 #define IPX_SAP_PORT (0x0452)
52 #define IPX_RIP_PORT (0x0453)
54 #define IPX_SAP_GENERAL_QUERY (0x0001)
55 #define IPX_SAP_GENERAL_RESPONSE (0x0002)
56 #define IPX_SAP_NEAREST_QUERY (0x0003)
57 #define IPX_SAP_NEAREST_RESPONSE (0x0004)
59 #define IPX_SAP_FILE_SERVER (0x0004)
63 guint16 query_type
; /* net order */
64 guint16 server_type
; /* net order */
67 #define IPX_RIP_REQUEST (0x1)
68 #define IPX_RIP_RESPONSE (0x2)
70 typedef struct _ipx_rt_def
83 #define IPX_BROADCAST_NODE ("\xff\xff\xff\xff\xff\xff")
84 #define IPX_THIS_NODE ("\0\0\0\0\0\0")
85 #define IPX_THIS_NET (0)
88 #define IPX_NODE_LEN (6)
94 * http://alr.base2co.com:457/netguide/dipxD.ipx_packet_struct.html
96 * which is part of SCO's "Network Programmer's Guide and Reference".
98 * It calls type 20 "NetBIOS name packet". Microsoft Network Monitor
99 * calls it "WAN Broadcast"; it's also used for SMB browser announcements,
100 * i.e. NetBIOS (broadcast) datagrams.
102 #define IPX_PACKET_TYPE_IPX 0
103 #define IPX_PACKET_TYPE_RIP 1
104 #define IPX_PACKET_TYPE_ECHO 2
105 #define IPX_PACKET_TYPE_ERROR 3
106 #define IPX_PACKET_TYPE_PEP 4
107 #define IPX_PACKET_TYPE_SPX 5
108 #define IPX_PACKET_TYPE_NCP 17
109 #define IPX_PACKET_TYPE_WANBCAST 20 /* propagated NetBIOS packet? */
111 /* info on these sockets can be found in this listing from Novell:
113 http://developer.novell.com/engsup/sample/tids/dsoc1b/dsoc1b.htm
116 #define IPX_SOCKET_PING_CISCO 0x0002 /* In cisco this is set with: ipx ping-default cisco */
117 #define IPX_SOCKET_NCP 0x0451
118 #define IPX_SOCKET_SAP 0x0452
119 #define IPX_SOCKET_IPXRIP 0x0453
120 #define IPX_SOCKET_NETBIOS 0x0455
121 #define IPX_SOCKET_DIAGNOSTIC 0x0456
122 #define IPX_SOCKET_SERIALIZATION 0x0457
123 #define IPX_SOCKET_NWLINK_SMB_SERVER 0x0550
124 #define IPX_SOCKET_NWLINK_SMB_NAMEQUERY 0x0551
125 #define IPX_SOCKET_NWLINK_SMB_REDIR 0x0552
126 #define IPX_SOCKET_NWLINK_SMB_MAILSLOT 0x0553
127 #define IPX_SOCKET_NWLINK_SMB_MESSENGER 0x0554
128 #define IPX_SOCKET_NWLINK_SMB_BROWSE 0x0555 /* ? not sure on this
129 but I guessed based on the content of the packet I saw */
130 #define IPX_SOCKET_ATTACHMATE_GW 0x055d
131 #define IPX_SOCKET_IPX_MESSAGE 0x4001
132 #define IPX_SOCKET_IPX_MESSAGE1 0x4003
133 #define IPX_SOCKET_ADSM 0x8522 /* www.tivoli.com */
134 #define IPX_SOCKET_EIGRP 0x85be /* cisco ipx eigrp */
135 #define IPX_SOCKET_NLSP 0x9001 /* NetWare Link Services Protocol */
136 #define IPX_SOCKET_IPXWAN 0x9004 /* IPX WAN (RFC 1362, NLSP spec) */
137 #define IPX_SOCKET_SNMP_AGENT 0x900F /* RFC 1906 */
138 #define IPX_SOCKET_SNMP_SINK 0x9010 /* RFC 1906 */
139 #define IPX_SOCKET_PING_NOVELL 0x9086 /* In cisco this is set with: ipx ping-default novell */
140 #define IPX_SOCKET_TCP_TUNNEL 0x9091 /* RFC 1791 */
141 #define IPX_SOCKET_UDP_TUNNEL 0x9092 /* RFC 1791 */
142 #define SPX_SOCKET_PA 0x90b2 /* NDPS Printer Agent */
143 #define SPX_SOCKET_BROKER 0x90b3 /* NDPS Broker */
144 #define SPX_SOCKET_SRS 0x90b4 /* NDPS Service Registry Service */
145 #define SPX_SOCKET_ENS 0x90b5 /* NDPS Event Notification Service */
146 #define SPX_SOCKET_RMS 0x90b6 /* NDPS Remote Management Service */
147 #define SPX_SOCKET_NOTIFY_LISTENER 0x90b7 /* NDPS Notify Listener */
149 extern value_string_ext ipx_socket_vals_ext
;
150 extern value_string_ext novell_server_vals_ext
;
152 void capture_ipx(packet_counts
*);
155 * Structure passed to SPX subdissectors, containing information from
156 * the SPX header that might be useful to the subdissector.
159 gboolean eom
; /* end-of-message flag in SPX header */
160 guint8 datastream_type
; /* datastream type from SPX header */
165 /* handed off to tap listeners, expand it as is required by what any
166 tap listeners needs */
167 typedef struct _ipxhdr_t