X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-print.c;h=7bdbc220dccaba4e94328a1bda94fd1bd64df849;hb=7257b535ab;hp=64712b5217bc7d125339658ef2eec2c8849618b7;hpb=4edb9ae90e4092f5f56b9d914d2b88783c49860d;p=sliver-openvswitch.git diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 64712b521..7bdbc220d 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -604,21 +604,9 @@ ofp_print_switch_config(struct ds *string, const struct ofp_switch_config *osc) flags = ntohs(osc->flags); - ds_put_cstr(string, " frags="); - switch (flags & OFPC_FRAG_MASK) { - case OFPC_FRAG_NORMAL: - ds_put_cstr(string, "normal"); - flags &= ~OFPC_FRAG_MASK; - break; - case OFPC_FRAG_DROP: - ds_put_cstr(string, "drop"); - flags &= ~OFPC_FRAG_MASK; - break; - case OFPC_FRAG_REASM: - ds_put_cstr(string, "reassemble"); - flags &= ~OFPC_FRAG_MASK; - break; - } + ds_put_format(string, " frags=%s", ofputil_frag_handling_to_string(flags)); + flags &= ~OFPC_FRAG_MASK; + if (flags) { ds_put_format(string, " ***unknown flags 0x%04"PRIx16"***", flags); }