static void
ofp_print_nx_action(struct ds *string, const struct nx_action_header *nah)
{
-
- if (nah->subtype == htonl(NXAST_SNAT)) {
+ switch (ntohs(nah->subtype)) {
+ case NXAST_SNAT: {
const struct nx_action_snat *nas = (struct nx_action_snat *)nah;
uint16_t port = ntohs(nas->port);
} else {
ds_put_format(string, "nat:%"PRIu16" (invalid port)", port);
}
- } else {
- ds_put_format(string, "***unknown Nicira action:%d***\n",
+ break;
+ }
+
+ case NXAST_RESUBMIT: {
+ const struct nx_action_resubmit *nar = (struct nx_action_resubmit *)nah;
+ ds_put_format(string, "resubmit:");
+ ofp_print_port_name(string, ntohs(nar->in_port));
+ break;
+ }
+
+ default:
+ ds_put_format(string, "***unknown Nicira action:%d***\n",
ntohs(nah->subtype));
}
}