I believe the issue is that with the to_python() for ofp_flow_stats&, we
have no idea if the actions actually follow the ofp_flow_stats structure
since, for example, someone could have just made an ofp_flow_stats
struct and tried to pythonize it.  I am not sure if this ever actually
happens, but whatever.  It's not provably a safe thing to do.  However,
the Flow_stats struct actually explicitly has the actions wrapped up
into a vector, so it IS possible to safely pull them out of that.  It
just hasn't been done. 

The to_python() for Flow_stats should: Step one, convert the fields from
the ofp_flow_stats struct itself into "dict", which is done by just
calling the to_python() for ofp_flow_stats.  Step two, unpack v_actions
from the Flow_stats struct into a list of dicts and throw it into "dict"
too.  Except instead of step two, we have /* XXX actions */. :)  You
should be able to just go ahead and implement it there.

-- Murphy

On Fri, 2011-01-28 at 14:50 +0900, Derek Cormier wrote:
> Hello,
> 
> I was looking at pyglue.cc and it looks like actions are never included 
> in python events.
> 
> A comment says to use Flow_stats, but flow stats contains a vector 
> ofp_action_header's. Since actions are variable-length, won't this cut 
> off data when the action is longer than the header? (For example, 
> ofp_action_dl_addr).
> 
> So, is there any way to get actions in events like flow stats in? If 
> not, how could we go about implementing this?
> 
> Thanks,
> Derek
> 
> _______________________________________________
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org



_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to