--- old/usr/src/cmd/cmd-inet/usr.bin/Makefile	2017-05-26 19:08:05.634445101 -0400
+++ new/usr/src/cmd/cmd-inet/usr.bin/Makefile	2017-05-26 19:08:05.668549784 -0400
@@ -26,7 +26,7 @@
 # Copyright 2016 Toomas Soome <tsoome@me.com>
 #
 
-PROG=		finger rdate ruptime rwho whois
+PROG=		finger rdate whois
 SUIDPROG=	rcp rlogin rsh
 ALL=		$(PROG) $(SUIDPROG)
 SRCS=		$(ALL:%=%.c)
@@ -39,7 +39,7 @@
 
 # As programs get lint-clean, add them here.  Eventually.
 # This hack should go away, and all in PROG should be lint-clean.
-LINTCLEAN=	rlogin.c rsh.c rcp.c rdate.c rwho.c whois.c
+LINTCLEAN=	rlogin.c rsh.c rcp.c rdate.c whois.c
 
 # Likewise, as subdirs get lint-clean, add them here.  Once
 # they're all clean, replace the dependency of the lint target
--- old/usr/src/cmd/cmd-inet/usr.bin/ruptime.c	2017-05-26 19:08:06.593175600 -0400
+++ /dev/null	2017-05-26 19:08:06.000000000 -0400
@@ -1,298 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-/*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
-/*	  All Rights Reserved	*/
-
-/*
- * University Copyright- Copyright (c) 1982, 1986, 1988
- * The Regents of the University of California
- * All Rights Reserved
- *
- * University Acknowledgment- Portions of this document are derived from
- * software developed by the University of California, Berkeley, and its
- * contributors.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/param.h>
-#include <stdio.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <protocols/rwhod.h>
-
-static DIR	*dirp;
-
-#define	HOSTLIM	100
-static int	hostslim = HOSTLIM;
-static int	nhosts;
-struct	hs {
-	struct	whod *hs_wd;
-	int	hs_nusers;
-};
-static int	hscmp(), ucmp(), lcmp(), tcmp();
-
-#define	RWHODIR		"/var/spool/rwho"
-
-static char	*interval();
-static time_t	now;
-static int	aflg;
-static int	rflg = 1;
-
-#define	down(h)		(now - (h)->hs_wd->wd_recvtime > 11 * 60)
-
-/* ARGSUSED */
-int
-main(int argc, char **argv)
-{
-	struct dirent *dp;
-	int f, i;
-	struct whod *buf;
-	int cc;
-	char *name;
-	struct hs *hs;
-	struct hs *hsp;
-	struct whod *wd;
-	struct whoent *we;
-	int maxloadav = 0;
-	int (*cmp)() = hscmp;
-	ptrdiff_t hoff;
-
-	name = *argv;
-	while (*++argv)
-		while (**argv)
-			switch (*(*argv)++) {
-			case 'a':
-				aflg++;
-				break;
-			case 'l':
-				cmp = lcmp;
-				break;
-			case 'u':
-				cmp = ucmp;
-				break;
-			case 't':
-				cmp = tcmp;
-				break;
-			case 'r':
-				rflg = -rflg;
-				break;
-			case '-':
-				break;
-			default:
-				(void) fprintf(stderr, "Usage: %s [ -alrtu ]"
-				    " (choose at most one of l, t, or u)\n",
-				    name);
-				exit(1);
-			}
-
-	if ((hs = malloc(hostslim * sizeof (struct hs))) == NULL) {
-		(void) fprintf(stderr, "initial hs malloc failed\n");
-		exit(1);
-	}
-	hsp = hs;
-	if ((buf = malloc(sizeof (struct whod))) == NULL) {
-		(void) fprintf(stderr, "initial buf malloc failed\n");
-		exit(1);
-	}
-
-	if (chdir(RWHODIR) < 0) {
-		perror(RWHODIR);
-		exit(1);
-	}
-	dirp = opendir(".");
-	if (dirp == NULL) {
-		perror(RWHODIR);
-		exit(1);
-	}
-	while (dp = readdir(dirp)) {
-		if (dp->d_ino == 0)
-			continue;
-		if (strncmp(dp->d_name, "whod.", 5))
-			continue;
-		if (nhosts == hostslim) {
-			/*
-			 * We trust that the file system's limit on the number
-			 * of files in a directory will kick in long before
-			 * integer overflow.
-			 */
-			hostslim = hostslim << 1;
-
-			/*
-			 * hsp points into an area about to be moved,
-			 * so we first remember its offset into hs[],
-			 * then restore it after realloc() has moved
-			 * the data.
-			 */
-			hoff = hsp - hs;
-			hs = realloc(hs, hostslim * sizeof (struct hs));
-			if (hs == NULL) {
-				(void) fprintf(stderr, "too many hosts\n");
-				exit(1);
-			}
-			hsp = hs + hoff;
-		}
-		f = open(dp->d_name, 0);
-		if (f > 0) {
-			int whdrsize = sizeof (*buf) - sizeof (buf->wd_we);
-
-			cc = read(f, buf, sizeof (struct whod));
-			if (cc >= whdrsize) {
-				hsp->hs_wd = malloc(whdrsize);
-				wd = buf;
-				bcopy((char *)buf, (char *)hsp->hs_wd,
-				    whdrsize);
-				hsp->hs_nusers = 0;
-				for (i = 0; i < 2; i++)
-					if (wd->wd_loadav[i] > maxloadav)
-						maxloadav = wd->wd_loadav[i];
-				/* LINTED:  pointer alignment */
-				we = (struct whoent *)(((char *)buf)+cc);
-				while (--we >= wd->wd_we)
-					if (aflg || we->we_idle < 3600)
-						hsp->hs_nusers++;
-				nhosts++; hsp++;
-			}
-		}
-		(void) close(f);
-	}
-	(void) time(&now);
-	qsort((char *)hs, nhosts, sizeof (hs[0]), cmp);
-	if (nhosts == 0) {
-		(void) printf("no hosts!?!\n");
-		exit(1);
-	}
-	for (i = 0; i < nhosts; i++) {
-		hsp = &hs[i];
-		if (down(hsp)) {
-			(void) printf("%-12s%s\n", hsp->hs_wd->wd_hostname,
-			    interval((int)(now - hsp->hs_wd->wd_recvtime),
-				"down"));
-			continue;
-		}
-		(void) printf("%-12s%s,  %4d user%s  load %*.2f,"
-		    " %*.2f, %*.2f\n",
-		    hsp->hs_wd->wd_hostname,
-		    interval(hsp->hs_wd->wd_sendtime -
-			hsp->hs_wd->wd_boottime, "  up"),
-		    hsp->hs_nusers,
-		    hsp->hs_nusers == 1 ? ", " : "s,",
-		    maxloadav >= 1000 ? 5 : 4,
-			hsp->hs_wd->wd_loadav[0] / 100.0,
-		    maxloadav >= 1000 ? 5 : 4,
-			hsp->hs_wd->wd_loadav[1] / 100.0,
-		    maxloadav >= 1000 ? 5 : 4,
-			hsp->hs_wd->wd_loadav[2] / 100.0);
-		free(hsp->hs_wd);
-	}
-
-	return (0);
-}
-
-static char *
-interval(int time, char *updown)
-{
-	static char resbuf[32];
-	int days, hours, minutes;
-
-	if (time < 0 || time > 10*365*24*60*60) {
-		(void) sprintf(resbuf, "   %s ??:??", updown);
-		return (resbuf);
-	}
-	minutes = (time + 59) / 60;		/* round to minutes */
-	hours = minutes / 60; minutes %= 60;
-	days = hours / 24; hours %= 24;
-	if (days)
-		(void) sprintf(resbuf, "%s %2d+%02d:%02d",
-		    updown, days, hours, minutes);
-	else
-		(void) sprintf(resbuf, "%s    %2d:%02d",
-		    updown, hours, minutes);
-	return (resbuf);
-}
-
-static int
-hscmp(struct hs *h1, struct hs *h2)
-{
-
-	return (rflg * strcmp(h1->hs_wd->wd_hostname, h2->hs_wd->wd_hostname));
-}
-
-/*
- * Compare according to load average.
- */
-static int
-lcmp(struct hs *h1, struct hs *h2)
-{
-
-	if (down(h1))
-		if (down(h2))
-			return (tcmp(h1, h2));
-		else
-			return (rflg);
-	else if (down(h2))
-		return (-rflg);
-	else
-		return (rflg *
-			(h2->hs_wd->wd_loadav[0] - h1->hs_wd->wd_loadav[0]));
-}
-
-/*
- * Compare according to number of users.
- */
-static int
-ucmp(struct hs *h1, struct hs *h2)
-{
-
-	if (down(h1))
-		if (down(h2))
-			return (tcmp(h1, h2));
-		else
-			return (rflg);
-	else if (down(h2))
-		return (-rflg);
-	else
-		return (rflg * (h2->hs_nusers - h1->hs_nusers));
-}
-
-/*
- * Compare according to uptime.
- */
-static int
-tcmp(struct hs *h1, struct hs *h2)
-{
-
-	return (rflg * (
-		(down(h2) ? h2->hs_wd->wd_recvtime - now :
-		    h2->hs_wd->wd_sendtime - h2->hs_wd->wd_boottime)
-		-
-		(down(h1) ? h1->hs_wd->wd_recvtime - now :
-		    h1->hs_wd->wd_sendtime - h1->hs_wd->wd_boottime)));
-}
--- old/usr/src/cmd/cmd-inet/usr.bin/rwho.c	2017-05-26 19:08:06.935598013 -0400
+++ /dev/null	2017-05-26 19:08:06.000000000 -0400
@@ -1,192 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-/*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
-/*	  All Rights Reserved  	*/
-
-/*
- * University Copyright- Copyright (c) 1982, 1986, 1988
- * The Regents of the University of California
- * All Rights Reserved
- *
- * University Acknowledgment- Portions of this document are derived from
- * software developed by the University of California, Berkeley, and its
- * contributors.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/param.h>
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <time.h>
-#include <unistd.h>
-
-#include <protocols/rwhod.h>
-
-static	DIR *dirp;
-
-static	struct whod wd;
-#define	NUSERS	1000
-static	struct myutmp {
-	char	myhost[32];
-	int	myidle;
-	struct	outmp myutmp;
-} myutmp[NUSERS];
-static	int utmpcmp(const void *, const void *);
-static	int nusers;
-
-#define	WHDRSIZE	(sizeof (wd) - sizeof (wd.wd_we))
-#define	RWHODIR		"/var/spool/rwho"
-/*
- * this macro should be shared with ruptime.
- */
-#define	down(w, now)	((now) - (w)->wd_recvtime > 11 * 60)
-
-static	time_t now;
-static	int aflg = 0;
-
-int
-main(int argc, char **argv)
-{
-	struct dirent *dp;
-	int cc, width;
-	register struct whod *w = &wd;
-	register struct whoent *we;
-	register struct myutmp *mp;
-	int f, n, i;
-
-	argc--, argv++;
-again:
-	if (argc > 0 && strcmp(argv[0], "-a") == 0) {
-		argc--, argv++;
-		aflg++;
-		goto again;
-	}
-	(void) time(&now);
-	if (chdir(RWHODIR) < 0) {
-		perror(RWHODIR);
-		return (EXIT_FAILURE);
-	}
-	dirp = opendir(".");
-	if (dirp == NULL) {
-		perror(RWHODIR);
-		return (EXIT_FAILURE);
-	}
-	mp = myutmp;
-	while (dp = readdir(dirp)) {
-		if (dp->d_ino == 0)
-			continue;
-		if (strncmp(dp->d_name, "whod.", 5))
-			continue;
-		f = open(dp->d_name, 0);
-		if (f < 0)
-			continue;
-		cc = read(f, (char *)&wd, sizeof (struct whod));
-		if (cc < WHDRSIZE) {
-			(void) close(f);
-			continue;
-		}
-		if (down(w, now)) {
-			(void) close(f);
-			continue;
-		}
-		cc -= WHDRSIZE;
-		we = w->wd_we;
-		for (n = cc / sizeof (struct whoent); n > 0; n--) {
-			if (aflg == 0 && we->we_idle >= 60*60) {
-				we++;
-				continue;
-			}
-			if (nusers >= NUSERS) {
-				(void) printf("too many users\n");
-				return (EXIT_FAILURE);
-			}
-			mp->myutmp = we->we_utmp; mp->myidle = we->we_idle;
-			(void) strncpy(mp->myhost, w->wd_hostname,
-			    sizeof (mp->myhost));
-			nusers++; we++; mp++;
-		}
-		(void) close(f);
-	}
-	qsort((char *)myutmp, nusers, sizeof (struct myutmp), utmpcmp);
-	mp = myutmp;
-	width = 0;
-	for (i = 0; i < nusers; i++) {
-		int j = strlen(mp->myhost) + 1 + strlen(mp->myutmp.out_line);
-		if (j > width)
-			width = j;
-		mp++;
-	}
-	mp = myutmp;
-	for (i = 0; i < nusers; i++) {
-		char buf[BUFSIZ];
-		(void) snprintf(buf, BUFSIZ, "%.*s:%.*s",
-		    sizeof (mp->myhost), mp->myhost,
-		    sizeof (mp->myutmp.out_line), mp->myutmp.out_line);
-		(void) printf("%-8.*s %-*s %.12s",
-		    sizeof (mp->myutmp.out_name), mp->myutmp.out_name,
-		    width, buf,
-		    ctime((time_t *)&mp->myutmp.out_time) + 4);
-		mp->myidle /= 60;
-		if (mp->myidle) {
-			if (aflg) {
-				if (mp->myidle >= 100*60)
-					mp->myidle = 100*60 - 1;
-				if (mp->myidle >= 60)
-					(void) printf(" %2d", mp->myidle / 60);
-				else
-					(void) fputs("   ", stdout);
-			} else
-				(void) printf(" ");
-			(void) printf(":%02d", mp->myidle % 60);
-		}
-		(void) puts("");
-		mp++;
-	}
-	return (EXIT_SUCCESS);
-}
-
-static int
-utmpcmp(const void *p1, const void *p2)
-{
-	const struct myutmp *u1 = p1, *u2 = p2;
-	int rc;
-
-	rc = strncmp(u1->myutmp.out_name, u2->myutmp.out_name,
-	    sizeof (u1->myutmp.out_name));
-	if (rc != 0)
-		return (rc);
-	rc = strncmp(u1->myhost, u2->myhost, sizeof (u1->myhost));
-	if (rc != 0)
-		return (rc);
-	return (strncmp(u1->myutmp.out_line, u2->myutmp.out_line,
-	    sizeof (u1->myutmp.out_line)));
-}
--- old/usr/src/cmd/cmd-inet/usr.sbin/Makefile	2017-05-26 19:08:07.294802133 -0400
+++ new/usr/src/cmd/cmd-inet/usr.sbin/Makefile	2017-05-26 19:08:07.328579419 -0400
@@ -28,7 +28,7 @@
 
 PROG=		6to4relay arp if_mpadm \
 		in.comsat in.fingerd in.rarpd in.rexecd in.rlogind \
