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
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
19 * Copyright (C) 1995 by Volker Lendecke
23 #ifndef __PACKET_IPX_H__
24 #define __PACKET_IPX_H__
26 #define IPX_NODE_LEN 6
28 typedef uint32_t IPXNet
;
29 typedef uint16_t IPXPort
;
30 typedef uint8_t IPXNode
[IPX_NODE_LEN
];
31 typedef const uint8_t CIPXNode
[IPX_NODE_LEN
];
33 #define IPX_USER_PTYPE (0x00)
34 #define IPX_RIP_PTYPE (0x01)
35 #define IPX_SAP_PTYPE (0x04)
36 #define IPX_AUTO_PORT (0x0000)
37 #define IPX_SAP_PORT (0x0452)
38 #define IPX_RIP_PORT (0x0453)
40 #define IPX_SAP_GENERAL_QUERY (0x0001)
41 #define IPX_SAP_GENERAL_RESPONSE (0x0002)
42 #define IPX_SAP_NEAREST_QUERY (0x0003)
43 #define IPX_SAP_NEAREST_RESPONSE (0x0004)
45 #define IPX_SAP_FILE_SERVER (0x0004)
49 uint16_t query_type
; /* net order */
50 uint16_t server_type
; /* net order */
53 #define IPX_RIP_REQUEST (0x1)
54 #define IPX_RIP_RESPONSE (0x2)
56 typedef struct _ipx_rt_def
69 #define IPX_BROADCAST_NODE ("\xff\xff\xff\xff\xff\xff")
70 #define IPX_THIS_NODE ("\0\0\0\0\0\0")
71 #define IPX_THIS_NET (0)
74 #define IPX_NODE_LEN (6)
80 * http://alr.base2co.com:457/netguide/dipxD.ipx_packet_struct.html
82 * which is part of SCO's "Network Programmer's Guide and Reference".
84 * It calls type 20 "NetBIOS name packet". Microsoft Network Monitor
85 * calls it "WAN Broadcast"; it's also used for SMB browser announcements,
86 * i.e. NetBIOS (broadcast) datagrams.
88 #define IPX_PACKET_TYPE_IPX 0
89 #define IPX_PACKET_TYPE_RIP 1
90 #define IPX_PACKET_TYPE_ECHO 2
91 #define IPX_PACKET_TYPE_ERROR 3
92 #define IPX_PACKET_TYPE_PEP 4
93 #define IPX_PACKET_TYPE_SPX 5
94 #define IPX_PACKET_TYPE_NCP 17
95 #define IPX_PACKET_TYPE_WANBCAST 20 /* propagated NetBIOS packet? */
97 /* info on these sockets can be found in this listing from Novell:
99 http://developer.novell.com/engsup/sample/tids/dsoc1b/dsoc1b.htm
102 #define IPX_SOCKET_PING_CISCO 0x0002 /* In cisco this is set with: ipx ping-default cisco */
103 #define IPX_SOCKET_NCP 0x0451
104 #define IPX_SOCKET_SAP 0x0452
105 #define IPX_SOCKET_IPXRIP 0x0453
106 #define IPX_SOCKET_NETBIOS 0x0455
107 #define IPX_SOCKET_DIAGNOSTIC 0x0456
108 #define IPX_SOCKET_SERIALIZATION 0x0457
109 #define IPX_SOCKET_NWLINK_SMB_SERVER 0x0550
110 #define IPX_SOCKET_NWLINK_SMB_NAMEQUERY 0x0551
111 #define IPX_SOCKET_NWLINK_SMB_REDIR 0x0552
112 #define IPX_SOCKET_NWLINK_SMB_MAILSLOT 0x0553
113 #define IPX_SOCKET_NWLINK_SMB_MESSENGER 0x0554
114 #define IPX_SOCKET_NWLINK_SMB_BROWSE 0x0555 /* ? not sure on this
115 but I guessed based on the content of the packet I saw */
116 #define IPX_SOCKET_ATTACHMATE_GW 0x055d
117 #define IPX_SOCKET_IPX_MESSAGE 0x4001
118 #define IPX_SOCKET_IPX_MESSAGE1 0x4003
119 #define IPX_SOCKET_ADSM 0x8522 /* www.tivoli.com */
120 #define IPX_SOCKET_EIGRP 0x85be /* cisco ipx eigrp */
121 #define IPX_SOCKET_NLSP 0x9001 /* NetWare Link Services Protocol */
122 #define IPX_SOCKET_IPXWAN 0x9004 /* IPX WAN (RFC 1362, NLSP spec) */
123 #define IPX_SOCKET_SNMP_AGENT 0x900F /* RFC 1906 */
124 #define IPX_SOCKET_SNMP_SINK 0x9010 /* RFC 1906 */
125 #define IPX_SOCKET_PING_NOVELL 0x9086 /* In cisco this is set with: ipx ping-default novell */
126 #define IPX_SOCKET_TCP_TUNNEL 0x9091 /* RFC 1791 */
127 #define IPX_SOCKET_UDP_TUNNEL 0x9092 /* RFC 1791 */
128 #define SPX_SOCKET_PA 0x90b2 /* NDPS Printer Agent */
129 #define SPX_SOCKET_BROKER 0x90b3 /* NDPS Broker */
130 #define SPX_SOCKET_SRS 0x90b4 /* NDPS Service Registry Service */
131 #define SPX_SOCKET_ENS 0x90b5 /* NDPS Event Notification Service */
132 #define SPX_SOCKET_RMS 0x90b6 /* NDPS Remote Management Service */
133 #define SPX_SOCKET_NOTIFY_LISTENER 0x90b7 /* NDPS Notify Listener */
135 extern value_string_ext ipx_socket_vals_ext
;
136 extern value_string_ext novell_server_vals_ext
;
139 * Structure passed to SPX subdissectors, containing information from
140 * the SPX header that might be useful to the subdissector.
143 bool eom
; /* end-of-message flag in SPX header */
144 uint8_t datastream_type
; /* datastream type from SPX header */
149 /* handed off to tap listeners, expand it as is required by what any
150 tap listeners needs */
151 typedef struct _ipxhdr_t
153 uint16_t ipx_ssocket
;
154 uint16_t ipx_dsocket
;