Lines Matching +full:short +full:- +full:ping

2  * SPDX-License-Identifier: BSD-4-Clause
18 * 4. Neither the name of the author nor the names of any co-contributors
35 /*-
41 * - Redistributions of source code must retain the above copyright notice,
43 * - Redistributions in binary form must reproduce the above copyright notice,
46 * - Neither the name of Sun Microsystems, Inc. nor the names of its
110 int sock = -1; in __pmap_getport()
114 address->sin_port = htons(PMAPPORT); in __pmap_getport()
134 if (sock != -1) in __pmap_getport()
136 address->sin_port = 0; in __pmap_getport()
179 * "We have the machine that goes 'ping!'" -- Monty Python
187 * - We only get the address of the machine that replied in the
188 * 'eachresult' callback, and on multi-homed machines this can
190 * - clnt_broadcast() only transmits to local networks, whereas with
193 * - clnt_broadcast() blocks for an arbitrary amount of time which the
194 * caller can't control -- we want to avoid that.
206 __yp_ping(struct in_addr *restricted_addrs, int cnt, char *dom, short *port) in __yp_ping()
214 int winner = -1; in __yp_ping()
235 bcopy((char *)&sin, (char *)&reqs[i]->sin, sizeof(sin)); in __yp_ping()
236 any = &reqs[i]->sin; in __yp_ping()
237 reqs[i]->xid = xid_seed; in __yp_ping()
245 return(-1); in __yp_ping()
257 return(-1); in __yp_ping()
259 clnt->cl_auth = authunix_create_default(); in __yp_ping()
270 clnt_control(clnt, CLSET_XID, (char *)&reqs[i]->xid); in __yp_ping()
271 addr.len = sizeof(reqs[i]->sin); in __yp_ping()
272 addr.buf = (char *) &reqs[i]->sin; in __yp_ping()
281 /* Got a winner -- look him up. */ in __yp_ping()
284 if (reqs[i] != NULL && reqs[i]->xid == xid_lookup) { in __yp_ping()
286 *port = reqs[i]->sin.sin_port; in __yp_ping()
291 auth_destroy(clnt->cl_auth); in __yp_ping()