-		in.rshd in.rwhod in.telnetd in.tftpd ipaddrsel \
+		in.rshd in.telnetd in.tftpd ipaddrsel \
 		ndd ndp $(SYNCPROG) wanbootutil
 
 MANIFEST=	rarp.xml telnet.xml comsat.xml finger.xml \
@@ -43,9 +43,9 @@
 PAMPROG=	in.rexecd in.rlogind in.rshd in.telnetd
 SOCKETPROG=	6to4relay arp hostconfig if_mpadm in.comsat \
 		in.fingerd in.rarpd in.rexecd in.rlogind in.rshd \
-		in.rwhod in.telnetd in.tftpd ipaddrsel ndp route
+		in.telnetd in.tftpd ipaddrsel ndp route
 NSLPROG=	6to4relay arp hostconfig in.comsat in.rarpd \
-		in.rexecd in.rlogind in.rshd in.rwhod in.telnetd \
+		in.rexecd in.rlogind in.rshd in.telnetd \
 		in.tftpd ipaddrsel ndp route
 CMDPROG=	in.telnetd
 K5PROGS=	in.telnetd in.rlogind in.rshd
--- old/usr/src/cmd/cmd-inet/usr.sbin/in.rwhod.c	2017-05-26 19:08:08.259437787 -0400
+++ /dev/null	2017-05-26 19:08:08.000000000 -0400
@@ -1,777 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-/*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
-/*	  All Rights Reserved  	*/
-
-/*
- * Portions of this source code were derived from Berkeley 4.3 BSD
- * under license from the Regents of the University of California.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/file.h>
-#include <sys/loadavg.h>
-
-#include <net/if.h>
-#include <netinet/in.h>
-
-#include <stdio.h>
-#include <signal.h>
-#include <errno.h>
-#include <utmpx.h>
-#include <ctype.h>
-#include <netdb.h>
-#include <syslog.h>
-#include <fcntl.h>
-#include <sys/isa_defs.h>	/* for ENDIAN defines */
-#include <arpa/inet.h>
-#include <protocols/rwhod.h>
-
-#include <strings.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/*
- * This version of Berkeley's rwhod has been modified to use IP multicast
- * datagrams, under control of a new command-line option:
- *
- *	rwhod -m	causes rwhod to use IP multicast (instead of
- *			broadcast or unicast) on all interfaces that have
- *			the IFF_MULTICAST flag set in their "ifnet" structs
- *			(excluding the loopback interface).  The multicast
- *			reports are sent with a time-to-live of 1, to prevent
- *			forwarding beyond the directly-connected subnet(s).
- *
- *	rwhod -m <ttl>	causes rwhod to send IP multicast datagrams with a
- *			time-to-live of <ttl>, via a SINGLE interface rather
- *			than all interfaces.  <ttl> must be between 0 and
- *			MAX_MULTICAST_SCOPE, defined below.  Note that "-m 1"
- *			is different than "-m", in that "-m 1" specifies
- *			transmission on one interface only.
- *
- * When "-m" is used without a <ttl> argument, the program accepts multicast
- * rwhod reports from all multicast-capable interfaces.  If a <ttl> argument
- * is given, it accepts multicast reports from only one interface, the one
- * on which reports are sent (which may be controlled via the host's routing
- * table).  Regardless of the "-m" option, the program accepts broadcast or
- * unicast reports from all interfaces.  Thus, this program will hear the
- * reports of old, non-multicasting rwhods, but, if multicasting is used,
- * those old rwhods won't hear the reports generated by this program.
- *
- *                  -- Steve Deering, Stanford University, February 1989
- */
-
-#define	NO_MULTICAST		0	  /* multicast modes */
-#define	PER_INTERFACE_MULTICAST	1
-#define	SCOPED_MULTICAST	2
-
-#define	MAX_MULTICAST_SCOPE	32	  /* "site-wide", by convention */
-
-#define	INADDR_WHOD_GROUP	(ulong_t)0xe0000103	/* 224.0.1.3 */
-					/* (belongs in protocols/rwhod.h) */
-
-static int			multicast_mode  = NO_MULTICAST;
-static int			multicast_scope;
-static struct sockaddr_in	multicast_addr  = { AF_INET };
-
-
-/*
- * Alarm interval. Don't forget to change the down time check in ruptime
- * if this is changed.
- */
-#define	AL_INTERVAL (3 * 60)
-
-static struct	sockaddr_in sin = { AF_INET };
-
-static char	myname[MAXHOSTNAMELEN];
-
-/*
- * We communicate with each neighbor in
- * a list constructed at the time we're
- * started up.  Neighbors are currently
- * directly connected via a hardware interface.
- */
-struct	neighbor {
-	struct	neighbor *n_next;
-	char	*n_name;		/* interface name */
-	char	*n_addr;		/* who to send to */
-	int	n_addrlen;		/* size of address */
-	ulong_t	n_subnet;		/* AF_INET subnet */
-	uint_t	n_flags;		/* should forward?, interface flags */
-};
-
-static struct	neighbor *neighbors;
-static struct	whod mywd;
-static struct	servent *sp;
-static int	s;
-
-#define	WHDRSIZE	(sizeof (mywd) - sizeof (mywd.wd_we))
-#define	RWHODIR		"/var/spool/rwho"
-
-static void		onalrm(void);
-static void		getkmem(void);
-static boolean_t	configure(int);
-static int		verify(const struct whod *);
-
-int
-main(int argc, char *argv[])
-{
-	struct sockaddr_in from;
-	struct stat st;
-	char path[64];
-	struct hostent *hp;
-	int on = 1;
-	char *cp;
-	struct stat sb;
-
-	if (getuid()) {
-		(void) fprintf(stderr, "in.rwhod: not super user\n");
-		exit(1);
-	}
-	sp = getservbyname("who", "udp");
-	if (sp == NULL) {
-		(void) fprintf(stderr, "in.rwhod: udp/who: unknown service\n");
-		exit(1);
-	}
-	argv++;
-	argc--;
-	while (argc > 0 && *argv[0] == '-') {
-		if (strcmp(*argv, "-m") == 0) {
-			if (argc > 1 && isdigit(*(argv + 1)[0])) {
-				argv++;
-				argc--;
-				multicast_mode  = SCOPED_MULTICAST;
-				multicast_scope = atoi(*argv);
-				if (multicast_scope > MAX_MULTICAST_SCOPE) {
-					(void) fprintf(stderr,
-					    "in.rwhod: "
-					    "ttl must not exceed %u\n",
-					    MAX_MULTICAST_SCOPE);
-					exit(1);
-				}
-			} else {
-				multicast_mode = PER_INTERFACE_MULTICAST;
-			}
-		} else {
-			goto usage;
-		}
-		argv++;
-		argc--;
-	}
-	if (argc > 0)
-		goto usage;
-	if (chdir(RWHODIR) < 0) {
-		perror(RWHODIR);
-		exit(1);
-	}
-#ifndef DEBUG
-	if (fork())
-		exit(0);
-	/* CSTYLED */
-	{
-		(void) close(0);
-		(void) close(1);
-		(void) close(2);
-		(void) open("/", 0);
-		(void) dup2(0, 1);
-		(void) dup2(0, 2);
-		(void) setsid();
-	}
-#endif
-	(void) sigset(SIGHUP, (void (*)())getkmem);
-	openlog("in.rwhod", LOG_PID, LOG_DAEMON);
-	/*
-	 * Establish host name as returned by system.
-	 */
-	if (gethostname(myname, sizeof (myname) - 1) < 0) {
-		syslog(LOG_ERR, "main: gethostname: %m");
-		exit(1);
-	}
-	if ((cp = index(myname, '.')) != NULL)
-		*cp = '\0';
-	(void) strlcpy(mywd.wd_hostname, myname, sizeof (mywd.wd_hostname));
-
-	if (stat(UTMPX_FILE, &sb) < 0) {
-		syslog(LOG_ERR, "main: stat: %s: %m", UTMPX_FILE);
-		exit(1);
-	}
-	getkmem();
-	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
-		syslog(LOG_ERR, "main: socket: %m");
-		exit(1);
-	}
-	if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) < 0) {
-		syslog(LOG_ERR, "main: setsockopt SO_BROADCAST: %m");
-		exit(1);
-	}
-	hp = gethostbyname(myname);
-	if (hp == NULL) {
-		syslog(LOG_ERR, "main: %s: don't know my own name\n", myname);
-		exit(1);
-	}
-	sin.sin_family = hp->h_addrtype;
-	sin.sin_port = sp->s_port;
-	if (bind(s, (struct sockaddr *)&sin, sizeof (sin)) < 0) {
-		syslog(LOG_ERR, "main: bind: %m");
-		exit(1);
-	}
-	if (!configure(s))
-		exit(1);
-	(void) sigset(SIGALRM, (void (*)())onalrm);
-	onalrm();
-	for (;;) {
-		struct whod wd;
-		int cc, whod;
-		socklen_t len = sizeof (from);
-
-		cc = recvfrom(s, &wd, sizeof (struct whod), 0,
-		    (struct sockaddr *)&from, &len);
-		if (cc <= 0) {
-			if (cc < 0 && errno != EINTR)
-				syslog(LOG_WARNING, "main: recvfrom: %m");
-			continue;
-		}
-		if (from.sin_port != sp->s_port) {
-			syslog(LOG_WARNING, "main: %d: bad from port",
-			    ntohs(from.sin_port));
-			continue;
-		}
-#ifdef notdef
-		if (gethostbyname(wd.wd_hostname) == 0) {
-			syslog(LOG_WARNING, "main: %s: unknown host",
-			    wd.wd_hostname);
-			continue;
-		}
-#endif
-		if (wd.wd_vers != WHODVERSION)
-			continue;
-		if (wd.wd_type != WHODTYPE_STATUS)
-			continue;
-		if (!verify(&wd)) {
-			syslog(LOG_WARNING, "main: malformed host name from %x",
-			    from.sin_addr.s_addr);
-			continue;
-		}
-		(void) sprintf(path, "whod.%s", wd.wd_hostname);
-		/*
-		 * Rather than truncating and growing the file each time,
-		 * use ftruncate if size is less than previous size.
-		 */
-		whod = open(path, O_WRONLY | O_CREAT, 0644);
-		if (whod < 0) {
-			syslog(LOG_WARNING, "main: open: %s: %m", path);
-			continue;
-		}
-#if defined(_LITTLE_ENDIAN)
-		/* CSTYLED */
-		{
-			int i, n = (cc - WHDRSIZE)/sizeof (struct whoent);
-			struct whoent *we;
-
-			/* undo header byte swapping before writing to file */
-			wd.wd_sendtime = ntohl(wd.wd_sendtime);
-			for (i = 0; i < 3; i++)
-				wd.wd_loadav[i] = ntohl(wd.wd_loadav[i]);
-			wd.wd_boottime = ntohl(wd.wd_boottime);
-			we = wd.wd_we;
-			for (i = 0; i < n; i++) {
-				we->we_idle = ntohl(we->we_idle);
-				we->we_utmp.out_time =
-				    ntohl(we->we_utmp.out_time);
-				we++;
-			}
-		}
-#endif
-		(void) time((time_t *)&wd.wd_recvtime);
-		(void) write(whod, &wd, cc);
-		if (fstat(whod, &st) < 0 || st.st_size > cc)
-			(void) ftruncate(whod, cc);
-		(void) close(whod);
-	}
-	/* NOTREACHED */
-usage:
-	(void) fprintf(stderr, "usage: in.rwhod [ -m [ ttl ] ]\n");
-	return (1);
-}
-
-/*
- * Check out host name for unprintables
- * and other funnies before allowing a file
- * to be created.  Sorry, but blanks aren't allowed.
- */
-static int
-verify(const struct whod *wd)
-{
-	int size = 0;
-	const char *name = wd->wd_hostname;
-
-	/*
-	 * We shouldn't assume the name is NUL terminated, so bound the
-	 * checks at the size of the whod structures wd_hostname field.
-	 */
-	while ((size < sizeof (wd->wd_hostname)) &&
-	    (*name != '\0')) {
-		if (*name == '/' || !isascii(*name) ||
-		    !(isalnum(*name) || ispunct(*name)))
-			return (0);
-		name++, size++;
-	}
-	/*
-	 * Fail the verification if NULL name or it wasn't NUL terminated.
-	 */
-	return ((size > 0) && (size < sizeof (wd->wd_hostname)));
-}
-
-static int	utmpxtime;
-static int	utmpxent;
-static int	alarmcount;
-struct	utmpx *utmpx;
-
-static void
-onalrm(void)
-{
-	int i;
-	struct stat stb;
-	int	utmpxsize = 0;
-	int	entries;
-	struct	utmpx *utp;
-	struct	utmpx *utmpxbegin;
-	struct whoent *we = mywd.wd_we, *wlast;
-	int cc, cnt;
-	double avenrun[3];
-
-	time_t now = time(0);
-	struct neighbor *np;
-
-	if (alarmcount % 10 == 0)
-		getkmem();
-	alarmcount++;
-	(void) stat(UTMPX_FILE, &stb);
-	entries = stb.st_size / sizeof (struct futmpx);
-	if ((stb.st_mtime != utmpxtime) || (entries > utmpxent)) {
-		utmpxtime = stb.st_mtime;
-		if (entries > utmpxent) {
-			utmpxent = entries;
-			utmpxsize = utmpxent * sizeof (struct utmpx);
-			utmpx = realloc(utmpx, utmpxsize);
-			if (utmpx == NULL) {
-				syslog(LOG_ERR, "onalrm: realloc: %m");
-				utmpxsize = 0;
-				goto done;
-			}
-		}
-		utmpxbegin = utmpx;
-		setutxent();
-		cnt = 0;
-		while (cnt++ < utmpxent && (utp = getutxent()) != NULL)
-			(void) memcpy(utmpxbegin++, utp, sizeof (struct utmpx));
-		endutxent();
-		wlast = &mywd.wd_we[1024 / sizeof (struct whoent) - 1];
-		for (i = 0; i < utmpxent; i++) {
-			if (utmpx[i].ut_name[0] &&
-			    utmpx[i].ut_type == USER_PROCESS) {
-				/*
-				 * XXX - utmpx name and line lengths should
-				 * be here
-				 */
-				bcopy(utmpx[i].ut_line, we->we_utmp.out_line,
-				    sizeof (we->we_utmp.out_line));
-				bcopy(utmpx[i].ut_name, we->we_utmp.out_name,
-				    sizeof (we->we_utmp.out_name));
-				we->we_utmp.out_time =
-				    htonl(utmpx[i].ut_xtime);
-				if (we >= wlast)
-					break;
-				we++;
-			}
-		}
-		utmpxent = we - mywd.wd_we;
-	}
-
-	/*
-	 * The test on utmpxent looks silly---after all, if no one is
-	 * logged on, why worry about efficiency?---but is useful on
-	 * (e.g.) compute servers.
-	 */
-	if (utmpxent > 0 && chdir("/dev") == -1) {
-		syslog(LOG_ERR, "onalrm: chdir /dev: %m");
-		exit(1);
-	}
-	we = mywd.wd_we;
-	for (i = 0; i < utmpxent; i++) {
-		if (stat(we->we_utmp.out_line, &stb) >= 0)
-			we->we_idle = htonl(now - stb.st_atime);
-		we++;
-	}
-	if (getloadavg(avenrun, 3) == -1) {
-		syslog(LOG_ERR, "onalrm: getloadavg: %m");
-		exit(1);
-	}
-
-	for (i = 0; i < 3; i++)
-		mywd.wd_loadav[i] = htonl((ulong_t)(avenrun[i] * 100));
-	cc = (char *)we - (char *)&mywd;
-	mywd.wd_sendtime = htonl(time(0));
-	mywd.wd_vers = WHODVERSION;
-	mywd.wd_type = WHODTYPE_STATUS;
-	if (multicast_mode == SCOPED_MULTICAST) {
-		(void) sendto(s, &mywd, cc, 0,
-		    (struct sockaddr *)&multicast_addr,
-		    sizeof (multicast_addr));
-	} else for (np = neighbors; np != NULL; np = np->n_next) {
-		if (multicast_mode == PER_INTERFACE_MULTICAST &&
-		    np->n_flags & IFF_MULTICAST) {
-			/*
-			 * Select the outgoing interface for the multicast.
-			 */
-			if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF,
-			    &(((struct sockaddr_in *)np->n_addr)->sin_addr),
-			    sizeof (struct in_addr)) < 0) {
-				syslog(LOG_ERR,
-				    "onalrm: setsockopt IP_MULTICAST_IF: %m");
-				exit(1);
-			}
-			(void) sendto(s, &mywd, cc, 0,
-			    (struct sockaddr *)&multicast_addr,
-			    sizeof (multicast_addr));
-		} else {
-			(void) sendto(s, &mywd, cc, 0,
-			    (struct sockaddr *)np->n_addr, np->n_addrlen);
-		}
-	}
-	if (utmpxent > 0 && chdir(RWHODIR) == -1) {
-		syslog(LOG_ERR, "onalrm: chdir %s: %m", RWHODIR);
-		exit(1);
-	}
-done:
-	(void) alarm(AL_INTERVAL);
-}
-
-static void
-getkmem(void)
-{
-	struct utmpx *utmpx, utmpx_id;
-
-	utmpx_id.ut_type = BOOT_TIME;
-	if ((utmpx = getutxid(&utmpx_id)) != NULL)
-		mywd.wd_boottime = utmpx->ut_xtime;
-	endutxent();
-	mywd.wd_boottime = htonl(mywd.wd_boottime);
-}
-
-/*
- * Figure out device configuration and select
- * networks which deserve status information.
- */
-static boolean_t
-configure(int s)
-{
-	char *buf;
-	struct ifconf ifc;
-	struct ifreq ifreq, *ifr;
-	struct sockaddr_in *sin;
-	struct neighbor *np;
-	struct neighbor *np2;
-	int n;
-	int numifs;
-	unsigned bufsize;
-
-	if (multicast_mode == SCOPED_MULTICAST) {
-		struct ip_mreq mreq;
-		unsigned char ttl;
-
-		mreq.imr_multiaddr.s_addr = htonl(INADDR_WHOD_GROUP);
-		mreq.imr_interface.s_addr = htonl(INADDR_ANY);
-		if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq,
-		    sizeof (mreq)) < 0) {
-			syslog(LOG_ERR,
-			    "configure: setsockopt IP_ADD_MEMBERSHIP: %m");
-			return (B_FALSE);
-		}
-		ttl = multicast_scope;
-		if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl,
-		    sizeof (ttl)) < 0) {
-			syslog(LOG_ERR,
-			    "configure: setsockopt IP_MULTICAST_TTL: %m");
-			return (B_FALSE);
-		}
-		multicast_addr.sin_addr.s_addr = htonl(INADDR_WHOD_GROUP);
-		multicast_addr.sin_port = sp->s_port;
-		return (B_TRUE);
-	}
-
-	if (ioctl(s, SIOCGIFNUM, (char *)&numifs) < 0) {
-		syslog(LOG_ERR, "configure: ioctl SIOCGIFNUM: %m");
-		return (B_FALSE);
-	}
-	bufsize = numifs * sizeof (struct ifreq);
-	buf = malloc(bufsize);
-	if (buf == NULL) {
-		syslog(LOG_ERR, "configure: malloc: %m");
-		return (B_FALSE);
-	}
-	ifc.ifc_len = bufsize;
-	ifc.ifc_buf = buf;
-	if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0) {
-		syslog(LOG_ERR,
-		    "configure: ioctl (get interface configuration): %m");
-		(void) free(buf);
-		return (B_FALSE);
-	}
-	ifr = ifc.ifc_req;
-	for (n = ifc.ifc_len / sizeof (struct ifreq); n > 0; n--, ifr++) {
-		/* Skip all logical interfaces */
-		if (index(ifr->ifr_name, ':') != NULL)
-			continue;
-
-		for (np = neighbors; np != NULL; np = np->n_next) {
-			if (np->n_name &&
-			    strcmp(ifr->ifr_name, np->n_name) == 0)
-				break;
-		}
-		if (np != NULL)
-			continue;
-		ifreq = *ifr;
-		np = (struct neighbor *)malloc(sizeof (*np));
-		if (np == NULL)
-			continue;
-		np->n_name = malloc(strlen(ifr->ifr_name) + 1);
-		if (np->n_name == NULL) {
-			free(np);
-			continue;
-		}
-		(void) strcpy(np->n_name, ifr->ifr_name);
-		np->n_addrlen = sizeof (ifr->ifr_addr);
-		np->n_addr = malloc(np->n_addrlen);
-		if (np->n_addr == NULL) {
-			free(np->n_name);
-			free(np);
-			continue;
-		}
-		bcopy(&ifr->ifr_addr, np->n_addr, np->n_addrlen);
-		if (ioctl(s, SIOCGIFFLAGS, (char *)&ifreq) < 0) {
-			syslog(LOG_ERR,
-			    "configure: ioctl (get interface flags): %m");
-			free(np->n_addr);
-			free(np->n_name);
-			free(np);
-			continue;
-		}
-		np->n_flags = ifreq.ifr_flags;
-		if (((struct sockaddr_in *)np->n_addr)->sin_family == AF_INET &&
-		    ioctl(s, SIOCGIFNETMASK, (char *)&ifreq) >= 0) {
-			sin = (struct sockaddr_in *)np->n_addr;
-
-			np->n_subnet = sin->sin_addr.s_addr &
-			    ((struct sockaddr_in *)&ifreq.ifr_addr)->
-			    sin_addr.s_addr;
-		}
-		if (multicast_mode == PER_INTERFACE_MULTICAST &&
-		    (np->n_flags & IFF_UP) &&
-		    (np->n_flags & IFF_MULTICAST) &&
-		    !(np->n_flags & IFF_LOOPBACK)) {
-			struct ip_mreq mreq;
-
-			/*
-			 * Skip interfaces that have matching subnets i.e.
-			 * (addr & netmask) are identical.
-			 * Such interfaces are connected to the same
-			 * physical wire.
-			 */
-			for (np2 = neighbors; np2 != NULL; np2 = np2->n_next) {
-
-				if (!(np->n_flags & IFF_POINTOPOINT) &&
-				    !(np2->n_flags & IFF_POINTOPOINT) &&
-				    (np->n_subnet == np2->n_subnet)) {
-					free(np->n_addr);
-					free(np->n_name);
-					free(np);
-					break;
-				}
-			}
-			if (np2 != NULL)
-				continue;
-
-			mreq.imr_multiaddr.s_addr = htonl(INADDR_WHOD_GROUP);
-			mreq.imr_interface.s_addr =
-			    ((struct sockaddr_in *)np->n_addr)->sin_addr.s_addr;
-			if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq,
-			    sizeof (mreq)) < 0) {
-				syslog(LOG_ERR,
-				    "configure: "
-				    "setsockopt IP_ADD_MEMBERSHIP: %m");
-				free(np->n_addr);
-				free(np->n_name);
-				free(np);
-				continue;
-			}
-			multicast_addr.sin_addr.s_addr =
-			    htonl(INADDR_WHOD_GROUP);
-			multicast_addr.sin_port = sp->s_port;
-			np->n_next = neighbors;
-			neighbors = np;
-			continue;
-		}
-		if ((np->n_flags & IFF_UP) == 0 ||
-		    (np->n_flags & (IFF_BROADCAST|IFF_POINTOPOINT)) == 0) {
-			free(np->n_addr);
-			free(np->n_name);
-			free(np);
-			continue;
-		}
-		if (np->n_flags & IFF_POINTOPOINT) {
-			if (ioctl(s, SIOCGIFDSTADDR, (char *)&ifreq) < 0) {
-				syslog(LOG_ERR,
-				    "configure: ioctl (get dstaddr): %m");
-				free(np->n_addr);
-				free(np->n_name);
-				free(np);
-				continue;
-			}
-			/* we assume addresses are all the same size */
-			bcopy(&ifreq.ifr_dstaddr, np->n_addr, np->n_addrlen);
-		}
-		if (np->n_flags & IFF_BROADCAST) {
-			if (ioctl(s, SIOCGIFBRDADDR, (char *)&ifreq) < 0) {
-				syslog(LOG_ERR,
-				    "configure: ioctl (get broadaddr): %m");
-				free(np->n_addr);
-				free(np->n_name);
-				free(np);
-				continue;
-			}
-			/* we assume addresses are all the same size */
-			bcopy(&ifreq.ifr_broadaddr, np->n_addr, np->n_addrlen);
-		}
-		/* gag, wish we could get rid of Internet dependencies */
-		sin = (struct sockaddr_in *)np->n_addr;
-		sin->sin_port = sp->s_port;
-
-		/*
-		 * Avoid adding duplicate broadcast and pt-pt destinations
-		 * to the list.
-		 */
-		for (np2 = neighbors; np2 != NULL; np2 = np2->n_next) {
-			struct sockaddr_in *sin2;
-
-			sin2 = (struct sockaddr_in *)np2->n_addr;
-			if (sin2->sin_addr.s_addr == sin->sin_addr.s_addr) {
-				free(np->n_addr);
-				free(np->n_name);
-				free(np);
-				break;
-			}
-		}
-		if (np2 != NULL)
-			continue;
-
-		np->n_next = neighbors;
-		neighbors = np;
-	}
-	(void) free(buf);
-	return (B_TRUE);
-}
-
-#ifdef DEBUG
-static char *interval(uint_t, char *);
-
-/* ARGSUSED */
-static ssize_t
-sendto(int s, const void *buf, size_t cc, int flags, const struct sockaddr *to,
-    socklen_t tolen)
-{
-	struct whod *w = (struct whod *)buf;
-	struct whoent *we;
-	struct sockaddr_in *sin = (struct sockaddr_in *)to;
-	int nsz;
-
-	(void) printf("sendto %x.%d\n", ntohl(sin->sin_addr.s_addr),
-	    ntohs(sin->sin_port));
-	(void) printf("hostname %s %s\n", w->wd_hostname,
-	    interval(ntohl(w->wd_sendtime) - ntohl(w->wd_boottime), "  up"));
-	(void) printf("load %4.2f, %4.2f, %4.2f\n",
-	    ntohl(w->wd_loadav[0]) / 100.0, ntohl(w->wd_loadav[1]) / 100.0,
-	    ntohl(w->wd_loadav[2]) / 100.0);
-	cc -= WHDRSIZE;
-	for (we = w->wd_we, cc /= sizeof (struct whoent); cc > 0; cc--, we++) {
-		time_t t = ntohl(we->we_utmp.out_time);
-
-		nsz = sizeof (we->we_utmp.out_name);
-		(void) printf("%-*.*s %s:%s %.12s",
-		    nsz,
-		    nsz,
-		    we->we_utmp.out_name,
-		    w->wd_hostname,
-		    we->we_utmp.out_line,
-		    ctime(&t)+4);
-		we->we_idle = ntohl(we->we_idle) / 60;
-		if (we->we_idle) {
-			if (we->we_idle >= 100*60)
-				we->we_idle = 100*60 - 1;
-			if (we->we_idle >= 60)
-				(void) printf(" %2d", we->we_idle / 60);
-			else
-				(void) printf("   ");
-			(void) printf(":%02d", we->we_idle % 60);
-		}
-		(void) printf("\n");
-	}
-	return (0);
-}
-
-static char *
-interval(uint_t time, char *updown)
-{
-	static char resbuf[32];
-	int days, hours, minutes;
-
-	if (time > 3*30*24*60*60) {
-		(void) sprintf(resbuf, "   %s ??:??", updown);
-		return (resbuf);
-	}
-	minutes = (time + 59) / 60;		/* round to minutes */
-	hours = minutes / 60;
-	minutes %= 60;
-	days = hours / 24;
-	hours %= 24;
-	if (days > 0) {
-		(void) sprintf(resbuf, "%s %2d+%02d:%02d",
-		    updown, days, hours, minutes);
-	} else {
-		(void) sprintf(resbuf, "%s    %2d:%02d",
-		    updown, hours, minutes);
-	}
-	return (resbuf);
-}
-#endif
--- old/usr/src/head/Makefile	2017-05-26 19:08:08.609439979 -0400
+++ new/usr/src/head/Makefile	2017-05-26 19:08:08.643695963 -0400
@@ -306,7 +306,7 @@
 
 RPCSVCHDRS= $(RPCSVC_SRC_HDRS) $(RPCSVC_GEN_HDRS)
 
