2 * Definitions for packet disassembly structures and routines
4 * $Id: packet-rx.h,v 1.3 2000/04/14 06:42:52 guy Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@zing.org>
8 * Copyright 1998 Gerald Combs
9 * Joerg Mayer <jmayer@telemation.de>
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.
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.
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.
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
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
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! */
61 struct rx_ack_header {
62 guint16 bufferspace; /* # of packet buffers available */
64 guint32 firstpacket; /* First packet in acks below */
66 guint32 serial; /* Packet that prompted this one */
67 u_char reason; /* rx_ack_reason */
68 /* some other stuff I think */
71 #define RX_ACK_TYPE_NACK 0
72 #define RX_ACK_TYPE_ACK 1
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
80 #define RX_ACK_PING_RESPONSE 7
81 #define RX_ACK_DELAY 8