static int cmd_evaluate_list(struct eval_ctx *ctx, struct cmd *cmd)
{
struct table *table;
+ struct set *set;
int ret;
ret = cache_update(cmd->op, ctx->msgs);
return cmd_error(ctx, "Could not process rule: Set '%s' does not exist",
cmd->handle.set);
return 0;
+ case CMD_OBJ_FLOWTABLE:
+ table = table_lookup(&cmd->handle);
+ if (table == NULL)
+ return cmd_error(ctx, "Could not process rule: Table '%s' does not exist",
+ cmd->handle.table);
+ set = set_lookup(table, cmd->handle.set);
+ if (set == NULL || !(set->flags & SET_F_EVAL))
+ return cmd_error(ctx, "Could not process rule: Flow table '%s' does not exist",
+ cmd->handle.set);
+ return 0;
case CMD_OBJ_CHAIN:
table = table_lookup(&cmd->handle);
if (table == NULL)
{
$$ = cmd_alloc(CMD_LIST, CMD_OBJ_FLOWTABLES, &$3, &@$, NULL);
}
+ | FLOW TABLE set_spec
+ {
+ $$ = cmd_alloc(CMD_LIST, CMD_OBJ_FLOWTABLE, &$3, &@$, NULL);
+ }
;
flush_cmd : TABLE table_spec
return do_list_ruleset(ctx, cmd);
case CMD_OBJ_FLOWTABLES:
return do_list_sets(ctx, cmd);
+ case CMD_OBJ_FLOWTABLE:
+ return do_list_set(ctx, cmd, table);
default:
BUG("invalid command object type %u\n", cmd->obj);
}