From: Ben Pfaff Date: Tue, 10 Mar 2009 22:12:05 +0000 (-0700) Subject: ofp-print: Support printing NXAST_RESUBMIT Nicira action. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1c1b8260ee4cce636abe0fcf8fe8ca12984c4e0;p=openvswitch ofp-print: Support printing NXAST_RESUBMIT Nicira action. --- 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)); } }