From 4fcc67c19994457f648a5c8eedaa8d50bb66981a Mon Sep 17 00:00:00 2001
From: Jeffrey Bencteux <jeffbencteux@gmail.com>
Date: Sat, 5 Mar 2016 09:19:44 +0100
Subject: [PATCH] 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.
---
 scapy/layers/inet.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scapy/layers/inet.py b/scapy/layers/inet.py
index ed61c84d..e26c4ef2 100644
--- a/scapy/layers/inet.py
+++ b/scapy/layers/inet.py
@@ -213,7 +213,8 @@ TCPOptions = (
                 8 : ("Timestamp","!II"),
                 14 : ("AltChkSum","!BH"),
                 15 : ("AltChkSumOpt",None),
-                25 : ("Mood","!p")
+                25 : ("Mood","!p"),
+                28 : ("UTO", "!H")
                 },
               { "EOL":0,
                 "NOP":1,
@@ -224,7 +225,8 @@ TCPOptions = (
                 "Timestamp":8,
                 "AltChkSum":14,
                 "AltChkSumOpt":15,
-                "Mood":25
+                "Mood":25,
+                "UTO":28
                 } )
 
 class TCPOptionsField(StrField):
-- 
GitLab