summaryrefslogtreecommitdiff
path: root/tests/ofproto.at
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-12-06 10:20:20 -0800
committerBen Pfaff <blp@nicira.com>2010-12-06 10:20:20 -0800
commitd1e2cf211901ec64dc2f91ab5379a0ac2654ae62 (patch)
treedad69075fca37dcfa4315b718590a2237741c6c9 /tests/ofproto.at
parentc24750a10235af1be9fd9196fc026ab4626ba2d4 (diff)
downloadopenvswitch-d1e2cf211901ec64dc2f91ab5379a0ac2654ae62.tar.gz
Refactor and centralize basic OpenFlow message decoding and validation.
Open vSwitch contains a few different chunks of code that need to decode an OpenFlow message to determine its type and then validate that it is long enough. Until now, the code for doing this has been more or less scattered across the tree. Whenever a new piece of code needed to do this, it generally needed to reimplement at least part of it. This commit centralizes all of that work into a single function, ofputil_decode_msg_type(), and helper functions, and converts all of the code that was decoding messages by hand to use the new function.
Diffstat (limited to 'tests/ofproto.at')
-rw-r--r--tests/ofproto.at8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ofproto.at b/tests/ofproto.at
index 3a1efe2aa..b994950d4 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -24,11 +24,11 @@ AT_SETUP([ofproto - feature request, config request])
OFPROTO_START
AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout])
AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], [dnl
-features_reply: ver:0x1, dpid:fedcba9876543210
+OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210
n_tables:2, n_buffers:256
features: capabilities:0x87, actions:0xfff
LOCAL(br0): addr:aa:55:aa:55:00:00, config: 0x1, state:0x1
-get_config_reply: miss_send_len=0
+OFPT_GET_CONFIG_REPLY: miss_send_len=0
])
OFPROTO_STOP
AT_CLEANUP
@@ -46,11 +46,11 @@ do
AT_CHECK([ovs-ofctl -vANY:ANY:WARN mod-port br0 br0 $command])
AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout])
AT_CHECK_UNQUOTED([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], [dnl
-features_reply: ver:0x1, dpid:fedcba9876543210
+OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210
n_tables:2, n_buffers:256
features: capabilities:0x87, actions:0xfff
LOCAL(br0): addr:aa:55:aa:55:00:00, config: $config, state:$state
-get_config_reply: miss_send_len=0
+OFPT_GET_CONFIG_REPLY: miss_send_len=0
])
done
OFPROTO_STOP