returns a list of protocols that matches to the specified protocol.
Signed-off-by: FUJITA Tomonori <[email protected]>
---
ryu/lib/packet/packet.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ryu/lib/packet/packet.py b/ryu/lib/packet/packet.py
index def580b..4fc04b3 100644
--- a/ryu/lib/packet/packet.py
+++ b/ryu/lib/packet/packet.py
@@ -85,6 +85,9 @@ class Packet(object):
self.protocols.append(proto)
+ def get_protocols(self, other):
+ return [p for p in self if p == other]
+
def next(self):
try:
p = self.protocols[self.protocol_idx]
--
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