USEVC option in libc resolv [tcp DNS], how?
grarpamp
grarpamp at gmail.com
Tue Mar 24 14:03:50 PDT 2009
How to set and use the RES_USEVC / usevc option as mentioned in:
/usr/src/lib/libc/net/resolver.3
/usr/src/include/resolv.h
/usr/src/lib/libc/net/res_debug.c
/usr/src/share/man/man5/resolver.5 # options statement / env_var
The usevc option does not work when used in place of the debug
option below. The debug option works.
env - RES_OPTIONS=debug host freebsd.org
or
resolv.conf: options debug
env - host freebsd.org
I find usevc in these:
/usr/src/include/resolv.h:#define RES_USEVC 0x00000008 /* use
virtual circuit */
/usr/src/lib/libc/net/gethostbydns.c: _res.options |=
RES_STAYOPEN | RES_USEVC;
/usr/src/lib/libc/net/gethostbydns.c: _res.options &= ~(RES_STAYOPEN
| RES_USEVC);
/usr/src/lib/libc/net/getnetbydns.c: _res.options |=
RES_STAYOPEN | RES_USEVC;
/usr/src/lib/libc/net/getnetbydns.c: _res.options &= ~(RES_STAYOPEN
| RES_USEVC);
/usr/src/lib/libc/net/name6.c: _res.options |= RES_STAYOPEN |
RES_USEVC;
/usr/src/lib/libc/net/name6.c: _res.options &= ~(RES_STAYOPEN | RES_USEVC);
/usr/src/lib/libc/net/res_debug.c: case RES_USEVC: return "usevc";
/usr/src/lib/libc/net/res_send.c: v_circuit = (_res.options &
RES_USEVC) || buflen > PACKETSZ;
/usr/src/lib/libc/net/res_send.c: if ((v_circuit &&
(!(_res.options & RES_USEVC) || ns != 0)) ||
/usr/src/lib/libc/net/resolver.3:.It Dv RES_USEVC
/usr/src/lib/libc/net/resolver.3:.Dv RES_USEVC
My guess is that it is missing from res_init.c? And that res_init.c
may need to be brought fully up to date with whatever the current
option set is nowadays?
res_init.c:545 /* XXX - print a warning here? */
On an invalid option, yes please, inform userland :)
This note refers to RELENG_4. It may also apply to RELENG_7 and HEAD.
More information about the freebsd-stable
mailing list