[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/3] libxl: colo: move netlink related stuff to libxl_colo_proxy.c



They are only used there, no need to expose them to other parts of
libxl.

This is necessary to make libxl build on FreeBSD again because FreeBSD
doesn't have netlink.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxl/libxl_colo.h       | 12 ------------
 tools/libxl/libxl_colo_proxy.c | 13 +++++++++++++
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/tools/libxl/libxl_colo.h b/tools/libxl/libxl_colo.h
index 4f6a612..f0e438e 100644
--- a/tools/libxl/libxl_colo.h
+++ b/tools/libxl/libxl_colo.h
@@ -17,10 +17,6 @@
 #define LIBXL_COLO_H
 
 #include "libxl_internal.h"
-#include <linux/netlink.h>
-
-/* Consistent with the new COLO netlink channel in kernel side */
-#define NETLINK_COLO 28
 
 /* Maximum time(5s) to wait for colo proxy checkpoit */
 #define COLO_PROXY_CHECKPOINT_TIMEOUT 5000000
@@ -53,14 +49,6 @@ enum {
     LIBXL_COLO_RESUMED,
 };
 
-enum colo_netlink_op {
-    COLO_QUERY_CHECKPOINT = (NLMSG_MIN_TYPE + 1),
-    COLO_CHECKPOINT,
-    COLO_FAILOVER,
-    COLO_PROXY_INIT,
-    COLO_PROXY_RESET, /* UNUSED, will be used for continuous FT */
-};
-
 struct libxl__colo_device_nic {
     int devid;
     const char *vif;
diff --git a/tools/libxl/libxl_colo_proxy.c b/tools/libxl/libxl_colo_proxy.c
index 991bd0d..034e76c 100644
--- a/tools/libxl/libxl_colo_proxy.c
+++ b/tools/libxl/libxl_colo_proxy.c
@@ -17,6 +17,19 @@
 
 #include "libxl_internal.h"
 
+#include <linux/netlink.h>
+
+/* Consistent with the new COLO netlink channel in kernel side */
+#define NETLINK_COLO 28
+
+enum colo_netlink_op {
+    COLO_QUERY_CHECKPOINT = (NLMSG_MIN_TYPE + 1),
+    COLO_CHECKPOINT,
+    COLO_FAILOVER,
+    COLO_PROXY_INIT,
+    COLO_PROXY_RESET, /* UNUSED, will be used for continuous FT */
+};
+
 /* ========= colo-proxy: helper functions ========== */
 
 static int colo_proxy_send(libxl__colo_proxy_state *cps, uint8_t *buff,
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.