-PROTOHDRS=   dumprestore.h routed.h ripngd.h rwhod.h timed.h
+PROTOHDRS=   dumprestore.h routed.h ripngd.h timed.h
 
 ROOTHDRS= $(HDRS:%=$(ROOT)/usr/include/%)  \
 	$(KRB5HDRS:%=$(ROOT)/usr/include/kerberosv5/%)  \
--- old/usr/src/head/protocols/rwhod.h	2017-05-26 19:08:09.582550006 -0400
+++ /dev/null	2017-05-26 19:08:09.000000000 -0400
@@ -1,76 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-/*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
-/*	  All Rights Reserved  	*/
-
-/*
- * Portions of this source code were derived from Berkeley 4.3 BSD
- * under license from the Regents of the University of California.
- */
-
-/*
- * rwho protocol packet format.
- */
-
-#ifndef _PROTOCOLS_RWHOD_H
-#define	_PROTOCOLS_RWHOD_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-struct	outmp {
-	char	out_line[8];		/* tty name */
-	char	out_name[8];		/* user id */
-	long	out_time;		/* time on */
-};
-
-struct	whod {
-	char	wd_vers;		/* protocol version # */
-	char	wd_type;		/* packet type, see below */
-	char	wd_pad[2];
-	int	wd_sendtime;		/* time stamp by sender */
-	int	wd_recvtime;		/* time stamp applied by receiver */
-	char	wd_hostname[32];	/* hosts's name */
-	int	wd_loadav[3];		/* load average as in uptime */
-	int	wd_boottime;		/* time system booted */
-	struct	whoent {
-		struct	outmp we_utmp;	/* active tty info */
-		int	we_idle;	/* tty idle time */
-	} wd_we[1024 / sizeof (struct whoent)];
-};
-
-#define	WHODVERSION	1
-#define	WHODTYPE_STATUS	1		/* host status */
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _PROTOCOLS_RWHOD_H */
--- old/usr/src/man/man1/Makefile	2017-05-26 19:08:09.947067541 -0400
+++ new/usr/src/man/man1/Makefile	2017-05-26 19:08:09.981483652 -0400
@@ -323,8 +323,6 @@
 	 	rpcgen.1			\
 	 	rsh.1				\
 	 	runat.1				\
