error = parse_ofp_flow_stats_request_str(&fsr, aggregate,
argc > 2 ? argv[2] : "",
- &usable_protocols,
- !(allowed_protocols
- & OFPUTIL_P_OF10_ANY));
+ &usable_protocols);
if (error) {
ovs_fatal(0, "%s", error);
}
char *error;
error = parse_ofp_flow_mod_file(argv[2], command, &fms, &n_fms,
- &usable_protocols,
- !(allowed_protocols & OFPUTIL_P_OF10_ANY));
+ &usable_protocols);
if (error) {
ovs_fatal(0, "%s", error);
}
enum ofputil_protocol usable_protocols;
error = parse_ofp_flow_mod_str(&fm, argc > 2 ? argv[2] : "", command,
- &usable_protocols,
- !(allowed_protocols
- & OFPUTIL_P_OF10_ANY));
+ &usable_protocols);
if (error) {
ovs_fatal(0, "%s", error);
}
length = ntohs(oh->length);
if (length < sizeof *oh) {
- ovs_fatal(0, "%s: %zu-byte message is too short for OpenFlow",
+ ovs_fatal(0, "%s: %"PRIuSIZE"-byte message is too short for OpenFlow",
filename, length);
}
payload = argc > 2 ? atoi(argv[2]) : 64;
if (payload > max_payload) {
- ovs_fatal(0, "payload must be between 0 and %zu bytes", max_payload);
+ ovs_fatal(0, "payload must be between 0 and %"PRIuSIZE" bytes", max_payload);
}
open_vconn(argv[1], &vconn);
printf("Reply:\n");
ofp_print(stdout, reply, reply->size, verbosity + 2);
}
- printf("%zu bytes from %s: xid=%08"PRIx32" time=%.1f ms\n",
+ printf("%"PRIuSIZE" bytes from %s: xid=%08"PRIx32" time=%.1f ms\n",
reply->size, argv[1], ntohl(rpy_hdr->xid),
(1000*(double)(end.tv_sec - start.tv_sec))
+ (.001*(end.tv_usec - start.tv_usec)));
payload_size = atoi(argv[2]);
if (payload_size > max_payload) {
- ovs_fatal(0, "payload must be between 0 and %zu bytes", max_payload);
+ ovs_fatal(0, "payload must be between 0 and %"PRIuSIZE" bytes", max_payload);
}
message_size = sizeof(struct ofp_header) + payload_size;
char *error;
enum ofputil_protocol usable;
- error = parse_ofp_str(&fm, OFPFC_ADD, ds_cstr(&s), &usable,
- !(allowed_protocols & OFPUTIL_P_OF10_ANY));
+ error = parse_ofp_str(&fm, OFPFC_ADD, ds_cstr(&s), &usable);
if (error) {
ovs_fatal(0, "%s:%d: %s", filename, line_number, error);
}
struct ofputil_flow_mod fm;
char *error;
- error = parse_ofp_flow_mod_str(&fm, argv[1], OFPFC_ADD, &usable_protocols,
- !(allowed_protocols & OFPUTIL_P_OF10_ANY));
+ error = parse_ofp_flow_mod_str(&fm, argv[1], OFPFC_ADD, &usable_protocols);
if (error) {
ovs_fatal(0, "%s", error);
}
char *error;
error = parse_ofp_flow_mod_file(argv[1], OFPFC_ADD, &fms, &n_fms,
- &usable_protocols,
- !(allowed_protocols & OFPUTIL_P_OF10_ANY));
+ &usable_protocols);
if (error) {
ovs_fatal(0, "%s", error);
}
for (i = 0; i < MIN(a_len, b_len); i++) {
if (a[i] != b[i]) {
- printf("%s%2zu: %02"PRIx8" -> %02"PRIx8"\n",
+ printf("%s%2"PRIuSIZE": %02"PRIx8" -> %02"PRIx8"\n",
prefix, i, a[i], b[i]);
}
}
for (i = a_len; i < b_len; i++) {
- printf("%s%2zu: (none) -> %02"PRIx8"\n", prefix, i, b[i]);
+ printf("%s%2"PRIuSIZE": (none) -> %02"PRIx8"\n", prefix, i, b[i]);
}
for (i = b_len; i < a_len; i++) {
- printf("%s%2zu: %02"PRIx8" -> (none)\n", prefix, i, a[i]);
+ printf("%s%2"PRIuSIZE": %02"PRIx8" -> (none)\n", prefix, i, a[i]);
}
}
ovs_fatal(0, "Trailing garbage in hex data");
}
if (match_expout.size != sizeof(struct ofp10_match)) {
- ovs_fatal(0, "Input is %zu bytes, expected %zu",
+ ovs_fatal(0, "Input is %"PRIuSIZE" bytes, expected %"PRIuSIZE,
match_expout.size, sizeof(struct ofp10_match));
}
ovs_fatal(0, "Trailing garbage in hex data");
}
if (match_in.size != sizeof(struct ofp10_match)) {
- ovs_fatal(0, "Input is %zu bytes, expected %zu",
+ ovs_fatal(0, "Input is %"PRIuSIZE" bytes, expected %"PRIuSIZE,
match_in.size, sizeof(struct ofp10_match));
}
ovs_fatal(0, "Trailing garbage in hex data");
}
if (match_in.size != sizeof(struct ofp11_match)) {
- ovs_fatal(0, "Input is %zu bytes, expected %zu",
+ ovs_fatal(0, "Input is %"PRIuSIZE" bytes, expected %"PRIuSIZE,
match_in.size, sizeof(struct ofp11_match));
}
/* Verify actions, enforce consistency. */
struct flow flow;
memset(&flow, 0, sizeof flow);
- error = ofpacts_check(ofpacts.data, ofpacts.size, &flow,
- true, OFPP_MAX,
- table_id ? atoi(table_id) : 0, 255);
+ error = ofpacts_check_consistency(ofpacts.data, ofpacts.size,
+ &flow, OFPP_MAX,
+ table_id ? atoi(table_id) : 0,
+ 255, OFPUTIL_P_OF11_STD);
}
if (error) {
printf("bad OF1.1 instructions: %s\n\n", ofperr_get_name(error));
string_s = match_to_string(&match, OFP_DEFAULT_PRIORITY);
printf("%s -> ", string_s);
fflush(stdout);
- error_s = parse_ofp_str(&fm, -1, string_s, &usable_protocols,
- !(allowed_protocols & OFPUTIL_P_OF10_ANY));
+ error_s = parse_ofp_str(&fm, -1, string_s, &usable_protocols);
if (error_s) {
ovs_fatal(0, "%s", error_s);
}