Split the linux-specific part of ovs-router.h
into ovs-router-linux.h.

The breakage was introduced by
commit d9b4ebc5d15202bedad06969353435a4c1951c71
("route-table: Use classifier to store routing table.")

Signed-off-by: YAMAMOTO Takashi <yamam...@valinux.co.jp>
---
 lib/automake.mk        |  3 ++-
 lib/ovs-router-linux.h | 40 ++++++++++++++++++++++++++++++++++++++++
 lib/ovs-router.c       |  1 +
 lib/ovs-router.h       | 11 -----------
 lib/route-table-bsd.c  |  1 +
 lib/route-table-stub.c |  3 ++-
 lib/route-table.c      |  1 +
 7 files changed, 47 insertions(+), 13 deletions(-)
 create mode 100644 lib/ovs-router-linux.h

diff --git a/lib/automake.mk b/lib/automake.mk
index 1256af1..c6a4675 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -157,6 +157,7 @@ lib_libopenvswitch_la_SOURCES = \
        lib/ovs-atomic.h \
        lib/ovs-rcu.c \
        lib/ovs-rcu.h \
+       lib/ovs-router.h \
        lib/ovs-thread.c \
        lib/ovs-thread.h \
        lib/ovsdb-data.c \
@@ -319,7 +320,7 @@ lib_libopenvswitch_la_SOURCES += \
        lib/ovs-numa.c \
        lib/ovs-numa.h \
        lib/ovs-router.c \
-       lib/ovs-router.h \
+       lib/ovs-router-linux.h \
        lib/rtnetlink-link.c \
        lib/rtnetlink-link.h \
        lib/route-table.c \
diff --git a/lib/ovs-router-linux.h b/lib/ovs-router-linux.h
new file mode 100644
index 0000000..f60f403
--- /dev/null
+++ b/lib/ovs-router-linux.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2014 Nicira, Inc.
+ *
+ * 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 OVS_TNL_ROUTER_LINUX_H
+#define OVS_TNL_ROUTER_LINUX_H 1
+
+#include <stddef.h>
+#include <stdint.h>
+#include <net/if.h>
+
+#include "packets.h"
+#include "timeval.h"
+#include "unixctl.h"
+#include "util.h"
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+void ovs_router_insert(ovs_be32 ip_dst, uint8_t plen, const char 
output_bridge[],
+                       ovs_be32 gw);
+void ovs_router_flush(void);
+#ifdef  __cplusplus
+}
+#endif
+
+#endif
diff --git a/lib/ovs-router.c b/lib/ovs-router.c
index f1f5d11..2aa4a9a 100644
--- a/lib/ovs-router.c
+++ b/lib/ovs-router.c
@@ -34,6 +34,7 @@
 #include "netdev.h"
 #include "packets.h"
 #include "ovs-router.h"
+#include "ovs-router-linux.h"
 #include "unixctl.h"
 #include "util.h"
 
diff --git a/lib/ovs-router.h b/lib/ovs-router.h
index 7992497..92d15c6 100644
--- a/lib/ovs-router.h
+++ b/lib/ovs-router.h
@@ -17,13 +17,6 @@
 #ifndef OVS_TNL_ROUTER_H
 #define OVS_TNL_ROUTER_H 1
 
-#include <stddef.h>
-#include <stdint.h>
-#include <net/if.h>
-
-#include "packets.h"
-#include "timeval.h"
-#include "unixctl.h"
 #include "util.h"
 
 #ifdef  __cplusplus
@@ -31,10 +24,6 @@ extern "C" {
 #endif
 
 bool ovs_router_lookup(ovs_be32 ip_dst, char out_dev[], ovs_be32 *gw);
-void ovs_router_insert(ovs_be32 ip_dst, uint8_t plen, const char 
output_bridge[],
-                       ovs_be32 gw);
-void ovs_router_flush(void);
-
 void ovs_router_unixctl_register(void);
 #ifdef  __cplusplus
 }
diff --git a/lib/route-table-bsd.c b/lib/route-table-bsd.c
index a285a57..9ebfaa3 100644
--- a/lib/route-table-bsd.c
+++ b/lib/route-table-bsd.c
@@ -29,6 +29,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "ovs-router.h"
 #include "util.h"
 
 static int pid;
diff --git a/lib/route-table-stub.c b/lib/route-table-stub.c
index 4d2bd2c..b7686e4 100644
--- a/lib/route-table-stub.c
+++ b/lib/route-table-stub.c
@@ -13,9 +13,10 @@
  * limitations under the License. */
 
 #include <config.h>
-#include "route-table.h"
 
 #include "compiler.h"
+#include "ovs-router.h"
+#include "route-table.h"
 
 bool
 ovs_router_lookup(ovs_be32 ip_dst OVS_UNUSED, char output_bridge[] OVS_UNUSED,
diff --git a/lib/route-table.c b/lib/route-table.c
index b168315..6261954 100644
--- a/lib/route-table.c
+++ b/lib/route-table.c
@@ -30,6 +30,7 @@
 #include "netlink-socket.h"
 #include "ofpbuf.h"
 #include "ovs-router.h"
+#include "ovs-router-linux.h"
 #include "rtnetlink-link.h"
 #include "vlog.h"
 
-- 
1.9.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to