-	 	ruptime.1			\
-	 	rwho.1				\
 	 	sar.1				\
 	 	script.1			\
 	 	sdiff.1				\
--- old/usr/src/man/man1/ruptime.1	2017-05-26 19:08:11.094383811 -0400
+++ /dev/null	2017-05-26 19:08:11.000000000 -0400
@@ -1,104 +0,0 @@
-'\" te
-.\" Copyright 1989 AT&T
-.\" Copyright (c) 2000, Sun Microsystems, Inc.
-.\"  All Rights Reserved
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
-.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH RUPTIME 1 "Nov 6, 2000"
-.SH NAME
-ruptime \- show host status of local machines
-.SH SYNOPSIS
-.LP
-.nf
-\fBruptime\fR [\fB-ar\fR] [\fB-l\fR | \fB-t\fR | \fB-u\fR]
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBruptime\fR utility gives a status line like \fBuptime\fR (see
-\fBuptime\fR(1)) for each machine on the local network; these are formed from
-packets broadcast by each host on the network approximately every three
-minutes.
-.sp
-.LP
-Machines for which no status report has been received for 11 minutes are shown
-as being down.
-.sp
-.LP
-Normally, the listing is sorted by host name, but this order can be changed by
-specifying one of the options listed below.
-.SH OPTIONS
-.sp
-.LP
-The following options are supported:
-.sp
-.ne 2
-.na
-\fB\fB-a\fR\fR
-.ad
-.RS 16n
-Counts even those users who have been idle for an hour or more.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.RS 16n
-Reverses the sorting order.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-l\fR | \fB-t\fR | \fB-u\fR\fR
-.ad
-.RS 16n
-These options are mutually exclusive. The use of one overrides the previous
-one(s).
-.sp
-.ne 2
-.na
-\fB\fB-l\fR\fR
-.ad
-.RS 6n
-Sorts the display by load average.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-t\fR\fR
-.ad
-.RS 6n
-Sorts the display by up time.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-u\fR\fR
-.ad
-.RS 6n
-Sorts the display by number of users.
-.RE
-
-.RE
-
-.SH FILES
-.sp
-.ne 2
-.na
-\fB\fB/var/spool/rwho/whod.*\fR\fR
-.ad
-.RS 26n
-data files
-.RE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBuptime\fR(1), \fBrwho\fR(1), \fBin.rwhod\fR(1M), \fBattributes\fR(5)
--- old/usr/src/man/man1/rwho.1	2017-05-26 19:08:11.432920043 -0400
+++ /dev/null	2017-05-26 19:08:11.000000000 -0400
@@ -1,64 +0,0 @@
-'\" te
-.\"  Copyright 1989 AT&T  Copyright (c) 1992, Sun Microsystems, Inc.  All Rights Reserved
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
-.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH RWHO 1 "April 9, 2016"
-.SH NAME
-rwho \- who is logged in on local machines
-.SH SYNOPSIS
-.LP
-.nf
-\fBrwho\fR [\fB-a\fR]
-.fi
-
-.SH DESCRIPTION
-.LP
-The \fBrwho\fR command produces output similar to \fBwho\fR(1), but for all
-machines on your network.  If no report has been received from a machine for 5
-minutes, \fBrwho\fR assumes the machine is down, and does not report users last
-known to be logged into that machine.
-.sp
-.LP
-If a user has not typed to the system for a minute or more, \fBrwho\fR reports
-this idle time.  If a user has not typed to the system for an hour or more, the
-user is omitted from the output of \fBrwho\fR unless the \fB-a\fR flag is
-given.
-.SH OPTIONS
-.ne 2
-.na
-\fB\fB-a\fR\fR
-.ad
-.RS 6n
-Report all users whether or not they have typed to the system in the past hour.
-.RE
-
-.SH FILES
-.ne 2
-.na
-\fB\fB/var/spool/rwho/whod.*\fR\fR
-.ad
-.RS 26n
-information about other machines
-.RE
-
-.SH SEE ALSO
-.LP
-\fBfinger\fR(1), \fBruptime\fR(1), \fBwho\fR(1), \fBin.rwhod\fR(1M),
-\fBattributes\fR(5)
-.SH NOTES
-.LP
-\fBrwho\fR does not work through gateways.
-.sp
-.LP
-The directory \fB/var/spool/rwho\fR must exist on the host from which
-\fBrwho\fR is run.
-.sp
-.LP
-This service takes up progressively more network bandwidth as the number of
-hosts on the local net increases. For large networks, the cost becomes
-prohibitive.
-.sp
-.LP
-The \fBrwho\fR service daemon, \fBin.rwhod\fR(1M), must be enabled for this
-command to return useful results.
--- old/usr/src/man/man1m/Makefile	2017-05-26 19:08:11.771059552 -0400
+++ new/usr/src/man/man1m/Makefile	2017-05-26 19:08:11.805506227 -0400
@@ -201,7 +201,6 @@
 		in.rlogind.1m		\
 		in.routed.1m		\
 		in.rshd.1m		\
