diff options
Diffstat (limited to 'lib/libtle_l4p/tcp_stream.h')
-rw-r--r-- | lib/libtle_l4p/tcp_stream.h | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/lib/libtle_l4p/tcp_stream.h b/lib/libtle_l4p/tcp_stream.h index a36b5fe..a33e557 100644 --- a/lib/libtle_l4p/tcp_stream.h +++ b/lib/libtle_l4p/tcp_stream.h @@ -30,29 +30,6 @@ extern "C" { #endif -enum { - TCP_ST_CLOSED, - TCP_ST_LISTEN, - TCP_ST_SYN_SENT, - TCP_ST_SYN_RCVD, - TCP_ST_ESTABLISHED, - TCP_ST_FIN_WAIT_1, - TCP_ST_FIN_WAIT_2, - TCP_ST_CLOSE_WAIT, - TCP_ST_CLOSING, - TCP_ST_LAST_ACK, - TCP_ST_TIME_WAIT, - TCP_ST_NUM -}; - -enum { - TCP_OP_LISTEN = 0x1, - TCP_OP_ACCEPT = 0x2, - TCP_OP_CONNECT = 0x4, - TCP_OP_ESTABLISH = 0x8, - TCP_OP_CLOSE = 0x10, -}; - struct tcb { volatile uint16_t state; volatile uint16_t uop; /* operations by user performed */ @@ -90,6 +67,7 @@ struct tcb { uint8_t wscale; uint8_t nb_retx; /* number of retransmission */ uint8_t nb_retm; /**< max number of retx attempts. */ + uint8_t close_flags; /* tcp flags to send on close */ } snd; struct tle_tcp_syn_opts so; /* initial syn options. */ }; @@ -104,6 +82,8 @@ struct tle_tcp_stream { struct stbl_entry *ste; /* entry in streams table. */ struct tcb tcb; + int32_t ts_offset; /* TS.VAL offset from TSC calculated */ + struct { void *handle; } timer; @@ -111,6 +91,8 @@ struct tle_tcp_stream { struct { struct tle_event *ev; struct tle_stream_cb cb; + /*bitmask of remote events */ + uint16_t rev; } err; struct { |