File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,8 @@ class IPOption_SDBM(IPOption):
213213 8 : ("Timestamp" ,"!II" ),
214214 14 : ("AltChkSum" ,"!BH" ),
215215 15 : ("AltChkSumOpt" ,None ),
216- 25 : ("Mood" ,"!p" )
216+ 25 : ("Mood" ,"!p" ),
217+ 28 : ("UTO" , "!H" )
217218 },
218219 { "EOL" :0 ,
219220 "NOP" :1 ,
@@ -224,7 +225,8 @@ class IPOption_SDBM(IPOption):
224225 "Timestamp" :8 ,
225226 "AltChkSum" :14 ,
226227 "AltChkSumOpt" :15 ,
227- "Mood" :25
228+ "Mood" :25 ,
229+ "UTO" :28
228230 } )
229231
230232class TCPOptionsField (StrField ):
Original file line number Diff line number Diff line change @@ -4396,3 +4396,14 @@ defrags = defragment(frags)
43964396assert len(defrags) == 1
43974397* which should be the same as pkt reconstructed
43984398assert defrags[0] == IP(str(pkt))
4399+
4400+ ############
4401+ ############
4402+ + Test TCP options
4403+
4404+ = TCP options: UTO - basic build
4405+ 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"
4406+
4407+ = TCP options: UTO - basic dissection
4408+ 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")
4409+ uto[TCP].options[0][0] == "UTO" and uto[TCP].options[0][1] == 0xffff
You can’t perform that action at this time.
0 commit comments