mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
Added the --experimental option
This commit is contained in:
parent
f0ca732bd9
commit
dc777a00bb
8 changed files with 33 additions and 16 deletions
6
CHANGES
6
CHANGES
|
@ -1,5 +1,9 @@
|
|||
|
||||
####################### V 1.7.4.5:
|
||||
Features:
|
||||
Added the --experimental option that enables use of features that might
|
||||
change in the future.
|
||||
|
||||
####################### V 1.7.4.5 (not released):
|
||||
|
||||
Corrections:
|
||||
On connect() failure and in some other situations Socat tries to get
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
"1.7.4.5"
|
||||
"1.7.4.5+"
|
||||
|
|
|
@ -118,6 +118,9 @@ dit(bf(tt(-d -d -d -d))) Prints fatal, error, warning, notice, info, and debug
|
|||
messages.
|
||||
dit(bf(tt(-D)))
|
||||
Logs information about file descriptors before starting the transfer phase.
|
||||
dit(bf(tt(--experimental)))
|
||||
New features that are not well tested or are subject to change in the future
|
||||
must me explicitely enabled using this option.
|
||||
dit(bf(tt(-ly[<facility>])))
|
||||
Writes messages to syslog instead of stderr; severity as defined with -d
|
||||
option. With optional link(<facility>)(TYPE_FACILITY), the syslog type can
|
||||
|
|
11
socat.c
11
socat.c
|
@ -264,8 +264,9 @@ int main(int argc, const char *argv[]) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 'W': if (socat_opts.lock.lockfile)
|
||||
case 'W': if (socat_opts.lock.lockfile) {
|
||||
Error("only one -L and -W option allowed");
|
||||
}
|
||||
if (arg1[0][2]) {
|
||||
socat_opts.lock.lockfile = *arg1+2;
|
||||
} else {
|
||||
|
@ -291,6 +292,13 @@ int main(int argc, const char *argv[]) {
|
|||
xioopts.preferred_ip = arg1[0][1];
|
||||
break;
|
||||
#endif /* WITH_IP4 || WITH_IP6 */
|
||||
case '-':
|
||||
if (!strcmp("experimental", &arg1[0][2])) {
|
||||
xioopts.experimental = true;
|
||||
} else {
|
||||
Error1("unknown option \"%s\"; use option \"-h\" for help", arg1[0]);
|
||||
}
|
||||
break;
|
||||
case '\0':
|
||||
case ',':
|
||||
case ':':
|
||||
|
@ -389,6 +397,7 @@ void socat_usage(FILE *fd) {
|
|||
#if WITH_FILAN
|
||||
fputs(" -D analyze file descriptors before loop\n", fd);
|
||||
#endif
|
||||
fputs(" --experimental enable experimental features\n", fd);
|
||||
fputs(" -ly[facility] log to syslog, using facility (default is daemon)\n", fd);
|
||||
fputs(" -lf<logfile> log to file\n", fd);
|
||||
fputs(" -ls log to stderr (default if no other log)\n", fd);
|
||||
|
|
|
@ -30,8 +30,7 @@ static int xioopen_readline(int argc, const char *argv[], struct opt *opts,
|
|||
int dummy1, int dummy2, int dummy3);
|
||||
|
||||
|
||||
const struct addrdesc addr_readline = {
|
||||
"readline", 3, xioopen_readline, GROUP_FD|GROUP_TERMIOS|GROUP_READLINE, 0, 0, 0 HELP(NULL) };
|
||||
const struct addrdesc addr_readline = { "readline", 3, xioopen_readline, GROUP_FD|GROUP_TERMIOS|GROUP_READLINE, 0, 0, 0 HELP(NULL) };
|
||||
|
||||
const struct optdesc opt_history_file = { "history-file", "history", OPT_HISTORY_FILE, GROUP_READLINE, PH_LATE, TYPE_STRING, OFUNC_OFFSET, XIO_OFFSETOF(para.readline.history_file) };
|
||||
const struct optdesc opt_prompt = { "prompt", NULL, OPT_PROMPT, GROUP_READLINE, PH_LATE, TYPE_STRING, OFUNC_OFFSET, XIO_OFFSETOF(para.readline.prompt) };
|
||||
|
|
1
xio.h
1
xio.h
|
@ -102,6 +102,7 @@ typedef struct {
|
|||
char default_ip; /* default prot.fam for IP based listen ('4' or '6') */
|
||||
char preferred_ip; /* preferred prot.fam. for name resolution ('0' for
|
||||
unspecified, '4', or '6') */
|
||||
bool experimental; /* enable some features */
|
||||
} xioopts_t;
|
||||
|
||||
/* pack the description of a lock file */
|
||||
|
|
|
@ -20,7 +20,8 @@ xioopts_t xioopts = {
|
|||
'\0', /* logopt */
|
||||
NULL, /* syslogfac */
|
||||
'4', /* default_ip */
|
||||
'4' /* preferred_ip */
|
||||
'4', /* preferred_ip */
|
||||
false /* experimental */
|
||||
} ;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue