Include <string.h> to get "strcmp()" declared.
[obnox/wireshark/wip.git] / packet-rx.h
index 1df6fc9112e6c4a59d06366a430e9325d8c4c3c3..0a103d3071389372a80c4b9a4bf5744323b2740e 100644 (file)
@@ -1,13 +1,11 @@
 /* packet-rx.h
  * Definitions for packet disassembly structures and routines
  *
- * $Id: packet-rx.h,v 1.3 2000/04/14 06:42:52 guy Exp $
+ * $Id: packet-rx.h,v 1.9 2002/02/05 21:02:36 nneul Exp $
  *
  * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
  * Copyright 1998 Gerald Combs
- * Joerg Mayer <jmayer@telemation.de>
- *
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
 #ifndef PACKET_RX_H
 #define PACKET_RX_H
 
-struct rx_header {
-       guint32 epoch;
-       guint32 cid;
-       guint32 callNumber;
-       guint32 seq;
-       guint32 serial;
-       u_char type;
+/*
+ * Private data passed from the RX dissector to the AFS dissector.
+ */
+struct rxinfo {
+       guint8  type;
+       guint8  flags;
+       guint16 serviceid;
+       guint32 callnumber;
+       guint32 seq;
+};
+
+/*
+ * RX protocol definitions.
+ */
+
+/*
+ * Packet types.
+ */
 #define RX_PACKET_TYPE_DATA            1
 #define RX_PACKET_TYPE_ACK             2
 #define RX_PACKET_TYPE_BUSY            3
@@ -44,29 +53,16 @@ struct rx_header {
 #define RX_PACKET_TYPE_DEBUG           8
 #define RX_PACKET_TYPE_PARAMS          9
 #define RX_PACKET_TYPE_VERSION         13
-       u_char flags; 
+
+/*
+ * Flag bits in the RX header.
+ */
 #define RX_CLIENT_INITIATED 1
 #define RX_REQUEST_ACK 2
 #define RX_LAST_PACKET 4
 #define RX_MORE_PACKETS 8
 #define RX_FREE_PACKET 16
-       u_char userStatus;
-       u_char securityIndex;
-       guint16 spare;                  /* How clever: even though the AFS */
-       guint16 serviceId;              /* header files indicate that the */
-};                                     /* serviceId is first, it's really */
-                                       /* encoded _after_ the spare field */
-                                       /* I wasted a day figuring that out! */
-
-struct rx_ack_header {
-     guint16 bufferspace;       /* # of packet buffers available */
-     guint16 maxskew;
-     guint32 firstpacket;        /* First packet in acks below */
-     guint32 prevpacket;
-     guint32 serial;             /* Packet that prompted this one */
-     u_char reason;             /* rx_ack_reason */
-       /* some other stuff I think */
-};
+#define RX_SLOW_START_OR_JUMBO 32
 
 #define RX_ACK_TYPE_NACK 0
 #define RX_ACK_TYPE_ACK 1
@@ -79,6 +75,8 @@ struct rx_ack_header {
 #define RX_ACK_PING 6
 #define RX_ACK_PING_RESPONSE 7
 #define RX_ACK_DELAY 8
+#define RX_ACK_IDLE 9
 
-#endif
+#define RX_MAXCALLS    4
 
+#endif