return 0;
}
+/*
+ add a list of all tickle to a public address
+ */
+static int control_add_tickle(struct ctdb_context *ctdb, int argc, const char **argv)
+{
+ struct ctdb_control_tcp_vnn t;
+ TDB_DATA data;
+ int ret;
+
+ if (argc < 2) {
+ usage();
+ }
+
+ if (parse_ip_port(argv[0], &t.src) == 0) {
+ DEBUG(DEBUG_ERR,("Wrongly formed ip address '%s'\n", argv[0]));
+ return -1;
+ }
+ if (parse_ip_port(argv[1], &t.dest) == 0) {
+ DEBUG(DEBUG_ERR,("Wrongly formed ip address '%s'\n", argv[1]));
+ return -1;
+ }
+
+ data.dptr = (uint8_t *)&t;
+ data.dsize = sizeof(t);
+
+ /* tell all nodes about this tcp connection */
+ ret = ctdb_control(ctdb, options.pnn, 0, CTDB_CONTROL_TCP_ADD,
+ 0, data, ctdb, NULL, NULL, NULL, NULL);
+ if (ret != 0) {
+ DEBUG(DEBUG_ERR,("Failed to add tickle\n"));
+ return -1;
+ }
+
+ return 0;
+}
+
+
/*
get a list of all tickles for this pnn
*/
{ "gratiousarp", control_gratious_arp, false, false, "send a gratious arp", "<ip> <interface>" },
{ "tickle", tickle_tcp, false, false, "send a tcp tickle ack", "<srcip:port> <dstip:port>" },
{ "gettickles", control_get_tickles, false, false, "get the list of tickles registered for this ip", "<ip>" },
+ { "addtickle", control_add_tickle, false, false, "add a tickle for this ip", "<ip>:<port> <ip>:<port>" },
{ "regsrvid", regsrvid, false, false, "register a server id", "<pnn> <type> <id>" },
{ "unregsrvid", unregsrvid, false, false, "unregister a server id", "<pnn> <type> <id>" },