aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-12 15:26:59 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-12 15:26:59 +0000
commit00d391705c713b06b2c80f0b36724f9bb4d806ae (patch)
tree752a60d22cf9fd892f8780126a3b51ca091543d5 /options.c
parentsvn merge -r 585:599 https://svn.openvpn.net/projects/openvpn/trunk (diff)
downloadopenvpn-00d391705c713b06b2c80f0b36724f9bb4d806ae.tar.xz
version 2.1_beta2
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@601 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'options.c')
-rw-r--r--options.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/options.c b/options.c
index f2a7af7..c4a1b20 100644
--- a/options.c
+++ b/options.c
@@ -206,6 +206,7 @@ static const char usage_message[] =
" or --fragment max value, whichever is lower.\n"
"--sndbuf size : Set the TCP/UDP send buffer size.\n"
"--rcvbuf size : Set the TCP/UDP receive buffer size.\n"
+ "--socket-flags f: Set socket flags, currently 'TCP_NODELAY' supported.\n"
"--txqueuelen n : Set the tun/tap TX queue length to n (Linux only).\n"
"--mlock : Disable Paging -- ensures key material and tunnel\n"
" data will never be written to disk.\n"
@@ -1044,6 +1045,7 @@ show_settings (const struct options *o)
#endif
SHOW_INT (rcvbuf);
SHOW_INT (sndbuf);
+ SHOW_INT (sockflags);
#ifdef ENABLE_HTTP_PROXY
if (o->http_proxy_options)
@@ -3270,15 +3272,28 @@ add_option (struct options *options,
else if (streq (p[0], "rcvbuf") && p[1])
{
++i;
- VERIFY_PERMISSION (OPT_P_GENERAL);
+ VERIFY_PERMISSION (OPT_P_SOCKBUF);
options->rcvbuf = positive_atoi (p[1]);
}
else if (streq (p[0], "sndbuf") && p[1])
{
++i;
- VERIFY_PERMISSION (OPT_P_GENERAL);
+ VERIFY_PERMISSION (OPT_P_SOCKBUF);
options->sndbuf = positive_atoi (p[1]);
}
+ else if (streq (p[0], "socket-flags"))
+ {
+ int j;
+ VERIFY_PERMISSION (OPT_P_SOCKFLAGS);
+ for (j = 1; j < MAX_PARMS && p[j]; ++j)
+ {
+ ++i;
+ if (streq (p[j], "TCP_NODELAY"))
+ options->sockflags |= SF_TCP_NODELAY;
+ else
+ msg (msglevel, "unknown socket flag: %s", p[j]);
+ }
+ }
else if (streq (p[0], "txqueuelen") && p[1])
{
++i;