The octets in an ip address are unsigned
[obnox/wireshark/wip.git] / packet-vines.h
1 /* packet-vines.h
2  * Definitions for packet disassembly structures and routines
3  *
4  * $Id: packet-vines.h,v 1.17 2003/04/22 08:37:55 guy Exp $
5  *
6  * Don Lafontaine <lafont02@cn.ca>
7  *
8  * Ethereal - Network traffic analyzer
9  * By Gerald Combs <gerald@ethereal.com>
10  * Copyright 1998 Gerald Combs
11  * Joerg Mayer <jmayer@loplof.de>
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26  */
27
28 /* Information about VINES can be found in
29  *
30  * VINES Protocol Definition
31  * Order Number: DA254-00
32  * Banyan Systems incorporated
33  * February 1990
34  * Part Number: 092093-000
35  *
36  * Some information can also be found in
37  *
38  *      http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/vines.htm
39  *
40  * and at
41  *
42  *      http://www.synapse.de/ban/HTML/P_VINES/Eng/P_vines.html
43  *
44  * The document at
45  *
46  *      http://www.watersprings.org/pub/id/draft-ietf-rmonmib-rmonprot-v2-00.txt
47  *
48  * lists a bunch of values of protocol identifier fields for various
49  * protocols.  It speaks of the Vines Fragmentation Protocol,
50  * the "Vines Token Ring Protocol" which appears to be the same as the
51  * "Vines LLC" protocol here, the Vines echo protocol, Vines IP, and
52  * protocols running atop Vines IP.
53  *
54  * The LLC values it describes are:
55  *
56  *      0xbc    (SAP_VINES2) Vines Token Ring a/k/a Vines LLC
57  *
58  * It doesn't mention 0xba (SAP_VINES1).
59  *
60  * The Vines Token Ring/Vines LLC protocol identifier values it
61  * describes are:
62  *
63  *      0xba    Vines IP
64  *      0xbb    Vines Echo
65  *
66  * The Ethernet type values it describes are:
67  *
68  *      0x0bad  (ETHERTYPE_VINES) Vines IP
69  *      0x0baf  Vines Echo
70  */
71
72 #ifndef __PACKETVINES_H__
73 #define __PACKETVINES_H__
74
75 #include <epan/to_str.h>
76
77 #define VINES_ADDR_LEN  6
78
79 /* VINES IP structs and definitions */
80
81 enum {
82   VIP_PROTO_IPC = 1,     /* Interprocess Communications Protocol (IPC) */
83   VIP_PROTO_SPP = 2,    /* Sequenced Packet Protcol (SPP) */
84   VIP_PROTO_ARP = 4,    /* Address Resolution Protocol (ARP) */
85   VIP_PROTO_RTP = 5,    /* Routing Update Protocol (RTP) / SRTP (Sequenced RTP) */
86   VIP_PROTO_ICP = 6     /* Internet Control Protocol (ICP) */
87 };
88
89 typedef struct _e_vip {
90   guint16 vip_chksum;
91   guint16 vip_pktlen;
92   guint8  vip_tctl;     /* Transport Control */
93   guint8  vip_proto;
94   guint8  vip_dst[VINES_ADDR_LEN];
95   guint8  vip_src[VINES_ADDR_LEN];
96 } e_vip;
97
98 /* VINES SPP and IPC structs and definitions */
99
100 enum {
101   PKTTYPE_DGRAM = 0,    /* Unreliable datagram */
102   PKTTYPE_DATA = 1,     /* User Data */
103   PKTTYPE_ERR = 2,      /* Error */
104   PKTTYPE_DISC = 3,     /* Diconnect Request */
105   PKTTYPE_PROBE = 4,    /* Probe (retransmit) */
106   PKTTYPE_ACK = 5       /* Acknowledgement */
107 };
108
109 typedef struct _e_vspp {
110   guint16 vspp_sport;
111   guint16 vspp_dport;
112   guint8  vspp_pkttype;
113   guint8  vspp_control;
114   guint16 vspp_lclid;   /* Local Connection ID */
115   guint16 vspp_rmtid;   /* Remote Connection ID */
116   guint16 vspp_seqno;   /* Sequence Number */
117   guint16 vspp_ack;     /* Acknowledgement Number */
118   guint16 vspp_win;
119 } e_vspp;
120
121 typedef struct _e_vipc {
122   guint16 vipc_sport;
123   guint16 vipc_dport;
124   guint8  vipc_pkttype;
125   guint8  vipc_control;
126   guint16 vipc_lclid;   /* Local Connection ID */
127   guint16 vipc_rmtid;   /* Remote Connection ID */
128   guint16 vipc_seqno;   /* Sequence Number */
129   guint16 vipc_ack;     /* Acknowledgement Number */
130   guint16 vipc_err_len;
131 } e_vipc;
132
133 void capture_vines(packet_counts *);
134
135 #endif /* packet-vines.h */