X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-print.c;h=f3758ce4d6e5b186e7a1bd278eb251a651d2138f;hb=a7349929fb86d41f2e2ef77395e33b21f9457d48;hp=5f55da3b7560d9338925a5c7d00043caab053b0b;hpb=7c1a76a4673be09de56743400dfb1d1c8d8d0799;p=sliver-openvswitch.git diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 5f55da3b7..f3758ce4d 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -177,6 +177,7 @@ ofp_print_action(struct ds *s, const union ofp_action *a, const struct nx_action_autopath *naa; const struct nx_action_output_reg *naor; const struct nx_action_fin_timeout *naft; + const struct nx_action_controller *nac; struct mf_subfield subfield; uint16_t port; @@ -354,6 +355,23 @@ ofp_print_action(struct ds *s, const union ofp_action *a, ds_put_char(s, ')'); break; + case OFPUTIL_NXAST_CONTROLLER: + nac = (const struct nx_action_controller *) a; + ds_put_cstr(s, "controller("); + if (nac->reason != OFPR_ACTION) { + ds_put_format(s, "reason=%s,", + ofputil_packet_in_reason_to_string(nac->reason)); + } + if (nac->max_len != htons(UINT16_MAX)) { + ds_put_format(s, "max_len=%"PRIu16",", ntohs(nac->max_len)); + } + if (nac->controller_id != htons(0)) { + ds_put_format(s, "id=%"PRIu16",", ntohs(nac->controller_id)); + } + ds_chomp(s, ','); + ds_put_char(s, ')'); + break; + default: break; } @@ -1391,6 +1409,13 @@ ofp_print_nxt_set_async_config(struct ds *string, } } +static void +ofp_print_nxt_set_controller_id(struct ds *string, + const struct nx_controller_id *nci) +{ + ds_put_format(string, " id=%"PRIu16, ntohs(nci->controller_id)); +} + static void ofp_to_string__(const struct ofp_header *oh, const struct ofputil_msg_type *type, struct ds *string, @@ -1550,6 +1575,10 @@ ofp_to_string__(const struct ofp_header *oh, case OFPUTIL_NXT_FLOW_AGE: break; + case OFPUTIL_NXT_SET_CONTROLLER_ID: + ofp_print_nxt_set_controller_id(string, msg); + break; + case OFPUTIL_NXT_SET_ASYNC_CONFIG: ofp_print_nxt_set_async_config(string, msg); break;