On Mon, Jun 10, 2013 at 08:30:56AM +0900, FUJITA Tomonori wrote:
> returns a list of protocols that matches to the specified protocol.
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomon...@lab.ntt.co.jp>
> ---
>  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):

other argument is class or instance?
the name, other, implies that it is the instance of Packet class.
How about protocol_cls or packate_base_cls or  something like that?


> +        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
> Ryu-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

-- 
yamahata

------------------------------------------------------------------------------
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
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to