mirror of https://github.com/secdev/scapy.git
add TCP User Timout Option (RFC 5482)
Allow one to send the TCP User Timeout Option described in RFC 5482 in a crafted TCP segment. Also added unit tests in new "TCP options" section of test/regression.uts
This commit is contained in:
parent
4fcc67c199
commit
3e53fe5da3
|
@ -4396,3 +4396,14 @@ defrags = defragment(frags)
|
|||
assert len(defrags) == 1
|
||||
* which should be the same as pkt reconstructed
|
||||
assert defrags[0] == IP(str(pkt))
|
||||
|
||||
############
|
||||
############
|
||||
+ Test TCP options
|
||||
|
||||
= TCP options: UTO - basic build
|
||||
str(TCP(options=[("UTO", 0xffff)])) == "\x00\x14\x00\x50\x00\x00\x00\x00\x00\x00\x00\x00\x60\x02\x20\x00\x00\x00\x00\x00\x1c\x04\xff\xff"
|
||||
|
||||
= TCP options: UTO - basic dissection
|
||||
uto = TCP("\x00\x14\x00\x50\x00\x00\x00\x00\x00\x00\x00\x00\x60\x02\x20\x00\x00\x00\x00\x00\x1c\x04\xff\xff")
|
||||
uto[TCP].options[0][0] == "UTO" and uto[TCP].options[0][1] == 0xffff
|
||||
|
|
Loading…
Reference in New Issue