summaryrefslogtreecommitdiffstats
path: root/sys/pccard
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-12-08 17:58:50 +0000
committerwpaul <wpaul@FreeBSD.org>1995-12-08 17:58:50 +0000
commit5a5b07fa54887595e0725dba442af441c842786a (patch)
tree66666be3ba6600fa5aaf32e4ea6e45c4354efa39 /sys/pccard
parented86a6f0a2a787d2c7097489a375138bc7794424 (diff)
downloadFreeBSD-src-5a5b07fa54887595e0725dba442af441c842786a.zip
FreeBSD-src-5a5b07fa54887595e0725dba442af441c842786a.tar.gz
"What? He's modifying the NIS protocol definition!?"
No, not really. There are just a couple of long-standing bogosities here that I feel compelled to fix. :) There are two small changes here: 1) yp.x actually contains _three_ protocol definitions: YPPROG (standard NIS client/server procedures), YPPUSH_XFRRESPPROG (callback handler for the YPPROC_XFR service, aka ypxfr/yppush) and YPBINDPROG (for ypbind, ypset & friends). The problem is that when you run yp.x through rpcgen(1), it generates client and server stubs with hooks for all three services. This makes it impossible to actually use the rpcgen-erated code in a program that only deals with _one_ of these services (ypserv, ypbind, etc...) without manually removing the unneeded stubs (either by hand editing or by committing unspeakable horrors with sed). This defeats the whole purpose of using rpcgen and is generally annoying. What I've done is to insert a few #ifndefs and #endifs to allow a programmer to selectively blot out those functions that aren't needed for a particular program. For instance, if you do 'rpcgen -DYPSERV_ONLY', you'll get only the necessary client/server stubs to implement the standard yp client and server functions. If you do 'rpcgen -DYPBIND_ONLY', you get only what you need for ypbind. If you don't #define anything, you get the whole mess, just like before, so existing programs won't notice the difference. (Note that the -D flag is not supported by our existing crufty version of rpcgen, but I intend to update it soon.) 2) The definition for the ypresp_key_val structure is actually incorrect with respect to reality: the key and val members are specified in the wrong order. It should be val/key rather than key/val. For whatever the reason, Sun's actual NIS implementation contradicts the protocol definition in this case. Again, accounting for this bogosity here is cleaner and easier than mangling the output from rpcgen.
Diffstat (limited to 'sys/pccard')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud