diff options
author | Ben Pfaff <blp@nicira.com> | 2012-01-12 15:48:19 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-01-12 15:54:25 -0800 |
commit | 90bf1e0732ac9b11dd51ca856b635cac1f0269c1 (patch) | |
tree | 05e5852229f3b6f85218a74f9401b3b765459599 /lib/learn.h | |
parent | e25c55d28f30b537aa657797c41483a9bab59b93 (diff) |
Better abstract OpenFlow error codes.
This commit switches from using the actual protocol values of error codes
internally in Open vSwitch, to using abstract values that are translated to
and from protocol values at message parsing and serialization time. I
believe that this makes the code easier to read and to write.
This is also one step along the way toward OpenFlow 1.1 support because
OpenFlow 1.1 renumbered a bunch of error codes.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/learn.h')
-rw-r--r-- | lib/learn.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/learn.h b/lib/learn.h index 19a9089c..b83bee20 100644 --- a/lib/learn.h +++ b/lib/learn.h @@ -17,6 +17,8 @@ #ifndef LEARN_H #define LEARN_H 1 +#include "ofp-errors.h" + struct ds; struct flow; struct ofpbuf; @@ -28,7 +30,7 @@ struct nx_action_learn; * See include/openflow/nicira-ext.h for NXAST_LEARN specification. */ -int learn_check(const struct nx_action_learn *, const struct flow *); +enum ofperr learn_check(const struct nx_action_learn *, const struct flow *); void learn_execute(const struct nx_action_learn *, const struct flow *, struct ofputil_flow_mod *); |