diff options
| author | Michael Brown | 2007-07-13 12:32:53 +0200 |
|---|---|---|
| committer | Michael Brown | 2007-07-13 12:32:53 +0200 |
| commit | 096fa94f0c62f5cd813f35bd229f2c6f003e92c3 (patch) | |
| tree | c1b64d8761ef787d6916bcea9b5f28f10e9f3ed7 /src/include/gpxe | |
| parent | Adjust received length to take into account any already-received data (diff) | |
| download | ipxe-096fa94f0c62f5cd813f35bd229f2c6f003e92c3.tar.gz ipxe-096fa94f0c62f5cd813f35bd229f2c6f003e92c3.tar.xz ipxe-096fa94f0c62f5cd813f35bd229f2c6f003e92c3.zip | |
Add support for TCP timestamps
Diffstat (limited to 'src/include/gpxe')
| -rw-r--r-- | src/include/gpxe/tcp.h | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/src/include/gpxe/tcp.h b/src/include/gpxe/tcp.h index d927d2411..d967791f1 100644 --- a/src/include/gpxe/tcp.h +++ b/src/include/gpxe/tcp.h @@ -27,18 +27,59 @@ struct tcp_header { uint16_t urg; /* Urgent pointer */ }; -/** - * TCP MSS option +/** @defgroup tcpopts TCP options + * @{ */ + +/** End of TCP options list */ +#define TCP_OPTION_END 0 + +/** TCP option pad */ +#define TCP_OPTION_NOP 1 + +/** Generic TCP option */ +struct tcp_option { + uint8_t kind; + uint8_t length; +} __attribute__ (( packed )); + +/** TCP MSS option */ struct tcp_mss_option { uint8_t kind; uint8_t length; uint16_t mss; -}; +} __attribute__ (( packed )); /** Code for the TCP MSS option */ #define TCP_OPTION_MSS 2 +/** TCP timestamp option */ +struct tcp_timestamp_option { + uint8_t kind; + uint8_t length; + uint32_t tsval; + uint32_t tsecr; +} __attribute__ (( packed )); + +/** Padded TCP timestamp option (used for sending) */ +struct tcp_timestamp_padded_option { + uint8_t nop[2]; + struct tcp_timestamp_option tsopt; +} __attribute__ (( packed )); + +/** Code for the TCP timestamp option */ +#define TCP_OPTION_TS 8 + +/** Parsed TCP options */ +struct tcp_options { + /** MSS option, if present */ + const struct tcp_mss_option *mssopt; + /** Timestampe option, if present */ + const struct tcp_timestamp_option *tsopt; +}; + +/** @} */ + /* * TCP flags */ |
