ofputil_capabilities_to_name, ' ');
ds_put_char(string, '\n');
- ds_put_cstr(string, "actions: ");
- ofp_print_bit_names(string, features.actions,
- ofputil_action_bitmap_to_name, ' ');
- ds_put_char(string, '\n');
+ switch ((enum ofp_version)oh->version) {
+ case OFP10_VERSION:
+ ds_put_cstr(string, "actions: ");
+ ofp_print_bit_names(string, features.actions,
+ ofputil_action_bitmap_to_name, ' ');
+ ds_put_char(string, '\n');
+ break;
+ case OFP11_VERSION:
+ case OFP12_VERSION:
+ break;
+ default:
+ NOT_REACHED();
+ }
ofp_print_phy_ports(string, oh->version, &b);
}
if (osf->capabilities & htonl(OFPC11_GROUP_STATS)) {
features->capabilities |= OFPUTIL_C_GROUP_STATS;
}
- features->actions = decode_action_bits(osf->actions, of11_action_bits);
+ switch ((enum ofp_version)oh->version) {
+ case OFP11_VERSION:
+ case OFP12_VERSION:
+ features->actions = decode_action_bits(htonl(UINT32_MAX),
+ of11_action_bits);
+ break;
+ case OFP10_VERSION:
+ default:
+ NOT_REACHED();
+ }
} else {
return OFPERR_OFPBRC_BAD_VERSION;
}
if (features->capabilities & OFPUTIL_C_GROUP_STATS) {
osf->capabilities |= htonl(OFPC11_GROUP_STATS);
}
- osf->actions = encode_action_bits(features->actions, of11_action_bits);
break;
default:
NOT_REACHED();
OFPT_FEATURES_REPLY (OF1.1) (xid=0x1): dpid:0000505400000001
n_tables:2, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS ARP_MATCH_IP
-actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST SET_NW_ECN SET_NW_TOS SET_TP_SRC SET_TP_DST COPY_TTL_OUT COPY_TTL_IN SET_MPLS_LABEL SET_MPLS_TC SET_MPLS_TTL
3(eth0): addr:50:54:00:00:00:01
config: 0
state: 0