summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/automake.mk3
-rw-r--r--lib/ovs-router-linux.h40
-rw-r--r--lib/ovs-router.c1
-rw-r--r--lib/ovs-router.h11
-rw-r--r--lib/route-table-bsd.c1
-rw-r--r--lib/route-table-stub.c3
-rw-r--r--lib/route-table.c1
7 files changed, 47 insertions, 13 deletions
diff --git a/lib/automake.mk b/lib/automake.mk
index 40c0241a8..783e6573b 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -159,6 +159,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 \
@@ -321,7 +322,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 000000000..f60f4034a
--- /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 f1f5d1124..2aa4a9a90 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 7992497bf..92d15c626 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 a285a57f6..9ebfaa3f4 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 4d2bd2cf3..b7686e4cc 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 b16831559..6261954a4 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"