3 #include "ofp-version-opt.h"
4 #include "ovs-thread.h"
6 #include "dynamic-string.h"
8 VLOG_DEFINE_THIS_MODULE(ofp_version);
10 static uint32_t allowed_versions = 0;
13 get_allowed_ofp_versions(void)
15 return allowed_versions ? allowed_versions : OFPUTIL_DEFAULT_VERSIONS;
19 set_allowed_ofp_versions(const char *string)
21 assert_single_threaded();
22 allowed_versions = ofputil_versions_from_string(string);
26 mask_allowed_ofp_versions(uint32_t bitmap)
28 assert_single_threaded();
29 allowed_versions &= bitmap;
33 ofp_version_usage(void)
35 struct ds msg = DS_EMPTY_INITIALIZER;
37 ofputil_format_version_bitmap_names(&msg, OFPUTIL_DEFAULT_VERSIONS);
39 "\nOpen Flow Version options:\n"
40 " -V, --version display version information\n"
41 " -O, --protocols set allowed Open Flow versions\n"