Some fixes to destiny

* fixed broken destiny types header
 * added TCP flags to corresponding header
 * removed TCP_HC struct from tcp.h
This commit is contained in:
Martin Lenders 2013-10-25 17:49:55 +02:00 committed by Oleg Hahm
parent 7ff3d4c52c
commit 128125b44e
2 changed files with 11 additions and 13 deletions

View File

@ -72,4 +72,4 @@ typedef struct __attribute__((packed)) {
* @}
*/
#endif DESTINY_TYPES_H_
#endif /* DESTINY_TYPES_H_ */

View File

@ -26,6 +26,16 @@
#define TCP_WSF_OPTION 0x03 // Window scale factor
#define TCP_TS_OPTION 0x08 // Timestamp
enum tcp_flags {
TCP_ACK = 0x08,
TCP_URG_PSH = 0x14,
TCP_RST = 0x20,
TCP_SYN = 0x40,
TCP_SYN_ACK = 0x48,
TCP_FIN = 0x80,
TCP_FIN_ACK = 0x88
};
enum tcp_states {
CLOSED = 0,
LISTEN = 1,
@ -74,18 +84,6 @@ typedef struct __attribute__((packed)) tcp_mms_o_t {
uint16_t mss;
} tcp_mss_option_t;
typedef struct __attribute__((packed)) tcp_h_t {
uint16_t src_port;
uint16_t dst_port;
uint32_t seq_nr;
uint32_t ack_nr;
uint8_t dataOffset_reserved;
uint8_t reserved_flags;
uint16_t window;
uint16_t checksum;
uint16_t urg_pointer;
} tcp_hdr_t;
#ifdef TCP_HC
mutex_t global_context_counter_mutex;
uint8_t global_context_counter;