summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/rrdbot-get.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/rrdbot-get.c b/tools/rrdbot-get.c
index 0f84578..9b038dd 100644
--- a/tools/rrdbot-get.c
+++ b/tools/rrdbot-get.c
@@ -413,6 +413,7 @@ version()
int
main (int argc, char* argv[])
{
+ char *bind_address = NULL;
char ch;
char* t;
@@ -421,7 +422,7 @@ main (int argc, char* argv[])
ctx.timeout = DEFAULT_TIMEOUT;
/* Parse the arguments nicely */
- while ((ch = getopt (argc, argv, "m:Mnrt:vV")) != -1) {
+ while ((ch = getopt (argc, argv, "m:Mnrs:t:vV")) != -1) {
switch (ch)
{
@@ -445,6 +446,11 @@ main (int argc, char* argv[])
ctx.recursive = 1;
break;
+ /* local source address */
+ case 's':
+ bind_address = optarg;
+ break;
+
/* The timeout */
case 't':
ctx.timeout = strtoul (optarg, &t, 10);
@@ -478,7 +484,7 @@ main (int argc, char* argv[])
usage ();
server_init ();
- snmp_engine_init (MAX_RETRIES);
+ snmp_engine_init (bind_address, MAX_RETRIES);
parse_argument (argv[0]);