#include <talloc.h>
-/* From system_common.c */
-
-uint32_t uint16_checksum(uint16_t *data, size_t n);
-bool ctdb_sys_have_ip(ctdb_sock_addr *_addr);
-
/* From system_<os>.c */
int ctdb_sys_send_arp(const ctdb_sock_addr *addr, const char *iface);
#include "common/logging.h"
#include "common/system.h"
+#include "common/system_socket.h"
#if 0
#include "common/logging.h"
#include "common/system.h"
+#include "common/system_socket.h"
#ifndef ETHERTYPE_IP6
#define ETHERTYPE_IP6 0x86dd
#include "common/logging.h"
#include "common/system.h"
+#include "common/system_socket.h"
#ifndef ETHERTYPE_IP6
#define ETHERTYPE_IP6 0x86dd
#include "common/logging.h"
#include "common/system.h"
+#include "common/system_socket.h"
#ifndef ETHERTYPE_IP6
#define ETHERTYPE_IP6 0x86dd
#include "common/logging.h"
#include "common/system.h"
+#include "common/system_socket.h"
#ifndef ETHERTYPE_IP6
#define ETHERTYPE_IP6 0x86dd
-/*
+/*
ctdb system specific code to manage raw sockets on linux
Copyright (C) Ronnie Sahlberg 2007
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "protocol/protocol.h"
#include "common/logging.h"
-#include "common/system.h"
+#include "common/system_socket.h"
/*
uint16 checksum for n bytes
return sum;
}
-/*
- see if we currently have an interface with the given IP
- we try to bind to it, and if that fails then we don't have that IP
- on an interface
+/*
+ * See if the given IP is currently on an interface
*/
bool ctdb_sys_have_ip(ctdb_sock_addr *_addr)
{
--- /dev/null
+/*
+ System specific network code
+
+ Copyright (C) Amitay Isaacs 2015
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __CTDB_SYSTEM_SOCKET_H__
+#define __CTDB_SYSTEM_SOCKET_H__
+
+#include "protocol/protocol.h"
+
+uint32_t uint16_checksum(uint16_t *data, size_t n);
+bool ctdb_sys_have_ip(ctdb_sock_addr *addr);
+
+#endif /* __CTDB_SYSTEM_SOCKET_H__ */
#include "ctdb_private.h"
#include "ctdb_client.h"
-#include "common/system.h"
+#include "common/system_socket.h"
#include "common/common.h"
#include "common/logging.h"
#include "common/rb_tree.h"
#include "common/reqid.h"
#include "common/system.h"
+#include "common/system_socket.h"
#include "common/common.h"
#include "common/logging.h"
#include "protocol/protocol_api.h"
#include "protocol/protocol_util.h"
#include "common/system.h"
+#include "common/system_socket.h"
#include "client/client.h"
#include "client/client_sync.h"
bld.SAMBA_SUBSYSTEM('ctdb-system',
source=bld.SUBDIR('common',
- 'system_common.c system_util.c') +
+ 'system_socket.c system.c') +
CTDB_SYSTEM_SRC,
includes='include',
deps='replace talloc tevent tdb pcap samba-util')