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