I am implementing a simple switch for OpenFlow 1.3 and I need to
retrieve the in_port value from the match fields. To do that I need to
search the list for the field (as the specification doesn't require
ordered fields).

My suggestion is to have a dictionary instead of a list to ease the
access to the fields, using the header as the key. Something like:

     in_port =  msg.match.fields[ofproto.OXM_OF_IN_PORT].value

I implemented a patch for this. If you think it's good, or have
suggestions, I can submit to the developer list.

--
Eder Leão Fernandes, Jr Researcher.

Bacharel em Ciências de Computação
Instituto de Ciências Matemáticas e de Computação
Universidade de São Paulo

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to