}
struct ofpbuf *
-ofputil_make_set_packet_in_format(enum nx_packet_in_format packet_in_format)
+ofputil_make_set_packet_in_format(enum ofp_version ofp_version,
+ enum nx_packet_in_format packet_in_format)
{
struct nx_set_packet_in_format *spif;
struct ofpbuf *msg;
- msg = ofpraw_alloc(OFPRAW_NXT_SET_PACKET_IN_FORMAT, OFP10_VERSION, 0);
+ msg = ofpraw_alloc(OFPRAW_NXT_SET_PACKET_IN_FORMAT, ofp_version, 0);
spif = ofpbuf_put_zeros(msg, sizeof *spif);
spif->format = htonl(packet_in_format);
bool ofputil_packet_in_format_is_valid(enum nx_packet_in_format);
int ofputil_packet_in_format_from_string(const char *);
const char *ofputil_packet_in_format_to_string(enum nx_packet_in_format);
-struct ofpbuf *ofputil_make_set_packet_in_format(enum nx_packet_in_format);
+struct ofpbuf *ofputil_make_set_packet_in_format(enum ofp_version,
+ enum nx_packet_in_format);
/* NXT_FLOW_MOD_TABLE_ID extension. */
struct ofpbuf *ofputil_make_flow_mod_table_id(bool flow_mod_table_id);
set_packet_in_format(struct vconn *vconn,
enum nx_packet_in_format packet_in_format)
{
- struct ofpbuf *spif = ofputil_make_set_packet_in_format(packet_in_format);
+ struct ofpbuf *spif;
+
+ spif = ofputil_make_set_packet_in_format(vconn_get_version(vconn),
+ packet_in_format);
transact_noreply(vconn, spif);
VLOG_DBG("%s: using user-specified packet in format %s",
vconn_get_name(vconn),
} else {
struct ofpbuf *spif, *reply;
- spif = ofputil_make_set_packet_in_format(NXPIF_NXM);
+ spif = ofputil_make_set_packet_in_format(vconn_get_version(vconn),
+ NXPIF_NXM);
run(vconn_transact_noreply(vconn, spif, &reply),
"talking to %s", vconn_get_name(vconn));
if (reply) {