Version 2 of YP uses TS-RPC and supports only IPv4 addresses. I am updating version 2 to use TI-RPC and adding support for IPv4/IPv6 in version 3.
### Compile
1. To update the object file, we need to update the linker file in lib/libc/yp/. However, running `make all install` in lib/libc/ will result in errors due to missing `xdr_rpcvers_t` and `xdr_netconfig` functions.
2. Run `make all install` in include/rpcsvc to generate and install "yp.h" from "yp.x".
3. Run `make all install` in usr.sbin/ypbind/ to compile `ypbind`.
Before reviewing, please run make all install in /include/rpcsvc to install the header file from yp.x.
### TI-RPC Changes
1. I replaced `svcudp_create` and `svctcp_create` with `getnetconfig`, `svc_tp_create`, and `svc_reg` within a while loop. This change binds version 3 of ypbind on every netconfig and binds version 2 of ypbind specifically on IPv4 over UDP/TCP.
2. I use `rpcb_unset` nstead of `pmap_unset` to unset any program before registering in the main and terminate functions. `pmap_unset` uses portmap to unset, while `rpcb_unset` uses rpcbind to unset the mapper.
3. Replaced `clntudp_bufcreate` with `clnt_dg_create`. Added a timeout using `clnt_control` because `clnt_dg_create` lacks a timeout parameter.
4. Replaced `clntudp_create` with `clnt_create`.
5. Replaced `clnt_broadcast` with `rpc_broadcast`. `clnt_broadcast` only broadcasts to portmap, whereas `rpc_broadcast` broadcasts to both portmap and rpcbind.
### Version 3 ypbind
1. I have included some version 3 data structures in "yp.x".
1. Use new `_dom_binding`. It is very similar to the old one, except for the address. Version 3 uses a new data structure, `ypbind_binding_3`, to represent addresses.
2. Use `ypbind_setdom_3` to replace `ypbind_setdom`. The difference is that version 3 uses the new `ypbind_binding_3` structure.
3. Use `ypbind_resp_3` to replace `ypbind_resp`, with the main difference still being `ypbind_binding_3`.
2. I have added version 3 functions like `ypbindprog_3`, `ypbindproc_domain_3_yp`, and `ypbindproc_setdom_3_yp`, following Sun's implementation. In their code, version 2 structures are converted to version 3 structures before calling version 3 functions.
3. I also revised the "yp_ping.c" function to support `struct sockaddr *`.
I couldn't fully test it as my test environment does not have a YP server.