2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-13 14:07:02 +00:00
Files
openvswitch/lib/ofp-version-opt.h
Ben Pfaff 37923ac734 ovs-ofctl: Reject impossible protocols configurations at startup.
The -O and -F options interact, so that it's possible to select only
flow formats that are not supported on a given OpenFlow version.  It seems
best to report these problems up front rather than failing in a more
mysterious way later.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Simon Horman <horms@verge.net.au>
2012-11-29 08:04:56 -08:00

27 lines
965 B
C

#ifndef OFP_VERSION_H
#define OFP_VERSION_H 1
#include <openflow/openflow-common.h>
#include "util.h"
#include "ofp-util.h"
#define OFP_VERSION_LONG_OPTIONS \
{"version", no_argument, NULL, 'V'}, \
{"protocols", required_argument, NULL, 'O'}
#define OFP_VERSION_OPTION_HANDLERS \
case 'V': \
ovs_print_version(OFP10_VERSION, OFP13_VERSION); \
exit(EXIT_SUCCESS); \
\
case 'O': \
set_allowed_ofp_versions(optarg); \
break;
uint32_t get_allowed_ofp_versions(void);
void set_allowed_ofp_versions(const char *string);
void mask_allowed_ofp_versions(uint32_t);
void ofp_version_usage(void);
#endif