ofp-util: Simplify iteration through OpenFlow actions.
authorBen Pfaff <blp@nicira.com>
Thu, 30 Jun 2011 17:04:09 +0000 (10:04 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 30 Jun 2011 17:04:09 +0000 (10:04 -0700)
commitb4b8c7812bdfdc5a6fda4251453d8e3409486b98
treedf0184912e82dd6897fa4f89cfc0028033a356f4
parent8f93e93c807d3acd06fb3b367276f574164b1a9c
ofp-util: Simplify iteration through OpenFlow actions.

The existing actions_first() and actions_next() iterator functions are not
much like the other iteration constructs found throughout the Open vSwitch
tree.  Also, they only work with actions that have already been validated,
so there are cases where they cannot be used.

This commit adds new macros for iterating through OpenFlow actions, one
for actions that have been validated and one for actions that have not, and
adapts the existing users.  The following commit will further refine action
parsing and add more users.
lib/ofp-print.c
lib/ofp-print.h
lib/ofp-util.c
lib/ofp-util.h
ofproto/ofproto-dpif.c
ofproto/ofproto.c
utilities/ovs-ofctl.c