-		in.rwhod.1m		\
 		in.talkd.1m		\
 		in.telnetd.1m		\
 		in.tftpd.1m		\
--- old/usr/src/man/man1m/in.rwhod.1m	2017-05-26 19:08:12.795675614 -0400
+++ /dev/null	2017-05-26 19:08:12.000000000 -0400
@@ -1,133 +0,0 @@
-'\" te
-.\"  Copyright 1989 AT&T
-.\" Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
-.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH IN.RWHOD 1M "Dec 8, 2001"
-.SH NAME
-in.rwhod, rwhod \- system status server
-.SH SYNOPSIS
-.LP
-.nf
-\fB/usr/sbin/in.rwhod\fR [\fB-m\fR [\fIttl\fR]]
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-\fBin.rwhod\fR is the server which maintains the database used by the
-\fBrwho\fR(1) and \fBruptime\fR(1) programs.  Its operation is predicated on
-the ability to broadcast or multicast messages on a network.
-.sp
-.LP
-\fBin.rwhod\fR operates as both a producer and consumer of status information.
-As a producer of information it periodically queries the state of the system
-and constructs status messages which are broadcast or multicast on a network.
-As a consumer of information, it listens for other \fBin.rwhod\fR servers'
-status messages, validating them, then recording them in a collection of files
-located in the directory \fB/var/spool/rwho\fR.
-.sp
-.LP
-The \fBrwho\fR server transmits and receives messages at the port indicated in
-the \fBrwho\fR service specification, see \fBservices\fR(4). The messages sent
-and received are defined in \fB/usr/include/protocols/rwhod.h\fR and are of the
-form:
-.sp
-.in +2
-.nf
-struct  outmp {
-        char     out_line[8];   /* tty name */
-        char     out_name[8];   /* user id */
-        long     out_time;      /* time on */
-};
-struct  whod {
-        char     wd_vers;
-        char     wd_type;
-        char     wd_fill[2];
-        int      wd_sendtime;
-        int      wd_recvtime;
-        char     wd_hostname[32];
-        int      wd_loadav[3];
-        int      wd_boottime;
-        struct   whoent {
-                 struct   outmp we_utmp;
-                 int      we_idle;
-     } wd_we[1024 / sizeof (struct whoent)];
- };
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-All fields are converted to network byte order prior to transmission.  The load
-averages are as calculated by the \fBw\fR(1) program, and represent load
-averages over the 1, 5, and 15 minute intervals prior to a server's
-transmission.  The host name included is that returned by the \fBuname\fR(2)
-system call. The array at the end of the message contains information about the
-users who are logged in to the sending machine.  This information includes the
-contents of the \fButmpx\fR(4) entry for each non-idle terminal line and a
-value indicating the time since a character was last received on the terminal
-line.
-.sp
-.LP
-Messages received by the \fBrwho\fR server are discarded unless they originated
-at a \fBrwho\fR server's port.  In addition, if the host's name, as specified
-in the message, contains any unprintable \fBASCII\fR characters, the message is
-discarded. Valid messages received by \fBin.rwhod\fR are placed in files named
-\fBwhod.\fR\fBhostname\fR in the directory \fB/var/spool/rwho\fR. These files
-contain only the most recent message, in the format described above.
-.sp
-.LP
-Status messages are generated approximately once every 3 minutes.
-.SH OPTIONS
-.sp
-.LP
-The following options are supported:
-.sp
-.ne 2
-.na
-\fB\fB\fR\fB-m\fR\fB \fR[\fI ttl \fR]\fR
-.ad
-.RS 14n
-Use the rwho  \fBIP\fR multicast address (224.0.1.3) when transmitting. Receive
-announcements both on this multicast address and on the  \fBIP\fR broadcast
-address. If  \fIttl\fR is not specified  \fBin.rwhod\fR multicasts on all
-interfaces but with the  \fBIP\fR TimeToLive set to 1 (that is, packets are not
-forwarded by multicast routers.) If  \fIttl\fR is specified  \fBin.rwhod\fR
-only transmits packets on one interface and setting the  \fBIP\fR TimeToLive to
-the specified  \fIttl\fR.
-.RE
-
-.SH FILES
-.sp
-.ne 2
-.na
-\fB\fB/var/spool/rwho/whod.*\fR\fR
-.ad
-.RS 26n
-information about other machines
-.RE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBruptime\fR(1), \fBrwho\fR(1), \fBw\fR(1), \fBuname\fR(2), \fBservices\fR(4),
-\fButmpx\fR(4), \fBattributes\fR(5)
-.SH WARNINGS
-.sp
-.LP
-This service can cause network performance problems when used by several hosts
-on the network. It is not run at most sites by default. If used, include the
-\fB-m\fR multicast option.
-.SH NOTES
-.sp
-.LP
-This service takes up progressively more network bandwidth as the number of
-hosts on the local net increases.  For large networks, the cost becomes
-prohibitive.
-.sp
-.LP
-\fBin.rwhod\fR should relay status information between networks. People often
-interpret the server dying as a machine going down.
--- old/usr/src/pkg/manifests/compatibility-ucb.mf	2017-05-26 19:08:13.139580183 -0400
+++ new/usr/src/pkg/manifests/compatibility-ucb.mf	2017-05-26 19:08:13.173674221 -0400
@@ -199,8 +199,6 @@
 link path=usr/ucb/reset target=./tset
 link path=usr/ucb/rlogin target=../bin/rlogin
 link path=usr/ucb/rsh target=../bin/rsh
