Clean up white space.
[obnox/wireshark/wip.git] / packet-rx.h
1 /* packet-rx.h
2  * Definitions for packet disassembly structures and routines
3  *
4  * $Id: packet-rx.h,v 1.3 2000/04/14 06:42:52 guy Exp $
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@zing.org>
8  * Copyright 1998 Gerald Combs
9  * Joerg Mayer <jmayer@telemation.de>
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 #ifndef PACKET_RX_H
28 #define PACKET_RX_H
29
30 struct rx_header {
31         guint32 epoch;
32         guint32 cid;
33         guint32 callNumber;
34         guint32 seq;
35         guint32 serial;
36         u_char type;
37 #define RX_PACKET_TYPE_DATA             1
38 #define RX_PACKET_TYPE_ACK              2
39 #define RX_PACKET_TYPE_BUSY             3
40 #define RX_PACKET_TYPE_ABORT            4
41 #define RX_PACKET_TYPE_ACKALL           5
42 #define RX_PACKET_TYPE_CHALLENGE        6
43 #define RX_PACKET_TYPE_RESPONSE         7
44 #define RX_PACKET_TYPE_DEBUG            8
45 #define RX_PACKET_TYPE_PARAMS           9
46 #define RX_PACKET_TYPE_VERSION          13
47         u_char flags; 
48 #define RX_CLIENT_INITIATED 1
49 #define RX_REQUEST_ACK 2
50 #define RX_LAST_PACKET 4
51 #define RX_MORE_PACKETS 8
52 #define RX_FREE_PACKET 16
53         u_char userStatus;
54         u_char securityIndex;
55         guint16 spare;                  /* How clever: even though the AFS */
56         guint16 serviceId;              /* header files indicate that the */
57 };                                      /* serviceId is first, it's really */
58                                         /* encoded _after_ the spare field */
59                                         /* I wasted a day figuring that out! */
60
61 struct rx_ack_header {
62      guint16 bufferspace;       /* # of packet buffers available */
63      guint16 maxskew;
64      guint32 firstpacket;        /* First packet in acks below */
65      guint32 prevpacket;
66      guint32 serial;             /* Packet that prompted this one */
67      u_char reason;             /* rx_ack_reason */
68         /* some other stuff I think */
69 };
70
71 #define RX_ACK_TYPE_NACK 0
72 #define RX_ACK_TYPE_ACK 1
73
74 #define RX_ACK_REQUESTED 1
75 #define RX_ACK_DUPLICATE 2
76 #define RX_ACK_OUT_OF_SEQUENCE 3
77 #define RX_ACK_EXEEDS_WINDOW 4
78 #define RX_ACK_NOSPACE 5
79 #define RX_ACK_PING 6
80 #define RX_ACK_PING_RESPONSE 7
81 #define RX_ACK_DELAY 8
82
83 #endif
84