ypserv_xdr, as generated by rpcgen from yp.x with one major exception.
in xdr_ypresp_key_val() invert the order of loading the key and value
(rpcgen says [1] stat, [2] key, [3] value, but the data on the wire
comes in as [1] stat, [2] val, [3] key... you can't fix this in yp.x
because if you invert the ordr in yp.x not only does it invert the order
in ypserv_xdr.c, but it also inverts it in the structure in yp.h which
cancels out the inversion in ypserv_xdr.c. i guess this means it
is not possible to have a yp.x that descrives the YP protocol properly?).
***NOTE*** this file is also needed because some of the YP functions in
libc are broken. For example, compare src/lib/libc/yp/xdryp.c's version
of xdr_domainname() to the one in this file generated by rpcgen. Note
that xdryp.c calls:
if (!xdr_string(xdrs, &objp, YPMAXDOMAIN)) { /* xdryp.c */
while ypserv_xdr.c (generated by rpcgen) calls:
if (!xdr_string(xdrs, objp, YPMAXDOMAIN)) { /* rpcgen */
(note the lack of "&" in the second line). Clearly libc is wrong and
needs to be fixed (XXX). (Of course changing libc could break other
YP stuff, which is why I haven't attemped it... :) ) When libc is
fixed, it should be possible to phase out this file, I think.