Used mainly for traceroute.
Signed-off-by: FUJITA Tomonori <[email protected]>
---
ryu/lib/packet/icmp.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/ryu/lib/packet/icmp.py b/ryu/lib/packet/icmp.py
index e42fa40..b049380 100644
--- a/ryu/lib/packet/icmp.py
+++ b/ryu/lib/packet/icmp.py
@@ -24,6 +24,7 @@ ICMP_DEST_UNREACH = 3
ICMP_SRC_QUENCH = 4
ICMP_REDIRECT = 5
ICMP_ECHO_REQUEST = 8
+ICMP_TIME_EXCEEDED = 11
class icmp(packet_base.PacketBase):
@@ -146,3 +147,20 @@ class echo(object):
hdr += self.data
return hdr
+
+
[email protected]_icmp_type(ICMP_TIME_EXCEEDED)
+class TimeExceeded(object):
+ _PACK_STR = '!4x'
+ _MIN_LEN = struct.calcsize(_PACK_STR)
+
+ def __init__(self, data=None):
+ self.data = data
+
+ def serialize(self):
+ hdr = bytearray(TimeExceeded._MIN_LEN)
+
+ if self.data is not None:
+ hdr += self.data
+
+ return hdr
--
1.7.12.4 (Apple Git-37)
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel