From d9f89ef5daa6375fc4ff257826fa39562fbe3ac3 Mon Sep 17 00:00:00 2001 From: fredrik Date: Sun, 4 Mar 2007 20:48:51 +0000 Subject: [PATCH] Add configvar documentation comments. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@851 959494ce-11ee-0310-bf91-de5d638817bd --- daemon/auth-krb5.c | 9 +++++++++ daemon/auth.c | 4 ++++ daemon/client.c | 11 +++++++++++ daemon/filenet.c | 16 ++++++++++++++++ daemon/fnet-adc.c | 8 ++++++++ daemon/fnet-dc.c | 20 ++++++++++++++++++++ daemon/net.c | 27 +++++++++++++++++++++++++-- daemon/transfer.c | 12 ++++++++++++ daemon/ui.c | 9 +++++++++ 9 files changed, 114 insertions(+), 2 deletions(-) diff --git a/daemon/auth-krb5.c b/daemon/auth-krb5.c index ca52e63..9e29218 100644 --- a/daemon/auth-krb5.c +++ b/daemon/auth-krb5.c @@ -594,9 +594,18 @@ static void terminate(void) static struct configvar myvars[] = { + /** The name of the service principal to use. */ {CONF_VAR_STRING, "service", {.str = L"doldacond"}}, + /** The path to an alternative keytab file. If unspecified, the + * system default keytab will be used. */ {CONF_VAR_STRING, "keytab", {.str = L""}}, + /** Whether to renew renewable credentials automatically before + * they expire. */ {CONF_VAR_BOOL, "renewcreds", {.num = 1}}, + /** If true, the default credentials cache will be used, which is + * useful for e.g. Linux kernel key handling. If false, a file + * credentials cache will be created using mkstemp(3), using the + * pattern /tmp/krb5cc_dc_$UID_XXXXXX. */ {CONF_VAR_BOOL, "usedefcc", {.num = 0}}, {CONF_VAR_END} }; diff --git a/daemon/auth.c b/daemon/auth.c index 0d34fbb..c5aace0 100644 --- a/daemon/auth.c +++ b/daemon/auth.c @@ -164,7 +164,11 @@ static int init(int hup) static struct configvar myvars[] = { + /** The name of the PAM service file to use. */ {CONF_VAR_STRING, "pamserv", {.str = L"doldacond"}}, + /** Specifies whether insecure authentication is to be allowed. If + * you are not completely sure what you are doing, never turn this + * on without also turning on net.onlylocal. */ {CONF_VAR_BOOL, "authless", {.num = 1}}, {CONF_VAR_END} }; diff --git a/daemon/client.c b/daemon/client.c index 7cdfbe3..47ac9de 100644 --- a/daemon/client.c +++ b/daemon/client.c @@ -60,9 +60,20 @@ static void writehashcache(int now); static struct configvar myvars[] = { + /** The default nick name to use. The nickname can also be + * specified for individual hubs, overriding this setting. */ {CONF_VAR_STRING, "defnick", {.str = L"DoldaConnect user"}}, + /** When scanning shares, this bitmask is consulted for every + * regular file. Unless the file's mode has the bits specified by + * this mask set, it will not be shared. */ {CONF_VAR_INT, "scanfilemask", {.num = 0004}}, + /** When scanning shares, this bitmask is consulted for every + * directory encountered. Unless the directory's mode has the bits + * specified by this mask set, it will be ignored and any files + * under it will not be shared. */ {CONF_VAR_INT, "scandirmask", {.num = 0005}}, + /** The filename to use for the hash cache (see the FILES section + * for more information). */ {CONF_VAR_STRING, "hashcache", {.str = L"dc-hashcache"}}, {CONF_VAR_END} }; diff --git a/daemon/filenet.c b/daemon/filenet.c index be6c5af..d94d3e5 100644 --- a/daemon/filenet.c +++ b/daemon/filenet.c @@ -502,9 +502,25 @@ void fnethandlechat(struct fnetnode *fn, int public, wchar_t *name, wchar_t *pee static struct configvar myvars[] = { + /** The number of seconds to wait between searches. Most hubs + * require at least ten seconds, and quite often network lag will + * often make searches arrive to the hub more often than sent. It + * may be semi-dangerous to specify too low a value, since hubs + * will often kick users that search too often (even when the + * reason is network lag -- there is no way for the hub to know + * this), but it is quite annoying to set too high a value. 15 to + * 40 seconds are the recommended range (although the default is + * 15 seconds, it is recommended to set to 30 seconds). */ {CONF_VAR_INT, "srchwait", {.num = 15}}, + /** The TOS value to use for hub connections (see the TOS VALUES + * section). */ {CONF_VAR_INT, "fntos", {.num = 0}}, + /** The TOS value to use for peer connections (see the TOS VALUES + * section). */ {CONF_VAR_INT, "fnptos", {.num = 0}}, + /** Specifies a maximum number of simultaneously connected + * hubs. Attempts to connect to new hubs beyond this limit will + * return an error. Set to zero to remove the limit. */ {CONF_VAR_INT, "maxnodes", {.num = 0}}, {CONF_VAR_END} }; diff --git a/daemon/fnet-adc.c b/daemon/fnet-adc.c index ecbffe3..7f5722b 100644 --- a/daemon/fnet-adc.c +++ b/daemon/fnet-adc.c @@ -469,7 +469,15 @@ static void terminate(void) } static struct configvar myvars[] = { + /** Specifies a specific UDP port to use for ADC search + * results. If left unspecified, a port is allocated + * dynamically. Useful for NAT routers (see also the + * net.visibleipv4 address for those cases). */ {CONF_VAR_INT, "udpport", {.num = 0}}, + /** Specifies a specific TCP port to use for ADC peer + * connections. If left unspecified, a port is allocated + * dynamically. Useful for NAT routers (see also the + * net.visibleipv4 address for those cases). */ {CONF_VAR_INT, "tcpport", {.num = 0}}, {CONF_VAR_END} }; diff --git a/daemon/fnet-dc.c b/daemon/fnet-dc.c index d45b144..7757885 100644 --- a/daemon/fnet-dc.c +++ b/daemon/fnet-dc.c @@ -3709,11 +3709,31 @@ static void terminate(void) static struct configvar myvars[] = { + /** Specifies the share description reported to other DC users. */ {CONF_VAR_STRING, "desc", {.str = L""}}, + /** Specifies the speed reported to other DC users. Normal values + * are 28.8Kbps, 33.6Kbps, 56Kbps, Satellite, ISDN, DSL, Cable, + * LAN(T1) or LAN(T3)*/ {CONF_VAR_STRING, "speedstring", {.str = L"LAN(T1)"}}, + /** The e-mail address to report to other DC users. */ {CONF_VAR_STRING, "email", {.str = L"spam@spam.org"}}, + /** Specifies a specific UDP port to use for DC search results. If + * left unspecified, a port is allocated dynamically. Useful for + * NAT routers (see also the net.visibleipv4 address for those + * cases). */ {CONF_VAR_INT, "udpport", {.num = 0}}, + /** Specifies a specific TCP port to use for DC peer + * connections. If left unspecified, a port is allocated + * dynamically. Useful for NAT routers (see also the + * net.visibleipv4 address for those cases). */ {CONF_VAR_INT, "tcpport", {.num = 0}}, + /** If set to true, doldacond will do its best to emulate DC++ + * (currently v0.674). This should be left off if at all possible, + * since turning it on will violate the rules of most hubs and + * thus give hub owners an actual reason to kick you if it is + * detected. It might be needed for some of the more bone-headed + * hub owners, though. Note that DC++ emulation can also be turned + * on or off for individual hubs, overriding this setting. */ {CONF_VAR_BOOL, "dcppemu", {.num = 0}}, {CONF_VAR_END} }; diff --git a/daemon/net.c b/daemon/net.c index 2a8fdef..4147031 100644 --- a/daemon/net.c +++ b/daemon/net.c @@ -48,17 +48,40 @@ static struct configvar myvars[] = { - /* 0 = Direct mode, 1 = Passive mode, 2 = SOCKS proxy */ + /** The network mode to use. Currently supported values are 0 for + * active mode and 1 for passive mode. In the future, SOCKS5 proxy + * support may be added. */ {CONF_VAR_INT, "mode", {.num = 0}}, + /** Set the SO_REUSEADDR socket option on listening sockets, so + * that dead TCP connections waiting for timeout are ignored. */ {CONF_VAR_BOOL, "reuseaddr", {.num = 0}}, - /* Only for direct mode */ + /** Overrides the IPv4 address reported to other clients in active + * mode. Useful for servers behind NAT routers. If both this and + * net.publicif are unspecified the address of the hub connection + * is used. */ {CONF_VAR_IPV4, "visibleipv4", {.ipv4 = {0}}}, + /** Specifies an interface name from which to fetch the IPv4 + * address reported to other clients in active mode. If both this + * and net.visibleipv4 are unspecified the address of the hub + * connection is used. */ {CONF_VAR_STRING, "publicif", {.str = L""}}, /* Diffserv should be supported on IPv4, too, but I don't know the * API to do that. */ + /** The Diffserv value to use on IPv6 connections when the + * minimize cost TOS value is used (see the TOS VALUES + * section). */ {CONF_VAR_INT, "diffserv-mincost", {.num = 0}}, + /** The Diffserv value to use on IPv6 connections when the + * maximize reliability TOS value is used (see the TOS VALUES + * section). */ {CONF_VAR_INT, "diffserv-maxrel", {.num = 0}}, + /** The Diffserv value to use on IPv6 connections when the + * maximize throughput TOS value is used (see the TOS VALUES + * section). */ {CONF_VAR_INT, "diffserv-maxtp", {.num = 0}}, + /** The Diffserv value to use on IPv6 connections when the + * minimize delay TOS value is used (see the TOS VALUES + * section). */ {CONF_VAR_INT, "diffserv-mindelay", {.num = 0}}, {CONF_VAR_END} }; diff --git a/daemon/transfer.c b/daemon/transfer.c index 56b237d..0bf759e 100644 --- a/daemon/transfer.c +++ b/daemon/transfer.c @@ -798,10 +798,22 @@ static int run(void) static struct configvar myvars[] = { + /** The maximum number of simultaneously permitted uploads. A + * common hub rule is that you will need at least as many slots as + * the number of hubs to which you are connected. */ {CONF_VAR_INT, "slots", {.num = 3}}, + /** The TOS value to use for upload connections (see the TOS + * VALUES section). */ {CONF_VAR_INT, "ultos", {.num = SOCK_TOS_MAXTP}}, + /** The TOS value to use for download connections (see the TOS + * VALUES section). */ {CONF_VAR_INT, "dltos", {.num = SOCK_TOS_MAXTP}}, + /** The name of the filter script (see the FILES section for + * lookup information). */ {CONF_VAR_STRING, "filter", {.str = L"dc-filter"}}, + /** If true, only one upload is allowed per remote peer. This + * option is still experimental, so it is recommended to leave it + * off. */ {CONF_VAR_BOOL, "ulquota", {.num = 0}}, {CONF_VAR_END} }; diff --git a/daemon/ui.c b/daemon/ui.c index b089117..ea10427 100644 --- a/daemon/ui.c +++ b/daemon/ui.c @@ -2260,9 +2260,18 @@ static void terminate(void) static struct configvar myvars[] = { + /** If true, UI connections will only be accepted from localhost + * addresses (127.0.0.1, ::1 or ::ffff:127.0.0.1). Unless you are + * completely sure that you know what you are doing, never turn + * this off when auth.authless is on. */ {CONF_VAR_BOOL, "onlylocal", {.num = 1}}, + /** The port number on which to accept UI client connections. */ {CONF_VAR_INT, "port", {.num = 1500}}, + /** The TOS value to use for UI connections (see the TOS VALUES + * section). */ {CONF_VAR_INT, "uitos", {.num = SOCK_TOS_MINDELAY}}, + /** The name of the filtercmd script (see the FILES section for + * lookup information). */ {CONF_VAR_STRING, "filtercmd", {.str = L"dc-filtercmd"}}, {CONF_VAR_END} }; -- 2.11.0