struct action_xlate_ctx *ctx)
{
const struct ofport_dpif *port;
- struct actions_iterator iter;
const union ofp_action *ia;
+ size_t left;
port = get_ofp_port(ctx->ofproto, ctx->flow.in_port);
if (port
return;
}
- for (ia = actions_first(&iter, in, n_in); ia; ia = actions_next(&iter)) {
- enum ofp_action_type type = ntohs(ia->type);
+ OFPUTIL_ACTION_FOR_EACH_UNSAFE (ia, left, in, n_in) {
const struct ofp_action_dl_addr *oada;
+ enum ofp_action_type type = ntohs(ia->type);
switch (type) {
case OFPAT_OUTPUT:
ds_put_char_multiple(result, '\t', level);
ds_put_cstr(result, "OpenFlow ");
- ofp_print_actions(result, (const struct ofp_action_header *) rule->actions,
- rule->n_actions * sizeof *rule->actions);
+ ofp_print_actions(result, rule->actions, rule->n_actions);
ds_put_char(result, '\n');
}