2 #include "dynamic-string.h"
4 #include "ofp-version-opt.h"
5 #include "ovs-thread.h"
7 static uint32_t allowed_versions = 0;
10 get_allowed_ofp_versions(void)
12 return allowed_versions ? allowed_versions : OFPUTIL_DEFAULT_VERSIONS;
16 set_allowed_ofp_versions(const char *string)
18 assert_single_threaded();
19 allowed_versions = ofputil_versions_from_string(string);
23 mask_allowed_ofp_versions(uint32_t bitmap)
25 assert_single_threaded();
26 allowed_versions &= bitmap;
30 ofp_version_usage(void)
32 struct ds msg = DS_EMPTY_INITIALIZER;
34 ofputil_format_version_bitmap_names(&msg, OFPUTIL_DEFAULT_VERSIONS);
36 "\nOpen Flow Version options:\n"
37 " -V, --version display version information\n"
38 " -O, --protocols set allowed Open Flow versions\n"