Put "WTP" into the Info column for segmented invoke/result PDUs on which
[obnox/wireshark/wip.git] / packet-ipx.h
1 /* packet-ipx.h
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)
5  *
6  * Portions Copyright (c) by Gilbert Ramirez 2000-2002
7  * Portions Copyright (c) Novell, Inc. 2002-2003
8  *
9  * $Id: packet-ipx.h,v 1.27 2003/04/09 22:33:19 guy Exp $
10  *
11  * Ethereal - Network traffic analyzer
12  * By Gerald Combs <gerald@ethereal.com>
13  * Copyright 1998 Gerald Combs
14  *
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.
19  *
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.
24  *
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
28  */
29
30 /*
31  *  ipxlib.h
32  *
33  *  Copyright (C) 1995 by Volker Lendecke
34  *
35  */
36
37 #ifndef __PACKET_IPX_H__
38 #define __PACKET_IPX_H__
39
40 #define IPX_NODE_LEN    6
41
42 typedef guint32 IPXNet;
43 typedef guint16 IPXPort;
44 typedef guint8  IPXNode[IPX_NODE_LEN];
45 typedef const guint8    CIPXNode[IPX_NODE_LEN];
46
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)
53
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)
58
59 #define IPX_SAP_FILE_SERVER (0x0004)
60
61 struct sap_query
62 {
63         guint16 query_type;     /* net order */
64         guint16 server_type;    /* net order */
65 };
66
67 #define IPX_RIP_REQUEST (0x1)
68 #define IPX_RIP_RESPONSE (0x2)
69
70 struct ipx_rip_packet
71 {
72         guint16 operation ;
73         struct ipx_rt_def
74         {
75                 guint32 network ;
76                 guint16 hops ;
77                 guint16 ticks ;
78         }
79         rt[1] ;
80 };
81
82 #define IPX_BROADCAST_NODE ("\xff\xff\xff\xff\xff\xff")
83 #define IPX_THIS_NODE      ("\0\0\0\0\0\0")
84 #define IPX_THIS_NET (0)
85
86 #ifndef IPX_NODE_LEN
87 #define IPX_NODE_LEN (6)
88 #endif
89
90 /*
91  * From:
92  *
93  *      http://alr.base2co.com:457/netguide/dipxD.ipx_packet_struct.html
94  *
95  * which is part of SCO's "Network Programmer's Guide and Reference".
96  *
97  * It calls type 20 "NetBIOS name packet".  Microsoft Network Monitor
98  * calls it "WAN Broadcast"; it's also used for SMB browser announcements,
99  * i.e. NetBIOS (broadcast) datagrams.
100  */
101 #define IPX_PACKET_TYPE_IPX             0
102 #define IPX_PACKET_TYPE_RIP             1
103 #define IPX_PACKET_TYPE_ECHO            2
104 #define IPX_PACKET_TYPE_ERROR           3
105 #define IPX_PACKET_TYPE_PEP             4
106 #define IPX_PACKET_TYPE_SPX             5
107 #define IPX_PACKET_TYPE_NCP             17
108 #define IPX_PACKET_TYPE_WANBCAST        20      /* propagated NetBIOS packet? */
109
110 /* info on these sockets can be found in this listing from Novell:
111
112         http://developer.novell.com/engsup/sample/tids/dsoc1b/dsoc1b.htm
113 */
114
115 #define IPX_SOCKET_PING_CISCO           0x0002 /* In cisco this is set with: ipx ping-default cisco */
116 #define IPX_SOCKET_NCP                  0x0451
117 #define IPX_SOCKET_SAP                  0x0452
118 #define IPX_SOCKET_IPXRIP               0x0453
119 #define IPX_SOCKET_NETBIOS              0x0455
120 #define IPX_SOCKET_DIAGNOSTIC           0x0456
121 #define IPX_SOCKET_SERIALIZATION        0x0457
122 #define IPX_SOCKET_NWLINK_SMB_SERVER    0x0550
123 #define IPX_SOCKET_NWLINK_SMB_NAMEQUERY 0x0551
124 #define IPX_SOCKET_NWLINK_SMB_REDIR     0x0552
125 #define IPX_SOCKET_NWLINK_SMB_MAILSLOT  0x0553
126 #define IPX_SOCKET_NWLINK_SMB_MESSENGER 0x0554
127 #define IPX_SOCKET_NWLINK_SMB_BROWSE    0x0555 /* ? not sure on this
128         but I guessed based on the content of the packet I saw */
129 #define IPX_SOCKET_ATTACHMATE_GW        0x055d
130 #define IPX_SOCKET_IPX_MESSAGE          0x4001
131 #define IPX_SOCKET_IPX_MESSAGE1         0x4003
132 #define IPX_SOCKET_ADSM                 0x8522 /* www.tivoli.com */
133 #define IPX_SOCKET_EIGRP                0x85be /* cisco ipx eigrp */
134 #define IPX_SOCKET_NLSP                 0x9001 /* NetWare Link Services Protocol */
135 #define IPX_SOCKET_IPXWAN               0x9004 /* IPX WAN (RFC 1362, NLSP spec) */
136 #define IPX_SOCKET_SNMP_AGENT           0x900F /* RFC 1906 */
137 #define IPX_SOCKET_SNMP_SINK            0x9010 /* RFC 1906 */
138 #define IPX_SOCKET_PING_NOVELL          0x9086 /* In cisco this is set with: ipx ping-default novell */
139 #define IPX_SOCKET_TCP_TUNNEL           0x9091 /* RFC 1791 */
140 #define IPX_SOCKET_UDP_TUNNEL           0x9092 /* RFC 1791 */
141 #define SPX_SOCKET_PA                   0x90b2 /* NDPS Printer Agent */
142 #define SPX_SOCKET_BROKER               0x90b3 /* NDPS Broker */
143 #define SPX_SOCKET_SRS                  0x90b4 /* NDPS Service Registry Service */
144 #define SPX_SOCKET_ENS                  0x90b5 /* NDPS Event Notification Service */
145 #define SPX_SOCKET_RMS                  0x90b6 /* NDPS Remote Management Service */
146 #define SPX_SOCKET_NOTIFY_LISTENER      0x90b7 /* NDPS Notify Listener */
147
148 extern const value_string ipx_socket_vals[];
149
150 extern const value_string server_vals[];
151
152 void capture_ipx(packet_counts *);
153
154 /*
155  * Structure passed to SPX subdissectors, containing information from
156  * the SPX header that might be useful to the subdissector.
157  */
158 typedef struct {
159         gboolean eom;                   /* end-of-message flag in SPX header */
160         guint8  datastream_type;        /* datastream type from SPX header */
161 } spx_info;
162
163 #endif