diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-03-09 22:54:06 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-03-09 22:54:06 +0100 |
commit | 631c13d2473e475096c77f129282671711c379bb (patch) | |
tree | 46271e037bcf2041f9e3156389a919d3f348e35a /src/config.c | |
parent | ec8109fa53082d242459893373f009e27f6732df (diff) | |
download | fastd-631c13d2473e475096c77f129282671711c379bb.tar fastd-631c13d2473e475096c77f129282671711c379bb.zip |
Add options to hide IP and MAC addresses from log output
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index 1789723..f514f18 100644 --- a/src/config.c +++ b/src/config.c @@ -552,6 +552,8 @@ static void count_peers(fastd_context_t *ctx, fastd_config_t *conf) { OPTION_ARG(option_log_level, "--log-level", "error|warn|info|verbose|debug", "Sets the stderr log level; default is info, if no alternative log destination is configured") \ OPTION_ARG(option_syslog_level, "--syslog-level", "error|warn|info|verbose|debug", "Sets the log level for syslog output; default is not to use syslog") \ OPTION_ARG(option_syslog_ident, "--syslog-ident", "<ident>", "Sets the syslog identification; default is 'fastd'") \ + OPTION(option_hide_ip_addresses, "--hide-ip-addresses", "Hides IP addresses in log output") \ + OPTION(option_hide_mac_addresses, "--hide-mac-addresses", "Hides MAC addresses in log output") \ OPTION_ARG(option_config, "--config" OR "-c", "<filename>", "Loads a config file") \ OPTION_ARG(option_config_peer, "--config-peer", "<filename>", "Loads a config file for a single peer") \ OPTION_ARG(option_config_peer_dir, "--config-peer-dir", "<dir>", "Loads all files from a directory as peer configs") \ @@ -650,6 +652,14 @@ static void option_syslog_ident(fastd_context_t *ctx, fastd_config_t *conf, cons conf->log_syslog_ident = strdup(arg); } +static void option_hide_ip_addresses(fastd_context_t *ctx, fastd_config_t *conf) { + conf->hide_ip_addresses = true; +} + +static void option_hide_mac_addresses(fastd_context_t *ctx, fastd_config_t *conf) { + conf->hide_mac_addresses = true; +} + static void option_config(fastd_context_t *ctx, fastd_config_t *conf, const char *arg) { if (!strcmp(arg, "-")) arg = NULL; |