X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fmain.c;h=d1351ddc080f9c76a761023f1f43fb2e288975b6;hb=a76733ea91c6a1d42dfbb50631fa214cc284c3bf;hp=a4c1c12b3182045174f8af9e8ee0c106d6e8bcc9;hpb=14a67bc74c81651015bbbad075f7eb1c41218cf7;p=umurmur.git diff --git a/src/main.c b/src/main.c index a4c1c12..d1351dd 100644 --- a/src/main.c +++ b/src/main.c @@ -51,6 +51,8 @@ #include "version.h" char system_string[64], version_string[64]; +int bindport; +char *bindaddr; void lockfile(const char *pidfile) { @@ -129,6 +131,8 @@ void printhelp() printf(" -p - Write PID to this file\n"); printf(" -c - Specify configuration file\n"); printf(" -r - Run with realtime priority\n"); + printf(" -a
- Bind to IP address\n"); + printf(" -b - Bind to port\n"); printf(" -h - Print this help\n"); exit(0); } @@ -142,7 +146,7 @@ int main(int argc, char **argv) struct utsname utsbuf; /* Arguments */ - while ((c = getopt(argc, argv, "drp:c:h")) != EOF) { + while ((c = getopt(argc, argv, "drp:c:a:b:h")) != EOF) { switch(c) { case 'c': conffile = optarg; @@ -150,6 +154,12 @@ int main(int argc, char **argv) case 'p': pidfile = optarg; break; + case 'a': + bindaddr = optarg; + break; + case 'b': + bindport = atoi(optarg); + break; case 'd': nodaemon = true; break;