summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-10-05 19:01:54 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-10-06 13:16:17 +0900
commitfd692d330dda484a7b687a3d7b35c8015bc4886e (patch)
treea17235a981b72a90f24fc848511f86e7c430fc40
parent5a0eea61faeb01ea45c2afd78637f054771c98af (diff)
packet lib: kill find_protocol in Packet class
- Now easy to know the protocol name and iterate protocols. - find_protocol doesn't handle the case the same protocols are stacked. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/lib/packet/packet.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/ryu/lib/packet/packet.py b/ryu/lib/packet/packet.py
index 93553404..71b1db3c 100644
--- a/ryu/lib/packet/packet.py
+++ b/ryu/lib/packet/packet.py
@@ -52,11 +52,6 @@ class Packet(object):
def add_protocol(self, proto):
self.protocols.append(proto)
- def find_protocol(self, name):
- for p in self.protocols:
- if p.__class__.__name__ == name:
- return p
-
def next(self):
try:
p = self.protocols[self.protocol_idx]