{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},
VLOG_LONG_OPTIONS,
- STREAM_SSL_LONG_OPTIONS
+ STREAM_SSL_LONG_OPTIONS,
{0, 0, 0, 0},
};
char *short_options = long_options_to_short_options(long_options);
if (retval) {
va_list args;
- fprintf(stderr, "%s: ", program_name);
va_start(args, message);
- vfprintf(stderr, message, args);
- va_end(args);
- if (retval == EOF) {
- fputs(": unexpected end of file\n", stderr);
- } else {
- fprintf(stderr, ": %s\n", strerror(retval));
- }
-
- exit(EXIT_FAILURE);
+ ovs_fatal_valist(retval, message, args);
}
}
\f
if (try_set_flow_format(vconn, NXFF_NXM)) {
flow_format = NXFF_NXM;
- } else if (try_set_flow_format(vconn, NXFF_TUN_ID_FROM_COOKIE)) {
- flow_format = NXFF_TUN_ID_FROM_COOKIE;
} else {
flow_format = NXFF_OPENFLOW10;
}
parse_ofp_flow_stats_request_str(&fsr, aggregate, argc > 2 ? argv[2] : "");
open_vconn(argv[1], &vconn);
- min_flow_format = ofputil_min_flow_format(&fsr.match, false, 0);
+ min_flow_format = ofputil_min_flow_format(&fsr.match);
flow_format = negotiate_highest_flow_format(vconn, min_flow_format);
request = ofputil_encode_flow_stats_request(&fsr, flow_format);
dump_stats_transaction(argv[1], request);
OFPT_ECHO_REQUEST, &request);
random_bytes(rq_hdr + 1, payload);
- gettimeofday(&start, NULL);
+ xgettimeofday(&start);
run(vconn_transact(vconn, ofpbuf_clone(request), &reply), "transact");
- gettimeofday(&end, NULL);
+ xgettimeofday(&end);
rpy_hdr = reply->data;
if (reply->size != request->size
count, message_size, count * message_size);
open_vconn(argv[1], &vconn);
- gettimeofday(&start, NULL);
+ xgettimeofday(&start);
for (i = 0; i < count; i++) {
struct ofpbuf *request, *reply;
struct ofp_header *rq_hdr;
run(vconn_transact(vconn, request, &reply), "transact");
ofpbuf_delete(reply);
}
- gettimeofday(&end, NULL);
+ xgettimeofday(&end);
vconn_close(vconn);
duration = ((1000*(double)(end.tv_sec - start.tv_sec))
version->n_actions = actions.size / sizeof *version->actions;
version->actions = ofpbuf_steal_data(&actions);
- min_ff = ofputil_min_flow_format(&fm.cr, true, fm.cookie);
+ min_ff = ofputil_min_flow_format(&fm.cr);
min_flow_format = MAX(min_flow_format, min_ff);
check_final_format_for_flow_mod(min_flow_format);
struct ofputil_flow_stats fs;
int retval;
- retval = ofputil_decode_flow_stats_reply(&fs, reply,
- flow_format);
+ retval = ofputil_decode_flow_stats_reply(&fs, reply);
if (retval) {
if (retval != EOF) {
ovs_fatal(0, "parse error in reply");