summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypbind/yp_ping.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't rely on private RPC data structures when there is a perfectly gooddfr2008-09-151-22/+4
| | | | public API.
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.obrien2003-05-031-3/+3
|
* xids are u_int32_ts, which are not necessarily the same size as time_ts orfenner2002-09-161-2/+2
| | | | unsigned longs. This fixes "ypbind -S ... -m" on sparc64.
* Spell void * as void * rather than caddr_t. This is complicated by thedes2002-04-281-2/+4
| | | | | | fact that caddr_t is often misspelled as char *. Sponsored by: DARPA, NAI Labs
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm
* ANSIfy and remove some dead code.des2002-02-061-10/+4
| | | | Sponsored by: DARPA, NAI Labs
* Apply the following mechanical transformations in preparation fordes2002-02-061-1/+1
| | | | | | | | | | | | | | | | | ansification and constification: s{\s+__P\((\(.*?\))\)}{$1}g; s{\(\s+}{\(}g; s{\s+\)}{\)}g; s{\s+,}{,}g; s{(\s+)(for|if|switch|while)\(}{$1$2 \(}g; s{return ([^\(].*?);}{return ($1);}g; s{([\w\)])([!=+/\*-]?=)([\w\(+-])}{$1 $2 $3}g; s{\s+$}{\n};g Also add $FreeBSD$ where needed. MFC after: 1 week
* Nuke unused variables.dd2001-06-241-1/+0
|
* Finally fix __yp_ping(). We can't use the old locally defined clntudp_call()wpaul2001-03-271-239/+26
| | | | | | | method anymore since the code inside the RPC library has changed too much. Now that the clnt_dg module has the necessary code internally, we can yank out the local method code and turn on the ASYNC hack with clnt_control(). This will make the -m flag work again.
* Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) andalfred2001-03-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | associated changes that had to happen to make this possible as well as bugs fixed along the way. Bring in required TLI library routines to support this. Since we don't support TLI we've essentially copied what NetBSD has done, adding a thin layer to emulate direct the TLI calls into BSD socket calls. This is mostly from Sun's tirpc release that was made in 1994, however some fixes were backported from the 1999 release (supposedly only made available after this porting effort was underway). The submitter has agreed to continue on and bring us up to the 1999 release. Several key features are introduced with this update: Client calls are thread safe. (1999 code has server side thread safe) Updated, a more modern interface. Many userland updates were done to bring the code up to par with the recent RPC API. There is an update to the pthreads library, a function pthread_main_np() was added to emulate a function of Sun's threads library. While we're at it, bring in NetBSD's lockd, it's been far too long of a wait. New rpcbind(8) replaces portmap(8) (supporting communication over an authenticated Unix-domain socket, and by default only allowing set and unset requests over that channel). It's much more secure than the old portmapper. Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded to support TI-RPC and to support IPV6. Umount(8) is also fixed to unmount pathnames longer than 80 chars, which are currently truncated by the Kernel statfs structure. Submitted by: Martin Blapp <mb@imp.ch> Manpage review: ru Secure RPC implemented by: wpaul
* Fix typo: compatability -> compatibility.asmodai2001-02-061-1/+1
| | | | Compatability is not an existing english word.
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-1/+1
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Also fix ypbind to compile with ANSI-fied /usr/include/rpcsvc. One ofwpaul1998-01-191-2/+2
| | | | these days I really should rerwite this creature from the ground up.
* Use err(3). Change `=' to `==' in two places, so that server not responding/charnier1997-10-271-11/+12
| | | | | server ok is not displayed too often. OKed by: Bill (wpaul).
* Fix bug in __yp_ping(): keep proper count of assigned request structures.wpaul1997-10-091-3/+5
| | | | | | | The test to see if a request struct had been assigned after looping though the server list was bogus. Submitted by: "Erik E. Rantapaa" <rantapaa@math.umn.edu>
* This commit adds support to ypbind(8) for binding to non-local servers.wpaul1997-05-251-0/+542
The standard SunOS ypbind(8) (and, until now, the FreeBSD ypbind) only selects servers based on whether or not they respond to clnt_broadcast(). Ypbind(8) broadcasts to the YPPROC_DOMAIN_NONACK procedure and waits for answers; whichever server answers first is the one ypbind uses for the local client binding. This mechanism fails when binding across subnets is desired. In order for a client on one subnet to bind to a server on another subnet, the gateway(s) between the client and server must be configured to forward broadcasts. If this is not possible, then a slave server must be installed on the remote subnet. If this is also not possible, you have to force the client to bind to the remote server with ypset(8). Unfortunately, this last option is less than ideal. If the remote server becomes unavailable, ypbind(8) will lose its binding and revert to its broadcast-based search behavior. Even if there are other servers available, or even if the original server comes back up, ypbind(8) will not be able to create a new binding since all the servers are on remote subnets where its broadcasts won't be heard. If the administrator isn't around to run ypset(8) again, the system is hosed. In some Linux NIS implementations, there exists a yp.conf file where you can explicitly specify a server address and avoid the use of ypbind altogether. This is not desireable since it removes the possibility of binding to an alternate server in the event that the one specified in yp.conf crashes. Some people have mentioned to me how they though the 'restricted mode' operation (using the -S flag) could be used as a solution for this problem since it allows one to specify a list of servers. In fact, this is not the case: the -S flag just tells ypbind(8) that when it listens for replies to its broadcasts, it should only honor them if the replying hosts appear in the specified restricted list. This behavior has now been changed. If you use the -m flag in conjunction with the -S flag, ypbind(8) will use a 'many-cast' instead of a broadcast for choosing a server. In many-cast mode, ypbind(8) will transmit directly to the YPPROC_DOMAIN_NONACK procedure of all the servers specified in the restricted mode list and then wait for a reply. As with the broadcast method, whichever server from the list answers first is used for the local binding. All other behavior is the same: ypbind(8) continues to ping its bound server every 60 seconds to insure it's still alive and will many-cast again if the server fails to respond. The code used to achieve this is in yp_ping.c; it includes a couple of modified RPC library routines. Note that it is not possible to use this mechanism without using the restricted list since we need to know the addresses of the available NIS servers ahead of time in order to transmit to them. Most-recently-requested by: Tom Samplonius
OpenPOWER on IntegriCloud