[ovs-dev] [next 20/35] ofproto: Move private definitions to separate header.
Ben Pfaff
blp at nicira.com
Tue Apr 26 16:24:46 UTC 2011
---
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 18aa7e6..ef45e9f 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 4d9e758..ef9a61c 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 bf57b9f..197e518 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 e75d19e..5f3b9bf 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 f32f88a..c2f7386 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 4860ba3..2e01fba 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 0000000..f75152e
--- /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 */
--
1.7.4.4
More information about the dev
mailing list