diff options
| author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2008-06-04 15:13:00 +1000 |
|---|---|---|
| committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2008-06-04 15:13:00 +1000 |
| commit | 7d39ac131b520f309bc7b6ff05eac7be58a32f86 (patch) | |
| tree | 0f51fb02d4bee59d811d13447c037f7ba71d6942 /ctdb/include | |
| parent | 1c88f422d54798d22d1f933d04e82dc97cfdfdaf (diff) | |
| download | samba-7d39ac131b520f309bc7b6ff05eac7be58a32f86.tar.gz samba-7d39ac131b520f309bc7b6ff05eac7be58a32f86.tar.xz samba-7d39ac131b520f309bc7b6ff05eac7be58a32f86.zip | |
convert handling of gratious arps and their controls and helpers to
use the ctdb_sock_addr structure so tehy work for both ipv4 and ipv6
(This used to be ctdb commit 86d6f53512d358ff68b58dac737ffa7576c3cce6)
Diffstat (limited to 'ctdb/include')
| -rw-r--r-- | ctdb/include/ctdb_private.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 2d595ff3a2..8127fd1e06 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -567,9 +567,8 @@ struct ctdb_control_killtcp { /* struct holding a sockaddr_in and an interface name, - used for send_gratious_arp and also add/remove public addresses + used to add/remove public addresses */ -//struct ctdb_control_gratious_arp { struct ctdb_control_ip_iface { struct sockaddr_in sin; uint32_t mask; @@ -578,6 +577,17 @@ struct ctdb_control_ip_iface { }; /* + struct holding a ctdb_sock_addr and an interface name, + used for send_gratious_arp + */ +struct ctdb_control_gratious_arp { + ctdb_sock_addr addr; + uint32_t mask; + uint32_t len; + char iface[1]; +}; + +/* struct for tcp_add and tcp_remove controls */ struct ctdb_control_tcp_vnn { @@ -1166,7 +1176,7 @@ int ctdb_ctrl_get_public_ips(struct ctdb_context *ctdb, /* from takeover/system.c */ -int ctdb_sys_send_arp(const struct sockaddr_in *saddr, const char *iface); +int ctdb_sys_send_arp(const ctdb_sock_addr *addr, const char *iface); bool ctdb_sys_have_ip(struct sockaddr_in ip); int ctdb_sys_send_tcp(const ctdb_sock_addr *dest, const ctdb_sock_addr *src, @@ -1225,6 +1235,7 @@ int ctdb_ctrl_get_all_tunables(struct ctdb_context *ctdb, void ctdb_start_freeze(struct ctdb_context *ctdb); bool parse_ip_port(const char *s, ctdb_sock_addr *saddr); +bool parse_ip(const char *s, ctdb_sock_addr *saddr); int ctdb_sys_open_capture_socket(const char *iface, void **private_data); int ctdb_sys_close_capture_socket(void *private_data); @@ -1249,7 +1260,7 @@ int ctdb_ctrl_del_public_ip(struct ctdb_context *ctdb, int ctdb_ctrl_gratious_arp(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, - struct sockaddr_in *sin, + ctdb_sock_addr *addr, const char *ifname); int ctdb_ctrl_get_tcp_tickles(struct ctdb_context *ctdb, |
