Skip to content
Snippets Groups Projects
Commit 66d55d5c authored by Guillaume Valadon's avatar Guillaume Valadon
Browse files

Merged in gvaladon/scapy-issues/IANA IP option names (pull request #66)

Add names for IPOption classes based on IANA by rypeck
parents f3986b93 b6276b20
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,7 @@ class _IPOption_HDR(Packet):
BitEnumField("option",0,5, _ip_options_names) ]
class IPOption(Packet):
name = "IP Option"
fields_desc = [ _IPOption_HDR,
FieldLenField("length", None, fmt="B", # Only option 0 and 1 have no length and value
length_of="value", adjust=lambda pkt,l:l+2),
......@@ -95,15 +96,18 @@ class IPOption(Packet):
return cls
class IPOption_EOL(IPOption):
name = "IP Option End of Options List"
option = 0
fields_desc = [ _IPOption_HDR ]
class IPOption_NOP(IPOption):
name = "IP Option No Operation"
option=1
fields_desc = [ _IPOption_HDR ]
class IPOption_Security(IPOption):
name = "IP Option Security"
copy_flag = 1
option = 2
fields_desc = [ _IPOption_HDR,
......@@ -155,6 +159,7 @@ class IPOption_MTU_Reply(IPOption_MTU_Probe):
option = 12
class IPOption_Traceroute(IPOption):
name = "IP Option Traceroute"
copy_flag = 1
option = 18
fields_desc = [ _IPOption_HDR,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment