diff options
| -rw-r--r-- | src/akcom-udpechod.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/akcom-udpechod.c b/src/akcom-udpechod.c index 13078db..4270514 100644 --- a/src/akcom-udpechod.c +++ b/src/akcom-udpechod.c | |||
| @@ -669,7 +669,7 @@ int my_daemonize(void) | |||
| 669 | openlog(cnf.prog_name, LOG_PID | (((cnf.dont_fork)) ? LOG_PERROR : 0), cnf.facility); | 669 | openlog(cnf.prog_name, LOG_PID | (((cnf.dont_fork)) ? LOG_PERROR : 0), cnf.facility); |
| 670 | syslog(LOG_NOTICE, "%s v%s", PROGRAM_NAME, PACKAGE_VERSION); | 670 | syslog(LOG_NOTICE, "%s v%s", PROGRAM_NAME, PACKAGE_VERSION); |
| 671 | syslog(LOG_NOTICE, "echo plus enabled: %s", ((cnf.echoplus)) ? "yes" : "no"); | 671 | syslog(LOG_NOTICE, "echo plus enabled: %s", ((cnf.echoplus)) ? "yes" : "no"); |
| 672 | syslog(LOG_NOTICE, "random delay: %u ms", cnf.delay); | 672 | syslog(LOG_NOTICE, "random delay: %u us", cnf.delay); |
| 673 | syslog(LOG_NOTICE, "drop probability: %u%%", cnf.drop_perct); | 673 | syslog(LOG_NOTICE, "drop probability: %u%%", cnf.drop_perct); |
| 674 | syslog(LOG_NOTICE, "running as UID: %u", getuid()); | 674 | syslog(LOG_NOTICE, "running as UID: %u", getuid()); |
| 675 | syslog(LOG_NOTICE, "running as GID: %u", getgid()); | 675 | syslog(LOG_NOTICE, "running as GID: %u", getgid()); |
| @@ -756,7 +756,7 @@ int my_log_conn(int mode, size_t * connp, union my_sa * sap, | |||
| 756 | if ((cnf.echoplus)) | 756 | if ((cnf.echoplus)) |
| 757 | { | 757 | { |
| 758 | syslog(LOG_INFO, | 758 | syslog(LOG_INFO, |
| 759 | "conn %zu: client: [%s]:%hu; %s bytes: %zi; timestamp: %lu.%09lu; seq: %u; delta: %u us; delay: %u ms;", | 759 | "conn %zu: client: [%s]:%hu; %s bytes: %zi; timestamp: %lu.%09lu; seq: %u; delta: %u us; delay: %u us;", |
| 760 | *connp, | 760 | *connp, |
| 761 | addr_str, | 761 | addr_str, |
| 762 | port, | 762 | port, |
| @@ -859,7 +859,7 @@ int my_loop(int s, size_t * connp) | |||
| 859 | if (cnf.delay > 0) | 859 | if (cnf.delay > 0) |
| 860 | { | 860 | { |
| 861 | delay = (useconds_t)rand() % cnf.delay; | 861 | delay = (useconds_t)rand() % cnf.delay; |
| 862 | syslog(LOG_DEBUG, "conn %zu: delaying response for %i ms", *connp, delay); | 862 | syslog(LOG_DEBUG, "conn %zu: delaying response for %i us", *connp, delay); |
| 863 | usleep(delay); | 863 | usleep(delay); |
| 864 | }; | 864 | }; |
| 865 | 865 | ||
| @@ -900,7 +900,7 @@ void my_usage(void) | |||
| 900 | printf("Usage: %s [options]\n", cnf.prog_name); | 900 | printf("Usage: %s [options]\n", cnf.prog_name); |
| 901 | printf("OPTIONS:\n"); | 901 | printf("OPTIONS:\n"); |
| 902 | printf(" -d num, --drop=num set packet drop probability [0-99] (default: %u)\n", cnf.drop_perct); | 902 | printf(" -d num, --drop=num set packet drop probability [0-99] (default: %u)\n", cnf.drop_perct); |
| 903 | printf(" -D ms, --delay=ms set echo delay range to microseconds (default: %u)\n", cnf.delay); | 903 | printf(" -D usec, --delay=usec set echo delay range to microseconds (default: %u us)\n", cnf.delay); |
| 904 | printf(" -e, --echoplus enable echo plus, not RFC compliant%s\n", ((cnf.echoplus)) ? " (default)" : ""); | 904 | printf(" -e, --echoplus enable echo plus, not RFC compliant%s\n", ((cnf.echoplus)) ? " (default)" : ""); |
| 905 | printf(" -f str, --facility=str set syslog facility (default: daemon)\n"); | 905 | printf(" -f str, --facility=str set syslog facility (default: daemon)\n"); |
| 906 | printf(" -g gid, --group=gid setgid to gid (default: none)\n"); | 906 | printf(" -g gid, --group=gid setgid to gid (default: none)\n"); |
