1/*- 2 * Copyright (c) 1993, John Brezak 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35static const char rcsid[] = |
36 "$FreeBSD: head/usr.bin/rusers/rusers.c 78456 2001-06-19 03:48:26Z mikeh $"; |
37#endif /* not lint */ 38 39#include <sys/types.h> 40#include <sys/socket.h> 41#include <rpc/rpc.h> 42#include <rpc/pmap_clnt.h> 43#include <rpcsvc/rnusers.h> 44#include <arpa/inet.h> --- 141 unchanged lines hidden (view full) --- 186 bzero((char *)&up, sizeof(up)); 187 tv.tv_sec = 15; /* XXX ?? */ 188 tv.tv_usec = 0; 189 if (clnt_call(rusers_clnt, RUSERSPROC_NAMES, xdr_void, NULL, 190 xdr_utmpidlearr, &up, tv) != RPC_SUCCESS) 191 errx(1, "%s", clnt_sperror(rusers_clnt, "")); 192 addr.sin_addr.s_addr = *(int *)hp->h_addr; 193 rusers_reply((caddr_t)&up, &addr); |
194 clnt_destroy(rusers_clnt); |
195} 196 197void 198allhosts() 199{ 200 utmpidlearr up; 201 enum clnt_stat clnt_stat; 202 --- 43 unchanged lines hidden --- |