summaryrefslogtreecommitdiff
path: root/utilities/ovs-ofctl.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-06-30 10:04:09 -0700
committerBen Pfaff <blp@nicira.com>2011-06-30 10:04:09 -0700
commitb4b8c7812bdfdc5a6fda4251453d8e3409486b98 (patch)
treedf0184912e82dd6897fa4f89cfc0028033a356f4 /utilities/ovs-ofctl.c
parent8f93e93c807d3acd06fb3b367276f574164b1a9c (diff)
downloadopenvswitch-b4b8c7812bdfdc5a6fda4251453d8e3409486b98.tar.gz
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.
Diffstat (limited to 'utilities/ovs-ofctl.c')
-rw-r--r--utilities/ovs-ofctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 3d101789d..a6fff256c 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -951,8 +951,7 @@ fte_version_print(const struct fte_version *version)
}
ds_init(&s);
- ofp_print_actions(&s, (const struct ofp_action_header *) version->actions,
- version->n_actions * sizeof *version->actions);
+ ofp_print_actions(&s, version->actions, version->n_actions);
printf(" %s\n", ds_cstr(&s));
ds_destroy(&s);
}