Note that capture filters don't work on Linux loopback devices with the
[obnox/wireshark/wip.git] / packet-ipx.h
1 /* packet-ipx.h
2  * Routines for NetWare's IPX
3  * Gilbert Ramirez <gram@xiexie.org>
4  *
5  * $Id: packet-ipx.h,v 1.5 2000/01/22 06:22:14 guy Exp $
6  *
7  * Ethereal - Network traffic analyzer
8  * By Gerald Combs <gerald@zing.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * 
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.
16  * 
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.
21  * 
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.
25  */
26
27 /*
28  *  ipxlib.h
29  *
30  *  Copyright (C) 1995 by Volker Lendecke
31  *
32  */
33
34 #define IPX_NODE_LEN    6
35
36 typedef guint32 IPXNet;
37 typedef guint16 IPXPort;
38 typedef guint8  IPXNode[IPX_NODE_LEN];
39 typedef const guint8    CIPXNode[IPX_NODE_LEN];
40
41 #define IPX_USER_PTYPE (0x00)
42 #define IPX_RIP_PTYPE (0x01)
43 #define IPX_SAP_PTYPE (0x04)
44 #define IPX_AUTO_PORT (0x0000)
45 #define IPX_SAP_PORT  (0x0452)
46 #define IPX_RIP_PORT  (0x0453)
47
48 #define IPX_SAP_GENERAL_QUERY (0x0001)
49 #define IPX_SAP_GENERAL_RESPONSE (0x0002)
50 #define IPX_SAP_NEAREST_QUERY (0x0003)
51 #define IPX_SAP_NEAREST_RESPONSE (0x0004)
52
53 #define IPX_SAP_FILE_SERVER (0x0004)
54
55 struct sap_query
56 {
57         guint16 query_type;     /* net order */
58         guint16 server_type;    /* net order */
59 };
60
61 struct sap_server_ident
62 {
63         guint16 server_type ;
64         char            server_name[48] ;
65         IPXNet          server_network ;
66         IPXNode         server_node ;
67         IPXPort         server_port ;
68         guint16 intermediate_network ;
69 };
70
71 #define IPX_RIP_REQUEST (0x1)
72 #define IPX_RIP_RESPONSE (0x2)
73
74 struct ipx_rip_packet
75 {
76         guint16 operation ;
77         struct ipx_rt_def
78         {
79                 guint32 network ;
80                 guint16 hops ;
81                 guint16 ticks ;
82         }
83         rt[1] ;
84 };
85
86 #define IPX_BROADCAST_NODE ("\xff\xff\xff\xff\xff\xff")
87 #define IPX_THIS_NODE      ("\0\0\0\0\0\0")
88 #define IPX_THIS_NET (0)
89
90 #ifndef IPX_NODE_LEN
91 #define IPX_NODE_LEN (6)
92 #endif
93
94 gchar*
95 ipxnet_to_string(const guint8 *ad);
96 gchar *
97 ipxnet_to_str_punct(const guint32 ad, char punct);