summaryrefslogtreecommitdiff
path: root/build-aux/extract-ofp-msgs
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-11-09 09:55:12 -0800
committerBen Pfaff <blp@nicira.com>2012-11-09 10:01:42 -0800
commitcf7cf630e24dddba9177fcd68bcfa903689c7b72 (patch)
treef2e9e170b58ff92555bb5197fc5766a03210e262 /build-aux/extract-ofp-msgs
parent74c4b9c1c24b6579dcaa127268530af9bffa29b4 (diff)
downloadopenvswitch-cf7cf630e24dddba9177fcd68bcfa903689c7b72.tar.gz
ofp-msgs: Accept all versions of OpenFlow "hello" messages.
Since the ofp-msgs code was introduced, only "hello" messages for versions of OpenFlow actually understood (to some extent) by Open vSwitch could be decoded correctly. This commit corrects that, by making every version of OpenFlow immutable messages acceptable. Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'build-aux/extract-ofp-msgs')
-rwxr-xr-xbuild-aux/extract-ofp-msgs5
1 files changed, 3 insertions, 2 deletions
diff --git a/build-aux/extract-ofp-msgs b/build-aux/extract-ofp-msgs
index ad1a8a832..980728975 100755
--- a/build-aux/extract-ofp-msgs
+++ b/build-aux/extract-ofp-msgs
@@ -29,7 +29,8 @@ version_map = {"1.0": (OFP10_VERSION, OFP10_VERSION),
"1.2+": (OFP12_VERSION, OFP13_VERSION),
"1.3+": (OFP13_VERSION, OFP13_VERSION),
"1.0-1.1": (OFP10_VERSION, OFP11_VERSION),
- "1.0-1.2": (OFP10_VERSION, OFP12_VERSION)}
+ "1.0-1.2": (OFP10_VERSION, OFP12_VERSION),
+ "<all>": (0x01, 0xff)}
def get_line():
global line
@@ -104,7 +105,7 @@ def extract_ofp_msgs(output_file_name):
comment += ' %s' % line.lstrip('* \t').rstrip(' \t\r\n')
comment = comment[:-2].rstrip()
- m = re.match(r'([A-Z]+) ([-.+\d]+) \((\d+)\): ([^.]+)\.$', comment)
+ m = re.match(r'([A-Z]+) ([-.+\d]+|<all>) \((\d+)\): ([^.]+)\.$', comment)
if not m:
fatal("unexpected syntax between messages")
type_, versions, number, contents = m.groups()