From d1c1b8260ee4cce636abe0fcf8fe8ca12984c4e0 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 10 Mar 2009 15:12:05 -0700 Subject: [PATCH] ofp-print: Support printing NXAST_RESUBMIT Nicira action. --- lib/ofp-print.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index a036db5d..00d95260 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -203,8 +203,8 @@ static void ofp_print_port_name(struct ds *string, uint16_t port) 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); @@ -213,8 +213,18 @@ ofp_print_nx_action(struct ds *string, const struct nx_action_header *nah) } 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)); } } -- 2.30.2