summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe
diff options
context:
space:
mode:
authorMichael Brown2006-12-30 02:32:22 +0100
committerMichael Brown2006-12-30 02:32:22 +0100
commitb91b9d3d88bdc1bf6270ca82cd98966cf64e4ed5 (patch)
tree88b52b0badb1ffa57efa71190405d95fa692ccfe /src/include/gpxe
parentUse autocolourisation (diff)
downloadipxe-b91b9d3d88bdc1bf6270ca82cd98966cf64e4ed5.tar.gz
ipxe-b91b9d3d88bdc1bf6270ca82cd98966cf64e4ed5.tar.xz
ipxe-b91b9d3d88bdc1bf6270ca82cd98966cf64e4ed5.zip
Use whole bytes for the ACKED and RCVD portions of tcp_state; it
produces slightly smaller code.
Diffstat (limited to 'src/include/gpxe')
-rw-r--r--src/include/gpxe/tcp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/gpxe/tcp.h b/src/include/gpxe/tcp.h
index f0ac8ace3..f9cd41390 100644
--- a/src/include/gpxe/tcp.h
+++ b/src/include/gpxe/tcp.h
@@ -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) \