LocalIP / NetIO: make defaultRouteOnly defaults to true

This commit is contained in:
李通洲
2023-10-31 19:45:12 +08:00
parent 9ddefbc1a2
commit b6e759f3a2
5 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -160,10 +160,10 @@ Module specific options:
--localip-show-mac <?value>: Show mac addresses in local ip module. Default is false
--localip-show-loop <?value>: Show loop back addresses (127.0.0.1) in local ip module. Default is false
--localip-name-prefix <str>: Show interfaces with given interface name prefix only. Default is empty
--localip-default-route-only <?value>: Show the interface that is used for default routing only. Default is false
--localip-default-route-only <?value>: Show the interface that is used for default routing only. Default is true
--localip-compact <?value>: Show all IPs in one line. Default is false
--netio-name-prefix <str>: Show interfaces with given name prefix only. Default is empty
--netio-default-route-only <?value>: Show the interfac that is used for default routing only. Default is false
--netio-default-route-only <?value>: Show the interfac that is used for default routing only. Default is true
--publicip-timeout: Time in milliseconds to wait for the public ip server to respond. Default is disabled (0)
--publicip-url: The URL of public IP detection server to be used.
--weather-location: Set the location to be used. It must be URI encoded (eg a whitespace must be encoded as `+`).
+2 -2
View File
@@ -105,7 +105,7 @@ void ffPrintLocalIp(FFLocalIpOptions* options)
if(options->moduleArgs.outputFormat.length == 0)
{
ffPrintLogoAndKey(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY);
printIp(ip, !options->defaultRouteOnly);
printIp(ip, true);
putchar('\n');
}
else
@@ -370,7 +370,7 @@ void ffInitLocalIpOptions(FFLocalIpOptions* options)
options->showType = FF_LOCALIP_TYPE_IPV4_BIT;
ffStrbufInit(&options->namePrefix);
options->defaultRouteOnly = false;
options->defaultRouteOnly = true;
}
void ffDestroyLocalIpOptions(FFLocalIpOptions* options)
+1 -1
View File
@@ -230,7 +230,7 @@ void ffInitNetIOOptions(FFNetIOOptions* options)
ffOptionInitModuleArg(&options->moduleArgs);
ffStrbufInit(&options->namePrefix);
options->defaultRouteOnly = false;
options->defaultRouteOnly = true;
}
void ffDestroyNetIOOptions(FFNetIOOptions* options)