> @@ -244,6 +371,10 @@ const char args_doc[] =3D3D "[MESSAGE]";
> const char doc[] =3D3D "Send messages to syslog";
> =3D20
> static struct argp_option argp_options[] =3D3D {
> +#if HAVE_IPV6
> + {"ipv4", '4', NULL, 0, "use IPv4 for logging to host" },
> + {"ipv6", '6', NULL, 0, "use IPv6 with a host target" },
> +#endif
>=20
> What do you think about issuing a warning if IPv6 is not supported,
> and falling back on IPv4? It is nice if one can move scripts between
> systems, without having to tweak them. Mayve skip the two short
> options, they don't seem to be very useful to me; or do other logger
> implementations support them?
This is a splendid idea. Now both are implemented, but '--ipv6' prints
a warning message to STDOUT and falls back to IPv4 if the system is
not compiled with IPv6 support.
FreeBSD implements options '-4' and '-6', but not long options.
OpenBSD, NetBSD, and bsdutils (hence Debian GNU/Linux and
GNU/kFreeBSD) are not able to send log messages to a host at all,
only to UNIX sockets! In this sense IU-logger is at the very
forefront.
Ok, then I guess we should also support -4/-6.
What do you think about Simon's suggestion? I have no opinion about
it, if the host can be resolved then I think it is better to use what
works if it works, and print a warning instead of erroring out.