2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 23:31:39 +00:00

Use whole bytes for the ACKED and RCVD portions of tcp_state; it

produces slightly smaller code.
This commit is contained in:
Michael Brown 2006-12-30 01:32:22 +00:00
parent 83e1340d88
commit b91b9d3d88

View File

@ -58,15 +58,15 @@ struct tcp_header {
* Note that this applies only to SYN and FIN.
*/
#define TCP_STATE_ACKED(flags) ( (flags) << 8 )
#define TCP_FLAGS_ACKED(state) ( ( (state) >> 8 ) & 0x03 )
#define TCP_FLAGS_ACKED(state) ( ( (state) >> 8 ) & 0xff )
/** TCP flags that have been received from the peer
*
* Note that this applies only to SYN and FIN, and that once SYN has
* been received, we should always be sending ACK.
*/
#define TCP_STATE_RCVD(flags) ( (flags) << 12 )
#define TCP_FLAGS_RCVD(state) ( ( (state) >> 12 ) & 0x03 )
#define TCP_STATE_RCVD(flags) ( (flags) << 16 )
#define TCP_FLAGS_RCVD(state) ( ( (state) >> 16 ) & 0xff )
/** TCP flags that are currently being sent in outgoing packets */
#define TCP_FLAGS_SENDING(state) \