From 4232ef7755c2c791c398bddfadc62b1e6bcb82e4 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 27 Jun 2012 17:19:52 +0900 Subject: [PATCH] openflow: Add Open Flow 1.2 to ofp_to_string__() Signed-off-by: Simon Horman [blp@nicira.com fixed testsuite failure.] Signed-off-by: Ben Pfaff --- lib/ofp-print.c | 3 +++ tests/ofp-errors.at | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index cf9d93fa..5103c3e1 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1617,6 +1617,9 @@ ofp_to_string__(const struct ofp_header *oh, case OFP11_VERSION: ds_put_cstr(string, " (OF1.1)"); break; + case OFP12_VERSION: + ds_put_cstr(string, " (OF1.2)"); + break; default: ds_put_format(string, " (OF 0x%02"PRIx8")", oh->version); break; diff --git a/tests/ofp-errors.at b/tests/ofp-errors.at index 5f762942..331a8f8a 100644 --- a/tests/ofp-errors.at +++ b/tests/ofp-errors.at @@ -86,12 +86,12 @@ OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload ]) AT_KEYWORDS([ofp-print ofp-errors]) AT_CHECK([ovs-ofctl ofp-print '0301001455555555 00030005 0102000811111111'], [0], [dnl -OFPT_ERROR (OF 0x03) (xid=0x55555555): OFPBIC_BAD_EXPERIMENTER +OFPT_ERROR (OF1.2) (xid=0x55555555): OFPBIC_BAD_EXPERIMENTER OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload ]) AT_KEYWORDS([ofp-print ofp-errors]) AT_CHECK([ovs-ofctl ofp-print '0301001455555555 00030006 0102000811111111'], [0], [dnl -OFPT_ERROR (OF 0x03) (xid=0x55555555): OFPBIC_BAD_EXP_TYPE +OFPT_ERROR (OF1.2) (xid=0x55555555): OFPBIC_BAD_EXP_TYPE OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload ]) AT_CLEANUP -- 2.30.2