-link path=usr/ucb/ruptime target=../bin/ruptime
-link path=usr/ucb/rwho target=../bin/rwho
 link path=usr/ucb/script target=../bin/script
 link path=usr/ucb/tail target=../bin/tail
 link path=usr/ucb/talk target=../bin/talk
--- old/usr/src/pkg/manifests/service-network-network-clients.mf	2017-05-26 19:08:14.092352200 -0400
+++ new/usr/src/pkg/manifests/service-network-network-clients.mf	2017-05-26 19:08:14.125996860 -0400
@@ -42,7 +42,6 @@
 file path=usr/bin/rdist mode=4555
 file path=usr/bin/rlogin mode=4555
 file path=usr/bin/rsh mode=4555
-file path=usr/bin/ruptime mode=0555
 file path=usr/bin/whois mode=0555
 file path=usr/sbin/rmt mode=0555
 file path=usr/sbin/snoop mode=0555
@@ -51,7 +50,6 @@
 file path=usr/share/man/man1/rdist.1
 file path=usr/share/man/man1/rlogin.1
 file path=usr/share/man/man1/rsh.1
-file path=usr/share/man/man1/ruptime.1
 file path=usr/share/man/man1/whois.1
 file path=usr/share/man/man1m/rdate.1m
 file path=usr/share/man/man1m/rmt.1m
