From d08a2e920631099d68f4efd4e72f6c14987520ce Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 14 Apr 2011 13:16:47 -0700 Subject: [PATCH] ofproto: Move private definitions to separate header. --- ofproto/automake.mk | 3 ++- ofproto/connmgr.c | 1 + ofproto/fail-open.c | 1 + ofproto/in-band.c | 1 + ofproto/ofproto.c | 1 + ofproto/ofproto.h | 6 ------ ofproto/private.h | 29 +++++++++++++++++++++++++++++ 7 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 ofproto/private.h diff --git a/ofproto/automake.mk b/ofproto/automake.mk index 18aa7e6c..ef45e9f2 100644 --- a/ofproto/automake.mk +++ b/ofproto/automake.mk @@ -24,6 +24,7 @@ ofproto_libofproto_a_SOURCES = \ ofproto/pktbuf.c \ ofproto/pktbuf.h \ ofproto/pinsched.c \ - ofproto/pinsched.h + ofproto/pinsched.h \ + ofproto/private.h EXTRA_DIST += ofproto/ofproto-unixctl.man diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 4d9e7582..ef9a61c7 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -31,6 +31,7 @@ #include "pinsched.h" #include "poll-loop.h" #include "pktbuf.h" +#include "private.h" #include "rconn.h" #include "shash.h" #include "timeval.h" diff --git a/ofproto/fail-open.c b/ofproto/fail-open.c index bf57b9fc..197e5183 100644 --- a/ofproto/fail-open.c +++ b/ofproto/fail-open.c @@ -28,6 +28,7 @@ #include "ofproto.h" #include "pktbuf.h" #include "poll-loop.h" +#include "private.h" #include "rconn.h" #include "timeval.h" #include "vconn.h" diff --git a/ofproto/in-band.c b/ofproto/in-band.c index e75d19ea..5f3b9bfe 100644 --- a/ofproto/in-band.c +++ b/ofproto/in-band.c @@ -35,6 +35,7 @@ #include "openflow/openflow.h" #include "packets.h" #include "poll-loop.h" +#include "private.h" #include "timeval.h" #include "vlog.h" diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 45c51253..49f6645e 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -54,6 +54,7 @@ #include "pinsched.h" #include "pktbuf.h" #include "poll-loop.h" +#include "private.h" #include "rconn.h" #include "shash.h" #include "sset.h" diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h index 4860ba36..2e01fba6 100644 --- a/ofproto/ofproto.h +++ b/ofproto/ofproto.h @@ -182,12 +182,6 @@ void ofproto_get_all_flows(struct ofproto *p, struct ds *); void ofproto_get_netflow_ids(const struct ofproto *, uint8_t *engine_type, uint8_t *engine_id); -/* Functions for use by ofproto implementation modules, not by clients. */ -void ofproto_add_flow(struct ofproto *, const struct cls_rule *, - const union ofp_action *, size_t n_actions); -void ofproto_delete_flow(struct ofproto *, const struct cls_rule *); -void ofproto_flush_flows(struct ofproto *); - /* Hooks for ovs-vswitchd. */ struct ofhooks { bool (*normal_cb)(const struct flow *, const struct ofpbuf *packet, diff --git a/ofproto/private.h b/ofproto/private.h new file mode 100644 index 00000000..f75152e2 --- /dev/null +++ b/ofproto/private.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2009, 2010, 2011 Nicira Networks. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OFPROTO_PRIVATE_H +#define OFPROTO_PRIVATE_H 1 + +/* Definitions for use within ofproto. */ + +#include "ofproto/ofproto.h" + +void ofproto_add_flow(struct ofproto *, const struct cls_rule *, + const union ofp_action *, size_t n_actions); +void ofproto_delete_flow(struct ofproto *, const struct cls_rule *); +void ofproto_flush_flows(struct ofproto *); + +#endif /* ofproto/private.h */ -- 2.30.2