use AF_LOCAL instead of AF_UNIX

This commit is contained in:
lukem 1998-07-18 05:04:35 +00:00
parent f09ed79388
commit 786b86d71b
26 changed files with 95 additions and 95 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: popen.c,v 1.21 1998/03/19 18:21:25 tv Exp $ */
/* $NetBSD: popen.c,v 1.22 1998/07/18 05:04:35 lukem Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)popen.c 8.3 (Berkeley) 5/3/95";
#else
__RCSID("$NetBSD: popen.c,v 1.21 1998/03/19 18:21:25 tv Exp $");
__RCSID("$NetBSD: popen.c,v 1.22 1998/07/18 05:04:35 lukem Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -85,7 +85,7 @@ popen(command, type)
if (strchr(type, '+')) {
twoway = 1;
type = "r+";
if (socketpair(AF_UNIX, SOCK_STREAM, 0, pdes) < 0)
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, pdes) < 0)
return (NULL);
} else {
twoway = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: syslog.c,v 1.14 1998/02/03 18:23:53 perry Exp $ */
/* $NetBSD: syslog.c,v 1.15 1998/07/18 05:04:35 lukem Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)syslog.c 8.5 (Berkeley) 4/29/95";
#else
__RCSID("$NetBSD: syslog.c,v 1.14 1998/02/03 18:23:53 perry Exp $");
__RCSID("$NetBSD: syslog.c,v 1.15 1998/07/18 05:04:35 lukem Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -252,7 +252,7 @@ vsyslog(pri, fmt, ap)
}
}
static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */
static struct sockaddr SyslogAddr; /* AF_LOCAL address of local logger */
void
openlog(ident, logstat, logfac)
@ -266,11 +266,11 @@ openlog(ident, logstat, logfac)
LogFacility = logfac;
if (LogFile == -1) {
SyslogAddr.sa_family = AF_UNIX;
SyslogAddr.sa_family = AF_LOCAL;
(void)strncpy(SyslogAddr.sa_data, _PATH_LOG,
sizeof(SyslogAddr.sa_data));
if (LogStat & LOG_NDELAY) {
if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1)
if ((LogFile = socket(AF_LOCAL, SOCK_DGRAM, 0)) == -1)
return;
(void)fcntl(LogFile, F_SETFD, 1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rcmd.c,v 1.23 1998/01/18 06:22:19 lukem Exp $ */
/* $NetBSD: rcmd.c,v 1.24 1998/07/18 05:04:36 lukem Exp $ */
/*
* Copyright (c) 1997 Matthew R. Green.
@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
#else
__RCSID("$NetBSD: rcmd.c,v 1.23 1998/01/18 06:22:19 lukem Exp $");
__RCSID("$NetBSD: rcmd.c,v 1.24 1998/07/18 05:04:36 lukem Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -300,13 +300,13 @@ rshrcmd(ahost, rport, locuser, remuser, cmd, fd2p, rshcmd)
}
/* get a socketpair we'll use for stdin and stdout. */
if (socketpair(AF_UNIX, SOCK_STREAM, 0, sp) < 0) {
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sp) < 0) {
warn("rshrcmd: socketpair");
return (-1);
}
/* we will use this for the fd2 pointer */
if (fd2p) {
if (socketpair(AF_UNIX, SOCK_STREAM, 0, ep) < 0) {
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, ep) < 0) {
warn("rshrcmd: socketpair");
return (-1);
}

View File

@ -1,4 +1,4 @@
.\" $NetBSD: recv.2,v 1.6 1995/02/27 12:36:08 cgd Exp $
.\" $NetBSD: recv.2,v 1.7 1998/07/18 05:04:36 lukem Exp $
.\"
.\" Copyright (c) 1983, 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -192,7 +192,7 @@ a recvmsg with no data buffer provided immediately after an
call.
.Pp
Open file descriptors are now passed as ancillary data for
.Dv AF_UNIX
.Dv AF_LOCAL
domain sockets, with
.Fa cmsg_level
set to

View File

@ -1,4 +1,4 @@
.\" $NetBSD: socket.2,v 1.7 1998/04/30 22:03:03 fair Exp $
.\" $NetBSD: socket.2,v 1.8 1998/07/18 05:04:36 lukem Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -58,11 +58,11 @@ These families are defined in the include file
The currently understood formats are
.Pp
.Bd -literal -offset indent -compact
AF_UNIX (UNIX internal protocols),
AF_INET (ARPA Internet protocols),
AF_ISO (ISO protocols),
AF_NS (Xerox Network Systems protocols), and
AF_IMPLINK (IMP \*(lqhost at IMP\*(rq link layer).
AF_LOCAL local (previously UNIX) domain protocols
AF_INET ARPA Internet protocols
AF_ISO ISO protocols
AF_NS Xerox Network Systems protocols
AF_IMPLINK IMP \*(lqhost at IMP\*(rq link layer
.Ed
.Pp
The socket has the indicated

View File

@ -1,4 +1,4 @@
/* $NetBSD: tape.c,v 1.16 1998/03/18 16:54:56 bouyer Exp $ */
/* $NetBSD: tape.c,v 1.17 1998/07/18 05:04:36 lukem Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95";
#else
__RCSID("$NetBSD: tape.c,v 1.16 1998/03/18 16:54:56 bouyer Exp $");
__RCSID("$NetBSD: tape.c,v 1.17 1998/07/18 05:04:36 lukem Exp $");
#endif
#endif /* not lint */
@ -760,7 +760,7 @@ enslave()
caught = 0;
}
if (socketpair(AF_UNIX, SOCK_STREAM, 0, cmd) < 0 ||
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, cmd) < 0 ||
(slaves[i].pid = fork()) < 0)
quit("too many slaves, %d (recompile smaller): %s\n",
i, strerror(errno));

View File

@ -1,4 +1,4 @@
/* $NetBSD: mount_portal.c,v 1.12 1998/02/17 11:38:26 kleink Exp $ */
/* $NetBSD: mount_portal.c,v 1.13 1998/07/18 05:04:36 lukem Exp $ */
/*
* Copyright (c) 1992, 1993, 1994
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
#else
__RCSID("$NetBSD: mount_portal.c,v 1.12 1998/02/17 11:38:26 kleink Exp $");
__RCSID("$NetBSD: mount_portal.c,v 1.13 1998/07/18 05:04:36 lukem Exp $");
#endif
#endif /* not lint */
@ -162,14 +162,14 @@ main(argc, argv)
/*
* Construct the listening socket
*/
un.sun_family = AF_UNIX;
un.sun_family = AF_LOCAL;
if (sizeof(_PATH_TMPPORTAL) >= sizeof(un.sun_path))
errx(1, "portal socket name too long");
strcpy(un.sun_path, _PATH_TMPPORTAL);
mktemp(un.sun_path);
un.sun_len = strlen(un.sun_path);
so = socket(AF_UNIX, SOCK_STREAM, 0);
so = socket(AF_LOCAL, SOCK_STREAM, 0);
if (so < 0)
err(1, "socket");
(void) unlink(un.sun_path);

View File

@ -1,4 +1,4 @@
.\" $NetBSD: netintro.4,v 1.6 1998/04/30 08:50:08 fair Exp $
.\" $NetBSD: netintro.4,v 1.7 1998/07/18 05:04:36 lukem Exp $
.\"
.\" Copyright (c) 1983, 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -142,7 +142,7 @@ The following address values for
are known to the system
(and additional formats are defined for possible future implementation):
.Bd -literal
#define AF_UNIX 1 /* local to host (pipes, portals) */
#define AF_LOCAL 1 /* local to host (pipes, portals) */
#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
#define AF_NS 6 /* Xerox NS protocols */
#define AF_CCITT 10 /* CCITT protocols, X.25 etc */

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_net.c,v 1.13 1997/11/16 22:50:57 christos Exp $ */
/* $NetBSD: svr4_net.c,v 1.14 1998/07/18 05:04:37 lukem Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
@ -152,7 +152,7 @@ svr4_netopen(dev, flag, mode, p)
break;
case dev_unix_dgram:
family = AF_UNIX;
family = AF_LOCAL;
type = SOCK_DGRAM;
protocol = 0;
DPRINTF(("unix-dgram, "));
@ -160,7 +160,7 @@ svr4_netopen(dev, flag, mode, p)
case dev_unix_stream:
case dev_unix_ord_stream:
family = AF_UNIX;
family = AF_LOCAL;
type = SOCK_STREAM;
protocol = 0;
DPRINTF(("unix-stream, "));

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_socket.c,v 1.4 1997/07/21 23:02:37 christos Exp $ */
/* $NetBSD: svr4_socket.c,v 1.5 1998/07/18 05:04:37 lukem Exp $ */
/*
* Copyright (c) 1996 Christos Zoulas. All rights reserved.
@ -160,7 +160,7 @@ svr4_add_socket(p, path, st)
return error;
}
e->sock.sun_family = AF_UNIX;
e->sock.sun_family = AF_LOCAL;
e->sock.sun_len = len;
TAILQ_INSERT_HEAD(&svr4_head, e, entries);

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_stream.c,v 1.24 1997/10/20 22:05:19 thorpej Exp $ */
/* $NetBSD: svr4_stream.c,v 1.25 1998/07/18 05:04:37 lukem Exp $ */
/*
* Copyright (c) 1994, 1996 Christos Zoulas. All rights reserved.
*
@ -438,7 +438,7 @@ si_ogetudata(fp, fd, ioc, p)
ud.etsdusize = 0;
break;
case AF_UNIX:
case AF_LOCAL:
ud.tidusize = 65536;
ud.addrsize = 128;
ud.etsdusize = 128;
@ -521,7 +521,7 @@ si_listen(fp, fd, ioc, p)
/* XXX: Fill the length here */
break;
case AF_UNIX:
case AF_LOCAL:
lst.len = 140;
lst.pad[28] = 0x00000000; /* magic again */
lst.pad[29] = 0x00000800; /* magic again */
@ -575,7 +575,7 @@ si_getudata(fp, fd, ioc, p)
ud.optsize = 0;
break;
case AF_UNIX:
case AF_LOCAL:
ud.tidusize = 65536;
ud.tsdusize = 128;
ud.addrsize = 128;
@ -765,7 +765,7 @@ ti_bind(fp, fd, ioc, p)
sain.sin_addr.s_addr));
break;
case AF_UNIX:
case AF_LOCAL:
skp = &saun;
sasize = sizeof(saun);
if (bnd.offs == 0)
@ -890,7 +890,7 @@ svr4_stream_ti_ioctl(fp, p, retval, fd, cmd, dat)
sasize = sizeof(sain);
break;
case AF_UNIX:
case AF_LOCAL:
skp = &saun;
sasize = sizeof(saun);
break;
@ -967,7 +967,7 @@ svr4_stream_ti_ioctl(fp, p, retval, fd, cmd, dat)
skb.len = sasize;
break;
case AF_UNIX:
case AF_LOCAL:
sockaddr_to_netaddr_un(&sc, &saun);
skb.len = sasize + 4;
break;
@ -1464,7 +1464,7 @@ svr4_sys_putmsg(p, v, retval)
error = sain.sin_family != st->s_family;
break;
case AF_UNIX:
case AF_LOCAL:
if (ctl.len == 8) {
/* We are doing an accept; succeed */
DPRINTF(("putmsg: Do nothing\n"));
@ -1612,7 +1612,7 @@ svr4_sys_getmsg(p, v, retval)
sasize = sizeof(sain);
break;
case AF_UNIX:
case AF_LOCAL:
skp = &saun;
sasize = sizeof(saun);
break;
@ -1678,7 +1678,7 @@ svr4_sys_getmsg(p, v, retval)
sockaddr_to_netaddr_in(&sc, &sain);
break;
case AF_UNIX:
case AF_LOCAL:
sc.len = sasize + 4;
sockaddr_to_netaddr_un(&sc, &saun);
break;
@ -1741,7 +1741,7 @@ svr4_sys_getmsg(p, v, retval)
sc.len = sasize;
break;
case AF_UNIX:
case AF_LOCAL:
sc.pad[1] = 0x00010000;
sc.pad[2] = 0xf6bcdaa0; /* I don't know what that is */
sc.pad[3] = 0x00010000;
@ -1771,7 +1771,7 @@ svr4_sys_getmsg(p, v, retval)
sockaddr_to_netaddr_in(&sc, &sain);
break;
case AF_UNIX:
case AF_LOCAL:
sockaddr_to_netaddr_un(&sc, &saun);
break;
@ -1806,7 +1806,7 @@ svr4_sys_getmsg(p, v, retval)
sockaddr_to_netaddr_in(&sc, &sain);
break;
case AF_UNIX:
case AF_LOCAL:
sc.len = sasize + 4;
sockaddr_to_netaddr_un(&sc, &saun);
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_proto.c,v 1.10 1998/03/01 02:22:34 fvdl Exp $ */
/* $NetBSD: uipc_proto.c,v 1.11 1998/07/18 05:04:37 lukem Exp $ */
/*-
* Copyright (c) 1982, 1986, 1993
@ -71,5 +71,5 @@ struct protosw unixsw[] = {
};
struct domain unixdomain =
{ AF_UNIX, "unix", 0, unp_externalize, unp_dispose,
{ AF_LOCAL, "unix", 0, unp_externalize, unp_dispose,
unixsw, &unixsw[sizeof(unixsw)/sizeof(unixsw[0])] };

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_syscalls.c,v 1.31 1998/06/25 21:17:17 thorpej Exp $ */
/* $NetBSD: uipc_syscalls.c,v 1.32 1998/07/18 05:04:37 lukem Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1990, 1993
@ -865,9 +865,9 @@ sys_pipe(p, v, retval)
struct socket *rso, *wso;
int fd, error;
if ((error = socreate(AF_UNIX, &rso, SOCK_STREAM, 0)) != 0)
if ((error = socreate(AF_LOCAL, &rso, SOCK_STREAM, 0)) != 0)
return (error);
if ((error = socreate(AF_UNIX, &wso, SOCK_STREAM, 0)) != 0)
if ((error = socreate(AF_LOCAL, &wso, SOCK_STREAM, 0)) != 0)
goto free1;
if ((error = falloc(p, &rf, &fd)) != 0)
goto free2;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_usrreq.c,v 1.33 1998/07/16 00:46:50 thorpej Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.34 1998/07/18 05:04:38 lukem Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -97,7 +97,7 @@
* rethink name space problems
* need a proper out-of-band
*/
struct sockaddr_un sun_noname = { sizeof(sun_noname), AF_UNIX };
struct sockaddr_un sun_noname = { sizeof(sun_noname), AF_LOCAL };
ino_t unp_ino; /* prototype for fake inode numbers */
struct mbuf *unp_addsockcred __P((struct proc *, struct mbuf *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: portal_vfsops.c,v 1.18 1998/07/05 08:49:46 jonathan Exp $ */
/* $NetBSD: portal_vfsops.c,v 1.19 1998/07/18 05:04:38 lukem Exp $ */
/*
* Copyright (c) 1992, 1993, 1995
@ -120,7 +120,7 @@ portal_mount(mp, path, data, ndp, p)
if ((error = getsock(p->p_fd, args.pa_socket, &fp)) != 0)
return (error);
so = (struct socket *) fp->f_data;
if (so->so_proto->pr_domain->dom_family != AF_UNIX)
if (so->so_proto->pr_domain->dom_family != AF_LOCAL)
return (ESOCKTNOSUPPORT);
error = getnewvnode(VT_PORTAL, mp, portal_vnodeop_p, &rvp); /* XXX */

View File

@ -1,4 +1,4 @@
/* $NetBSD: portal_vnops.c,v 1.28 1998/03/01 02:21:39 fvdl Exp $ */
/* $NetBSD: portal_vnops.c,v 1.29 1998/07/18 05:04:38 lukem Exp $ */
/*
* Copyright (c) 1992, 1993
@ -336,7 +336,7 @@ portal_open(v)
/*
* Create a new socket.
*/
error = socreate(AF_UNIX, &so, SOCK_STREAM, 0);
error = socreate(AF_LOCAL, &so, SOCK_STREAM, 0);
if (error)
goto bad;

View File

@ -1,4 +1,4 @@
/* $NetBSD: un.h,v 1.18 1998/03/01 02:24:15 fvdl Exp $ */
/* $NetBSD: un.h,v 1.19 1998/07/18 05:04:38 lukem Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -43,7 +43,7 @@
*/
struct sockaddr_un {
u_char sun_len; /* total sockaddr length */
u_char sun_family; /* AF_UNIX */
u_char sun_family; /* AF_LOCAL */
char sun_path[104]; /* path name (gag) */
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: fstat.c,v 1.30 1998/07/16 22:23:30 ross Exp $ */
/* $NetBSD: fstat.c,v 1.31 1998/07/18 05:04:38 lukem Exp $ */
/*-
* Copyright (c) 1988, 1993
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\n\
#if 0
static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95";
#else
__RCSID("$NetBSD: fstat.c,v 1.30 1998/07/16 22:23:30 ross Exp $");
__RCSID("$NetBSD: fstat.c,v 1.31 1998/07/18 05:04:38 lukem Exp $");
#endif
#endif /* not lint */
@ -703,7 +703,7 @@ socktrans(sock, i)
else if (so.so_pcb)
printf(" %lx", (long)so.so_pcb);
break;
case AF_UNIX:
case AF_LOCAL:
/* print address of pcb and connected pcb */
if (so.so_pcb) {
printf(" %lx", (long)so.so_pcb);

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwopen.c,v 1.7 1997/11/21 08:37:37 lukem Exp $ */
/* $NetBSD: wwopen.c,v 1.8 1998/07/18 05:04:39 lukem Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwopen.c 8.2 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: wwopen.c,v 1.7 1997/11/21 08:37:37 lukem Exp $");
__RCSID("$NetBSD: wwopen.c,v 1.8 1998/07/18 05:04:39 lukem Exp $");
#endif
#endif /* not lint */
@ -113,7 +113,7 @@ wwopen(type, oflags, nrow, ncol, row, col, nline)
case WWT_SOCKET:
{
int d[2];
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, d) < 0) {
if (socketpair(AF_LOCAL, SOCK_STREAM, PF_UNSPEC, d) < 0) {
wwerrno = WWE_SYS;
goto bad;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: apm.c,v 1.5 1998/03/31 02:36:13 mycroft Exp $ */
/* $NetBSD: apm.c,v 1.6 1998/07/18 05:04:39 lukem Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -135,11 +135,11 @@ open_socket(const char *sockname)
int sock, errr;
struct sockaddr_un s_un;
sock = socket(AF_UNIX, SOCK_STREAM, 0);
sock = socket(AF_LOCAL, SOCK_STREAM, 0);
if (sock == -1)
err(1, "cannot create local socket");
s_un.sun_family = AF_UNIX;
s_un.sun_family = AF_LOCAL;
strncpy(s_un.sun_path, sockname, sizeof(s_un.sun_path));
s_un.sun_len = SUN_LEN(&s_un);
if (connect(sock, (struct sockaddr *)&s_un, s_un.sun_len) == -1) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: apmd.c,v 1.7 1997/10/17 04:57:33 lukem Exp $ */
/* $NetBSD: apmd.c,v 1.8 1998/07/18 05:04:39 lukem Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -150,11 +150,11 @@ bind_socket(const char *sockname, mode_t mode, uid_t uid, gid_t gid)
int sock;
struct sockaddr_un s_un;
sock = socket(AF_UNIX, SOCK_STREAM, 0);
sock = socket(AF_LOCAL, SOCK_STREAM, 0);
if (sock == -1)
err(1, "cannot create local socket");
s_un.sun_family = AF_UNIX;
s_un.sun_family = AF_LOCAL;
strncpy(s_un.sun_path, sockname, sizeof(s_un.sun_path));
s_un.sun_len = SUN_LEN(&s_un);
/* remove it if present, we're moving in */

View File

@ -1,4 +1,4 @@
/* $NetBSD: inetd.c,v 1.43 1998/07/16 08:55:43 tron Exp $ */
/* $NetBSD: inetd.c,v 1.44 1998/07/18 05:04:39 lukem Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -77,7 +77,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1991, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)inetd.c 8.4 (Berkeley) 4/13/94";
#else
__RCSID("$NetBSD: inetd.c,v 1.43 1998/07/16 08:55:43 tron Exp $");
__RCSID("$NetBSD: inetd.c,v 1.44 1998/07/18 05:04:39 lukem Exp $");
#endif
#endif /* not lint */
@ -814,7 +814,7 @@ config(signo)
sep->se_checked = 1;
switch (sep->se_family) {
case AF_UNIX:
case AF_LOCAL:
if (sep->se_fd != -1)
break;
n = strlen(sep->se_service);
@ -827,7 +827,7 @@ config(signo)
(void)unlink(sep->se_service);
strncpy(sep->se_ctrladdr_un.sun_path,
sep->se_service, n);
sep->se_ctrladdr_un.sun_family = AF_UNIX;
sep->se_ctrladdr_un.sun_family = AF_LOCAL;
sep->se_ctrladdr_size = n +
sizeof(sep->se_ctrladdr_un) -
sizeof(sep->se_ctrladdr_un.sun_path);
@ -934,7 +934,7 @@ config(signo)
close_sep(sep);
if (isrpcservice(sep))
unregister_rpc(sep);
if (sep->se_family == AF_UNIX)
if (sep->se_family == AF_LOCAL)
(void)unlink(sep->se_service);
if (debug)
print_service("FREE", sep);
@ -954,7 +954,7 @@ retry(signo)
for (sep = servtab; sep; sep = sep->se_next) {
if (sep->se_fd == -1 && !ISMUX(sep)) {
switch (sep->se_family) {
case AF_UNIX:
case AF_LOCAL:
case AF_INET:
setup(sep);
if (sep->se_fd != -1 && isrpcservice(sep))
@ -976,7 +976,7 @@ goaway(signo)
continue;
switch (sep->se_family) {
case AF_UNIX:
case AF_LOCAL:
(void)unlink(sep->se_service);
break;
case AF_INET:
@ -1384,7 +1384,7 @@ do { \
#undef MALFORMED
if (strcmp(sep->se_proto, "unix") == 0) {
sep->se_family = AF_UNIX;
sep->se_family = AF_LOCAL;
} else {
sep->se_family = AF_INET;
if (strncmp(sep->se_proto, "rpc/", 4) == 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: startdaemon.c,v 1.9 1997/10/05 15:12:04 mrg Exp $ */
/* $NetBSD: startdaemon.c,v 1.10 1998/07/18 05:04:39 lukem Exp $ */
/*
* Copyright (c) 1983, 1993, 1994
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)startdaemon.c 8.2 (Berkeley) 4/17/94";
#else
__RCSID("$NetBSD: startdaemon.c,v 1.9 1997/10/05 15:12:04 mrg Exp $");
__RCSID("$NetBSD: startdaemon.c,v 1.10 1998/07/18 05:04:39 lukem Exp $");
#endif
#endif /* not lint */
@ -70,13 +70,13 @@ startdaemon(printer)
int s, n;
char buf[BUFSIZ];
s = socket(AF_UNIX, SOCK_STREAM, 0);
s = socket(AF_LOCAL, SOCK_STREAM, 0);
if (s < 0) {
warn("socket");
return(0);
}
memset(&un, 0, sizeof(un));
un.sun_family = AF_UNIX;
un.sun_family = AF_LOCAL;
strncpy(un.sun_path, _PATH_SOCKETNAME, sizeof(un.sun_path) - 1);
#ifndef SUN_LEN
#define SUN_LEN(unp) (strlen((unp)->sun_path) + 2)

View File

@ -1,4 +1,4 @@
/* $NetBSD: lpd.c,v 1.16 1998/07/06 07:03:28 mrg Exp $ */
/* $NetBSD: lpd.c,v 1.17 1998/07/18 05:04:40 lukem Exp $ */
/*
* Copyright (c) 1983, 1993, 1994
@ -45,7 +45,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95";
#else
__RCSID("$NetBSD: lpd.c,v 1.16 1998/07/06 07:03:28 mrg Exp $");
__RCSID("$NetBSD: lpd.c,v 1.17 1998/07/18 05:04:40 lukem Exp $");
#endif
#endif /* not lint */
@ -195,7 +195,7 @@ main(argc, argv)
*/
startup();
(void)unlink(_PATH_SOCKETNAME);
funix = socket(AF_UNIX, SOCK_STREAM, 0);
funix = socket(AF_LOCAL, SOCK_STREAM, 0);
if (funix < 0) {
syslog(LOG_ERR, "socket: %m");
exit(1);
@ -207,7 +207,7 @@ main(argc, argv)
signal(SIGQUIT, mcleanup);
signal(SIGTERM, mcleanup);
memset(&un, 0, sizeof(un));
un.sun_family = AF_UNIX;
un.sun_family = AF_LOCAL;
strncpy(un.sun_path, _PATH_SOCKETNAME, sizeof(un.sun_path) - 1);
#ifndef SUN_LEN
#define SUN_LEN(unp) (strlen((unp)->sun_path) + 2)
@ -264,7 +264,7 @@ main(argc, argv)
continue;
}
if (FD_ISSET(funix, &readfds)) {
domain = AF_UNIX, fromlen = sizeof(fromunix);
domain = AF_LOCAL, fromlen = sizeof(fromunix);
s = accept(funix,
(struct sockaddr *)&fromunix, &fromlen);
} else /* if (FD_ISSET(finet, &readfds)) */ {

View File

@ -1,4 +1,4 @@
/* $NetBSD: rsrr.c,v 1.3 1995/12/10 10:07:14 mycroft Exp $ */
/* $NetBSD: rsrr.c,v 1.4 1998/07/18 05:04:40 lukem Exp $ */
/*
* Copyright (c) 1993 by the University of Southern California
@ -85,12 +85,12 @@ rsrr_init()
int servlen;
struct sockaddr_un serv_addr;
if ((rsrr_socket = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0)
if ((rsrr_socket = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0)
log(LOG_ERR, errno, "Can't create RSRR socket");
unlink(RSRR_SERV_PATH);
bzero((char *) &serv_addr, sizeof(serv_addr));
serv_addr.sun_family = AF_UNIX;
serv_addr.sun_family = AF_LOCAL;
strcpy(serv_addr.sun_path, RSRR_SERV_PATH);
#if (defined(BSD) && (BSD >= 199103))
servlen = offsetof(struct sockaddr_un, sun_path) +

View File

@ -41,7 +41,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94";
#else
__RCSID("$NetBSD: syslogd.c,v 1.19 1998/07/06 06:58:44 mrg Exp $");
__RCSID("$NetBSD: syslogd.c,v 1.20 1998/07/18 05:04:40 lukem Exp $");
#endif
#endif /* not lint */
@ -281,9 +281,9 @@ main(argc, argv)
#define SUN_LEN(unp) (strlen((unp)->sun_path) + 2)
#endif
memset(&sunx, 0, sizeof(sunx));
sunx.sun_family = AF_UNIX;
sunx.sun_family = AF_LOCAL;
(void)strncpy(sunx.sun_path, LogName, sizeof(sunx.sun_path));
funix = socket(AF_UNIX, SOCK_DGRAM, 0);
funix = socket(AF_LOCAL, SOCK_DGRAM, 0);
if (funix < 0 ||
bind(funix, (struct sockaddr *)&sunx, SUN_LEN(&sunx)) < 0 ||
chmod(LogName, 0666) < 0) {