X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/842143f7164cee0ca36df40412a6802f0b8e7b71..ad6df73f5a6c46a409c7629f5588b1b81dff6357:/rx.h diff --git a/rx.h b/rx.h index 5abcbf53..8a3e7a89 100644 --- a/rx.h +++ b/rx.h @@ -1,7 +1,29 @@ +/* + * Copyright: (c) 2000 United States Government as represented by the + * Secretary of the Navy. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. The names of the authors may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ /* * Rx protocol format * - * $Id: rx.h,v 1.2 2000-02-08 20:57:07 kenh Exp $ + * $Id: rx.h,v 1.5 2001-10-22 04:23:37 itojun Exp $ */ #define FS_RX_PORT 7000 @@ -40,7 +62,7 @@ struct rx_header { u_int32_t callNumber; u_int32_t seq; u_int32_t serial; - u_char type; + u_int8_t type; #define RX_PACKET_TYPE_DATA 1 #define RX_PACKET_TYPE_ACK 2 #define RX_PACKET_TYPE_BUSY 3 @@ -51,34 +73,36 @@ struct rx_header { #define RX_PACKET_TYPE_DEBUG 8 #define RX_PACKET_TYPE_PARAMS 9 #define RX_PACKET_TYPE_VERSION 13 - u_char flags; + u_int8_t flags; #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; - u_short spare; /* How clever: even though the AFS */ - u_short serviceId; /* header files indicate that the */ +#define RX_SLOW_START_OK 32 +#define RX_JUMBO_PACKET 32 + u_int8_t userStatus; + u_int8_t securityIndex; + u_int16_t spare; /* How clever: even though the AFS */ + u_int16_t serviceId; /* header files indicate that the */ }; /* serviceId is first, it's really */ /* encoded _after_ the spare field */ /* I wasted a day figuring that out! */ -#define NUM_RX_FLAGS 5 +#define NUM_RX_FLAGS 7 #define RX_MAXACKS 255 struct rx_ackPacket { - u_short bufferSpace; /* Number of packet buffers available */ - u_short maxSkew; /* Max diff between ack'd packet and */ + u_int16_t bufferSpace; /* Number of packet buffers available */ + u_int16_t maxSkew; /* Max diff between ack'd packet and */ /* highest packet received */ u_int32_t firstPacket; /* The first packet in ack list */ u_int32_t previousPacket; /* Previous packet recv'd (obsolete) */ u_int32_t serial; /* # of packet that prompted the ack */ - u_char reason; /* Reason for acknowledgement */ - u_char nAcks; /* Number of acknowledgements */ - u_char acks[RX_MAXACKS]; /* Up to RX_MAXACKS acknowledgements */ + u_int8_t reason; /* Reason for acknowledgement */ + u_int8_t nAcks; /* Number of acknowledgements */ + u_int8_t acks[RX_MAXACKS]; /* Up to RX_MAXACKS acknowledgements */ }; /*