ofp-msgs: New approach to encoding and decoding OpenFlow headers.
authorBen Pfaff <blp@nicira.com>
Fri, 20 Jul 2012 06:23:17 +0000 (23:23 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 31 Jul 2012 04:09:12 +0000 (21:09 -0700)
commit982697a4d24caa0a3bdaf85db67619338b382e50
tree028e7fd69f9f836f2785b5096d78eb8046568a80
parent4b3b8d8fa14bbe4000c6591eef74e0a0d51a3929
ofp-msgs: New approach to encoding and decoding OpenFlow headers.

OpenFlow headers are not as uniform as they could be, with size, alignment,
and numbering changes from one version to another and across varieties
(e.g. ordinary messages vs. "stats" messages).  Until now the Open vSwitch
internal APIs haven't done a good job of abstracting those differences in
header formats.  This commit changes that; from this commit forward very
little code actually needs to understand the header format or numbering.
Instead, it can just encode or decode, or pull or put, the header using
a more abstract API using the ofpraw_, ofptype_, and other APIs in the
new ofp-msgs module.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Tested-by: Simon Horman <horms@verge.net.au>
Reviewed-by: Simon Horman <horms@verge.net.au>
26 files changed:
build-aux/extract-ofp-msgs [new file with mode: 0755]
include/openflow/nicira-ext.h
include/openflow/openflow-1.0.h
include/openflow/openflow-1.1.h
include/openflow/openflow-1.2.h
include/openflow/openflow-common.h
lib/.gitignore
lib/automake.mk
lib/learning-switch.c
lib/ofp-errors.c
lib/ofp-errors.h
lib/ofp-msgs.c [new file with mode: 0644]
lib/ofp-msgs.h [new file with mode: 0644]
lib/ofp-print.c
lib/ofp-util.c
lib/ofp-util.h
lib/rconn.c
lib/stream.c
lib/vconn.c
ofproto/connmgr.c
ofproto/ofproto.c
tests/ofp-print.at
tests/ofproto-dpif.at
tests/ofproto-macros.at
tests/test-vconn.c
utilities/ovs-ofctl.c