mirror of
https://repo.or.cz/socat.git
synced 2025-07-11 22:23:24 +00:00
Added configure option --with-default-ipv
This commit is contained in:
parent
cb6e16b360
commit
8b2e0593f3
14 changed files with 139 additions and 36 deletions
|
@ -71,17 +71,25 @@ int xioinitialize(void) {
|
|||
|
||||
{
|
||||
const char *default_ip;
|
||||
|
||||
// xioparms.default_ip = WITH_DEFAULT_IPV;
|
||||
default_ip = getenv("SOCAT_DEFAULT_LISTEN_IP");
|
||||
if (default_ip != NULL) {
|
||||
switch (default_ip[0]) {
|
||||
case '4':
|
||||
case '6':
|
||||
xioparms.default_ip = default_ip[0]; break;
|
||||
xioparms.default_ip = default_ip[0];
|
||||
break;
|
||||
default:
|
||||
xioparms.default_ip = '0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
const char *preferred_ip;
|
||||
|
||||
// xioparms.preferred_ip = WITH_DEFAULT_IPV;
|
||||
preferred_ip = getenv("SOCAT_PREFERRED_RESOLVE_IP");
|
||||
if (preferred_ip != NULL) {
|
||||
switch (preferred_ip[0]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue