2 * Routines for NetWare's IPX
3 * Gilbert Ramirez <gram@xiexie.org>
5 * $Id: packet-ipx.h,v 1.11 2001/01/09 09:59:28 guy Exp $
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@zing.org>
9 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 * Copyright (C) 1995 by Volker Lendecke
34 #ifndef __PACKET_IPX_H__
35 #define __PACKET_IPX_H__
37 #define IPX_NODE_LEN 6
39 typedef guint32 IPXNet;
40 typedef guint16 IPXPort;
41 typedef guint8 IPXNode[IPX_NODE_LEN];
42 typedef const guint8 CIPXNode[IPX_NODE_LEN];
44 #define IPX_USER_PTYPE (0x00)
45 #define IPX_RIP_PTYPE (0x01)
46 #define IPX_SAP_PTYPE (0x04)
47 #define IPX_AUTO_PORT (0x0000)
48 #define IPX_SAP_PORT (0x0452)
49 #define IPX_RIP_PORT (0x0453)
51 #define IPX_SAP_GENERAL_QUERY (0x0001)
52 #define IPX_SAP_GENERAL_RESPONSE (0x0002)
53 #define IPX_SAP_NEAREST_QUERY (0x0003)
54 #define IPX_SAP_NEAREST_RESPONSE (0x0004)
56 #define IPX_SAP_FILE_SERVER (0x0004)
60 guint16 query_type; /* net order */
61 guint16 server_type; /* net order */
64 struct sap_server_ident
67 char server_name[48] ;
68 IPXNet server_network ;
71 guint16 intermediate_network ;
74 #define IPX_RIP_REQUEST (0x1)
75 #define IPX_RIP_RESPONSE (0x2)
89 #define IPX_BROADCAST_NODE ("\xff\xff\xff\xff\xff\xff")
90 #define IPX_THIS_NODE ("\0\0\0\0\0\0")
91 #define IPX_THIS_NET (0)
94 #define IPX_NODE_LEN (6)
100 * http://alr.base2co.com:457/netguide/dipxD.ipx_packet_struct.html
102 * which is part of SCO's "Network Programmer's Guide and Reference".
104 * It calls type 20 "NetBIOS name packet". Microsoft Network Monitor
105 * calls it "WAN Broadcast"; it's also used for SMB browser announcements,
106 * i.e. NetBIOS (broadcast) datagrams.
108 #define IPX_PACKET_TYPE_IPX 0
109 #define IPX_PACKET_TYPE_RIP 1
110 #define IPX_PACKET_TYPE_ECHO 2
111 #define IPX_PACKET_TYPE_ERROR 3
112 #define IPX_PACKET_TYPE_PEP 4
113 #define IPX_PACKET_TYPE_SPX 5
114 #define IPX_PACKET_TYPE_NCP 17
115 #define IPX_PACKET_TYPE_WANBCAST 20 /* propagated NetBIOS packet? */
117 /* info on these sockets can be found in this listing from Novell:
119 http://developer.novell.com/engsup/sample/tids/dsoc1b/dsoc1b.htm
122 #define IPX_SOCKET_PING_CISCO 0x0002 /* In cisco this is set with: ipx ping-default cisco */
123 #define IPX_SOCKET_NCP 0x0451
124 #define IPX_SOCKET_SAP 0x0452
125 #define IPX_SOCKET_IPXRIP 0x0453
126 #define IPX_SOCKET_NETBIOS 0x0455
127 #define IPX_SOCKET_DIAGNOSTIC 0x0456
128 #define IPX_SOCKET_SERIALIZATION 0x0457
129 #define IPX_SOCKET_NWLINK_SMB_NAMEQUERY 0x0551
130 #define IPX_SOCKET_NWLINK_SMB_DGRAM 0x0553
131 #define IPX_SOCKET_NWLINK_SMB_BROWSE 0x0555 /* ? not sure on this
132 but I guessed based on the content of the packet I saw */
133 #define IPX_SOCKET_ATTACHMATE_GW 0x055d
134 #define IPX_SOCKET_IPX_MESSAGE 0x4001
135 #define IPX_SOCKET_ADSM 0x8522 /* www.tivoli.com */
136 #define IPX_SOCKET_EIGRP 0x85be /* cisco ipx eigrp */
137 #define IPX_SOCKET_WIDE_AREA_ROUTER 0x9001
138 #define IPX_SOCKET_SNMP_AGENT 0x900F /* RFC 1906 */
139 #define IPX_SOCKET_SNMP_SINK 0x9010 /* RFC 1906 */
140 #define IPX_SOCKET_PING_NOVELL 0x9086 /* In cisco this is set with: ipx ping-default novell */
141 #define IPX_SOCKET_TCP_TUNNEL 0x9091 /* RFC 1791 */
142 #define IPX_SOCKET_UDP_TUNNEL 0x9092 /* RFC 1791 */
144 gchar* ipxnet_to_string(const guint8 *ad);
145 gchar* ipxnet_to_str_punct(const guint32 ad, char punct);
147 void capture_ipx(const u_char *, int, packet_counts *);