I really like improvement for Ryu packet library!

However, like your other patches, it's mal-formed. Can you please
resend?

On Fri, 24 May 2013 17:03:26 +0000
Shaun Crampton <[email protected]> wrote:

> From: Shaun Crampton <[email protected]>
> 
> For convenience, make packet into a sequence type.
> 
> Enables accessing protocols with packet[n].
> 
> Signed-off-by: Shaun Crampton <[email protected]>
> 
> ---
>  ryu/lib/packet/packet.py |   12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/ryu/lib/packet/packet.py b/ryu/lib/packet/packet.py
> index 84e5bf8..2ef08c1 100644
> --- a/ryu/lib/packet/packet.py
> +++ b/ryu/lib/packet/packet.py
> @@ -95,3 +95,15 @@ class Packet(object):
>  
>      def __iter__(self):
>          return self
> +
> +    def __getitem__(self, idx):
> +        return self.protocols[idx]
> +
> +    def __setitem__(self, idx, item):
> +        self.protocols[idx] = item
> +
> +    def __delitem__(self, idx):
> +        del self.protocols[idx]
> +
> +    def __len__(self):
> +        return len(self.protocols)
> -- 
> 1.7.9.5
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service 
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to