SCCS-vsn: usr.sbin/rwhod/rwhod.c 5.6
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)rwhod.c 5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)rwhod.c 5.6 (Berkeley) %G%";
#endif not lint
#include <sys/types.h>
#endif not lint
#include <sys/types.h>
struct sockaddr_in from;
char path[64];
int addr, on = 1;
struct sockaddr_in from;
char path[64];
int addr, on = 1;
char *cp;
extern char *index();
char *cp;
extern char *index();
syslog(LOG_ERR, "setsockopt SO_BROADCAST: %m");
exit(1);
}
syslog(LOG_ERR, "setsockopt SO_BROADCAST: %m");
exit(1);
}
- hp = gethostbyname(myname);
- if (hp == NULL) {
- syslog(LOG_ERR, "%s: don't know my own name", myname);
- exit(1);
- }
- sin.sin_family = hp->h_addrtype;
sin.sin_port = sp->s_port;
if (bind(s, &sin, sizeof (sin)) < 0) {
syslog(LOG_ERR, "bind: %m");
sin.sin_port = sp->s_port;
if (bind(s, &sin, sizeof (sin)) < 0) {
syslog(LOG_ERR, "bind: %m");