ofproto: Move private definitions to separate header.
authorBen Pfaff <blp@nicira.com>
Thu, 14 Apr 2011 20:16:47 +0000 (13:16 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 4 May 2011 17:20:42 +0000 (10:20 -0700)
ofproto/automake.mk
ofproto/connmgr.c
ofproto/fail-open.c
ofproto/in-band.c
ofproto/ofproto.c
ofproto/ofproto.h
ofproto/private.h [new file with mode: 0644]

index 18aa7e6..ef45e9f 100644 (file)
@@ -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
index 4d9e758..ef9a61c 100644 (file)
@@ -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"
index bf57b9f..197e518 100644 (file)
@@ -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"
index e75d19e..5f3b9bf 100644 (file)
@@ -35,6 +35,7 @@
 #include "openflow/openflow.h"
 #include "packets.h"
 #include "poll-loop.h"
+#include "private.h"
 #include "timeval.h"
 #include "vlog.h"
 
index 45c5125..49f6645 100644 (file)
@@ -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"
index 4860ba3..2e01fba 100644 (file)
@@ -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 (file)
index 0000000..f75152e
--- /dev/null
@@ -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 */