Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (15 sloc) 556 Bytes
-type packet_type() :: st_data | st_fin | st_state | st_reset | st_syn.
-type extension() :: {sack, binary()} | {ext_bits, binary()}.
-type timestamp() :: integer().
-record(packet, { ty :: packet_type(),
conn_id :: integer(),
win_sz = 0 :: integer(),
seq_no :: integer(),
ack_no :: integer(),
extension = [] :: [extension()],
payload = <<>> :: binary()
}).
-type packet() :: #packet{}.
-define(SEQ_NO_MASK, 16#FFFF).
-define(ACK_NO_MASK, 16#FFFF).
-define(REORDER_BUFFER_SIZE, 32).