--- old/usr/src/pkg/manifests/service-network-network-servers.mf	2017-05-26 19:08:15.057758377 -0400
+++ new/usr/src/pkg/manifests/service-network-network-servers.mf	2017-05-26 19:08:15.115663866 -0400
@@ -26,7 +26,7 @@
 
 set name=pkg.fmri value=pkg:/service/network/network-servers@$(PKGVERS)
 set name=pkg.description \
-    value="Remote Network Server Commands (includes finger, talk, rwho commands)"
+    value="Remote Network Server Commands (includes finger, talk, commands)"
 set name=pkg.summary value="Remote Network Server Commands"
 set name=info.classification value=org.opensolaris.category.2008:System/Core
 set name=variant.arch value=$(ARCH)
@@ -52,30 +52,26 @@
 file path=lib/svc/manifest/network/shell.xml group=sys mode=0444
 file path=lib/svc/manifest/network/talk.xml group=sys mode=0444
 file path=usr/bin/finger mode=0555
-file path=usr/bin/rwho mode=0555
 file path=usr/bin/talk mode=0555
 file path=usr/sbin/in.comsat mode=0555
 file path=usr/sbin/in.fingerd mode=0555
 file path=usr/sbin/in.rexecd mode=0555
 file path=usr/sbin/in.rlogind mode=0555
 file path=usr/sbin/in.rshd mode=0555
