Merge branch '1.3' of 10.1.1.27:/shared/ctdb/ctdb-git into 1.3
[sahlberg/ctdb.git] / common / system_aix.c
index 8fe630d8a39e04bf86bc2e54345e3f8a7dc52cff..5fe54130d423595d34523c71a120a4a20d850093 100644 (file)
@@ -66,23 +66,6 @@ int ctdb_sys_open_sending_socket(void)
 }
 #endif
 
-/*
-  uint16 checksum for n bytes
- */
-static uint32_t uint16_checksum(uint16_t *data, size_t n)
-{
-       uint32_t sum=0;
-       while (n>=2) {
-               sum += (uint32_t)ntohs(*data);
-               data++;
-               n -= 2;
-       }
-       if (n == 1) {
-               sum += (uint32_t)ntohs(*(uint8_t *)data);
-       }
-       return sum;
-}
-
 /*
   simple TCP checksum - assumes data is multiple of 2 bytes long
  */
@@ -187,31 +170,6 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
        return 0;
 }
 
-
-/*
-  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
- */
-bool ctdb_sys_have_ip(ctdb_sock_addr *addr)
-{
-       int s;
-       int ret;
-       
-       addr->ip.sin_port = 0;
-       s = socket(addr->sa.sa_family, SOCK_STREAM, IPPROTO_TCP);
-       if (s == -1) {
-               return false;
-       }
-       ret = bind(s, (struct sockaddr *)addr, sizeof(ctdb_sock_addr));
-       close(s);
-       return ret == 0;
-}
-
-
-
-
 /* This function is used to open a raw socket to capture from
  */
 int ctdb_sys_open_capture_socket(const char *iface, void **private_data)