ctdb-system: Use protocol/protocol.h instead of ctdb_private.h
[obnox/samba/samba-obnox.git] / ctdb / common / system_freebsd.c
index ed30f8ccb723caea29274c247fff7a74997f8c4e..e88e9e2b00fd415a4d2cac9748c6944e25b0f754 100644 (file)
   needs, and inspired by 'common/system_aix.c' for the pcap usage.
 */
 
-#include "includes.h"
+#include "replace.h"
 #include "system/network.h"
 #include "system/filesys.h"
 #include "system/wait.h"
-#include "../include/ctdb_private.h"
+
+#include "lib/util/debug.h"
+
+#include "protocol/protocol.h"
+
 #include <net/ethernet.h>
 #include <netinet/ip6.h>
 #include <net/if_arp.h>
 #include <pcap.h>
 
+#include "common/logging.h"
+#include "common/system.h"
 
 #ifndef ETHERTYPE_IP6
 #define ETHERTYPE_IP6 0x86dd
@@ -75,8 +81,8 @@ static uint16_t tcp_checksum6(uint16_t *data, size_t n, struct ip6_hdr *ip6)
  */
 int ctdb_sys_send_arp(const ctdb_sock_addr *addr, const char *iface)
 {
-       /* FIXME We dont do gratuitous arp on Hurd yet */
-       return 0;
+       /* FIXME FreeBSD: We don't do gratuitous arp yet */
+       return -1;
 }
 
 
@@ -214,7 +220,7 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
                        return -1;
 
                }
-               /* sendto() dont like if the port is set and the socket is
+               /* sendto() don't like if the port is set and the socket is
                   in raw mode.
                */
                tmpdest = discard_const(dest);
@@ -360,11 +366,12 @@ int ctdb_sys_read_tcp_packet(int s, void *private_data,
 
 bool ctdb_sys_check_iface_exists(const char *iface)
 {
+       /* FIXME FreeBSD: Interface always considered present */
        return true;
 }
 
 int ctdb_get_peer_pid(const int fd, pid_t *peer_pid)
 {
-       /* FIXME not implemented */
+       /* FIXME FreeBSD: get_peer_pid not implemented */
        return 1;
 }