-file path=usr/sbin/in.rwhod mode=0555
 file path=usr/sbin/in.talkd mode=0555
 file path=usr/share/man/man1/finger.1
-file path=usr/share/man/man1/rwho.1
 file path=usr/share/man/man1/talk.1
 file path=usr/share/man/man1m/in.comsat.1m
 file path=usr/share/man/man1m/in.fingerd.1m
 file path=usr/share/man/man1m/in.rexecd.1m
 file path=usr/share/man/man1m/in.rlogind.1m
 file path=usr/share/man/man1m/in.rshd.1m
-file path=usr/share/man/man1m/in.rwhod.1m
 file path=usr/share/man/man1m/in.talkd.1m
 file path=usr/share/man/man4/hosts.equiv.4
 legacy pkg=SUNWrcmdr desc="Remote Network Server Commands (Root)" \
     name="Remote Network Server Commands (Root)"
 legacy pkg=SUNWrcmds \
-    desc="Remote Network Server Commands (includes finger, talk, rwho commands)" \
+    desc="Remote Network Server Commands (includes finger, talk commands)" \
     name="Remote Network Server Commands (Usr)"
 license cr_Sun license=cr_Sun
 license lic_CDDL license=lic_CDDL
@@ -89,6 +85,5 @@
 link path=usr/share/man/man1m/rexecd.1m target=in.rexecd.1m
 link path=usr/share/man/man1m/rlogind.1m target=in.rlogind.1m
 link path=usr/share/man/man1m/rshd.1m target=in.rshd.1m
-link path=usr/share/man/man1m/rwhod.1m target=in.rwhod.1m
 link path=usr/share/man/man1m/talkd.1m target=in.talkd.1m
 link path=usr/share/man/man4/rhosts.4 target=hosts.equiv.4
--- old/usr/src/pkg/manifests/system-header.mf	2017-05-26 19:08:16.076341573 -0400
+++ new/usr/src/pkg/manifests/system-header.mf	2017-05-26 19:08:16.111299847 -0400
@@ -627,7 +627,6 @@
 file path=usr/include/project.h
 file path=usr/include/protocols/dumprestore.h
 file path=usr/include/protocols/routed.h
-file path=usr/include/protocols/rwhod.h
 file path=usr/include/protocols/timed.h
 file path=usr/include/pthread.h
 file path=usr/include/pw.h
--- old/usr/src/ucbcmd/Makefile	2017-05-26 19:08:17.351213427 -0400
+++ new/usr/src/ucbcmd/Makefile	2017-05-26 19:08:17.385020045 -0400
@@ -121,8 +121,6 @@
 	renice		\
 	rlogin		\
 	rsh		\
-	ruptime		\
-	rwho		\
 	script		\
 	tail		\
 	talk		\
