projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Purge through the control socket
[tinc]
/
src
/
tincctl.c
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
4982e6b
..
56179c6
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-89,6
+89,7
@@
static void usage(bool status) {
" subnets - all known subnets in the VPN\n"
" connections - all meta connections with ourself\n"
" graph - graph of the VPN in dotty format\n"
" subnets - all known subnets in the VPN\n"
" connections - all meta connections with ourself\n"
" graph - graph of the VPN in dotty format\n"
+ " purge Purge unreachable nodes\n"
"\n"));
printf(_("Report bugs to tinc@tinc-vpn.org.\n"));
}
"\n"));
printf(_("Report bugs to tinc@tinc-vpn.org.\n"));
}
@@
-578,6
+579,10
@@
int main(int argc, char *argv[], char *envp[]) {
return 1;
}
return 1;
}
+ if(!strcasecmp(argv[optind], "purge")) {
+ return send_ctl_request_cooked(fd, REQ_PURGE, NULL, 0) != -1;
+ }
+
fprintf(stderr, _("Unknown command `%s'.\n"), argv[optind]);
usage(true);
fprintf(stderr, _("Unknown command `%s'.\n"), argv[optind]);
usage(true);