diff options
author | brian <brian@cvs.openbsd.org> | 2002-01-16 14:13:07 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 2002-01-16 14:13:07 +0000 |
commit | bd2c7e65d71a07e49a8cac9b1ddec51b5e67942a (patch) | |
tree | 7a70daf1ccea2e178e53db278a2897c32e064a8f | |
parent | 5457a3df32e5ecb39a09c30d70d585905bd9995d (diff) |
socket()s first argument should be a protocol family rather than an
address family.
-rw-r--r-- | usr.sbin/ppp/ppp/arp.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/atm.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/iface.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/ipcp.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/mp.c | 6 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/probe.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/route.c | 6 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/server.c | 8 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/tcp.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/tun.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/udp.c | 4 |
11 files changed, 26 insertions, 26 deletions
diff --git a/usr.sbin/ppp/ppp/arp.c b/usr.sbin/ppp/ppp/arp.c index 848bad04c09..6f83f517bd3 100644 --- a/usr.sbin/ppp/ppp/arp.c +++ b/usr.sbin/ppp/ppp/arp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $OpenBSD: arp.c,v 1.12 2002/01/16 13:20:23 brian Exp $ + * $OpenBSD: arp.c,v 1.13 2002/01/16 14:13:06 brian Exp $ * */ @@ -112,7 +112,7 @@ arp_ProxySub(struct bundle *bundle, struct in_addr addr, int add, int s) inet_ntoa(addr)); return 0; } - routes = ID0socket(AF_ROUTE, SOCK_RAW, AF_INET); + routes = ID0socket(PF_ROUTE, SOCK_RAW, AF_INET); if (routes < 0) { log_Printf(LogERROR, "arp_SetProxy: opening routing socket: %s\n", strerror(errno)); diff --git a/usr.sbin/ppp/ppp/atm.c b/usr.sbin/ppp/ppp/atm.c index 1614a4321f4..575c4c39299 100644 --- a/usr.sbin/ppp/ppp/atm.c +++ b/usr.sbin/ppp/ppp/atm.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: atm.c,v 1.5 2002/01/16 13:20:23 brian Exp $ + * $OpenBSD: atm.c,v 1.6 2002/01/16 14:13:06 brian Exp $ */ #include <sys/types.h> @@ -184,7 +184,7 @@ atm_CreateDevice(struct physical *p, const char *iface, unsigned vpi, log_Printf(LogPHASE, "%s: Connecting to %s:%u.%u\n", p->link.name, iface, vpi, vci); - p->fd = socket(AF_NATM, SOCK_DGRAM, PROTO_NATMAAL5); + p->fd = socket(PF_NATM, SOCK_DGRAM, PROTO_NATMAAL5); if (p->fd >= 0) { log_Printf(LogDEBUG, "%s: Opened atm socket %s\n", p->link.name, p->name.full); diff --git a/usr.sbin/ppp/ppp/iface.c b/usr.sbin/ppp/ppp/iface.c index bf9fa9e5b36..50c4cc1f7f2 100644 --- a/usr.sbin/ppp/ppp/iface.c +++ b/usr.sbin/ppp/ppp/iface.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: iface.c,v 1.21 2001/11/23 11:17:03 brian Exp $ + * $OpenBSD: iface.c,v 1.22 2002/01/16 14:13:06 brian Exp $ */ #include <sys/param.h> @@ -523,7 +523,7 @@ iface_ChangeFlags(const char *ifname, int flags, int how) struct ifreq ifrq; int s; - s = ID0socket(AF_INET, SOCK_DGRAM, 0); + s = ID0socket(PF_INET, SOCK_DGRAM, 0); if (s < 0) { log_Printf(LogERROR, "iface_ChangeFlags: socket: %s\n", strerror(errno)); return 0; diff --git a/usr.sbin/ppp/ppp/ipcp.c b/usr.sbin/ppp/ppp/ipcp.c index 417d7cdcfc3..3f81b3253f8 100644 --- a/usr.sbin/ppp/ppp/ipcp.c +++ b/usr.sbin/ppp/ppp/ipcp.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: ipcp.c,v 1.33 2001/08/19 23:22:17 brian Exp $ + * $OpenBSD: ipcp.c,v 1.34 2002/01/16 14:13:06 brian Exp $ */ #include <sys/param.h> @@ -616,7 +616,7 @@ ipcp_proxyarp(struct ipcp *ipcp, return 0; } - if ((s = ID0socket(AF_INET, SOCK_DGRAM, 0)) == -1) { + if ((s = ID0socket(PF_INET, SOCK_DGRAM, 0)) == -1) { log_Printf(LogERROR, "ipcp_proxyarp: socket: %s\n", strerror(errno)); return 0; diff --git a/usr.sbin/ppp/ppp/mp.c b/usr.sbin/ppp/ppp/mp.c index f7dff7abb15..f3e4c7a0ff6 100644 --- a/usr.sbin/ppp/ppp/mp.c +++ b/usr.sbin/ppp/ppp/mp.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: mp.c,v 1.26 2002/01/16 13:20:23 brian Exp $ + * $OpenBSD: mp.c,v 1.27 2002/01/16 14:13:06 brian Exp $ */ #include <sys/param.h> @@ -1000,7 +1000,7 @@ mp_SetEnddisc(struct cmdargs const *arg) else addr = arg->bundle->ncp.ipcp.my_ip; - s = ID0socket(AF_INET, SOCK_DGRAM, 0); + s = ID0socket(PF_INET, SOCK_DGRAM, 0); if (s < 0) { log_Printf(LogERROR, "set enddisc: socket(): %s\n", strerror(errno)); return 2; @@ -1137,7 +1137,7 @@ mpserver_Open(struct mpserver *s, struct peerid *peer) s->socket.sun_family = AF_LOCAL; s->socket.sun_len = sizeof s->socket; - s->fd = ID0socket(AF_LOCAL, SOCK_DGRAM, 0); + s->fd = ID0socket(PF_LOCAL, SOCK_DGRAM, 0); if (s->fd < 0) { log_Printf(LogERROR, "mpserver: socket(): %s\n", strerror(errno)); return MPSERVER_FAILED; diff --git a/usr.sbin/ppp/ppp/probe.c b/usr.sbin/ppp/ppp/probe.c index 9fc479a904f..3999973ec1f 100644 --- a/usr.sbin/ppp/ppp/probe.c +++ b/usr.sbin/ppp/ppp/probe.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: probe.c,v 1.4 2001/08/19 23:22:18 brian Exp $ + * $OpenBSD: probe.c,v 1.5 2002/01/16 14:13:06 brian Exp $ */ #include <sys/time.h> @@ -56,7 +56,7 @@ ipv6_available(void) { int s; - if ((s = ID0socket(AF_INET6, SOCK_DGRAM, 0)) == -1) + if ((s = ID0socket(PF_INET6, SOCK_DGRAM, 0)) == -1) return 0; close(s); diff --git a/usr.sbin/ppp/ppp/route.c b/usr.sbin/ppp/ppp/route.c index e00001f8e8c..0a2a2afe87c 100644 --- a/usr.sbin/ppp/ppp/route.c +++ b/usr.sbin/ppp/ppp/route.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: route.c,v 1.23 2002/01/16 13:20:23 brian Exp $ + * $OpenBSD: route.c,v 1.24 2002/01/16 14:13:06 brian Exp $ */ #include <sys/param.h> @@ -723,7 +723,7 @@ rt_Set(struct bundle *bundle, int cmd, const struct ncprange *dst, cmdstr = (cmd == RTM_ADD ? "Add!" : "Delete!"); else cmdstr = (cmd == RTM_ADD ? "Add" : "Delete"); - s = ID0socket(AF_ROUTE, SOCK_RAW, 0); + s = ID0socket(PF_ROUTE, SOCK_RAW, 0); if (s < 0) { log_Printf(LogERROR, "rt_Set: socket(): %s\n", strerror(errno)); return result; @@ -835,7 +835,7 @@ rt_Update(struct bundle *bundle, const struct sockaddr *dst, char *p; int s, wb; - s = ID0socket(AF_ROUTE, SOCK_RAW, 0); + s = ID0socket(PF_ROUTE, SOCK_RAW, 0); if (s < 0) { log_Printf(LogERROR, "rt_Update: socket(): %s\n", strerror(errno)); return; diff --git a/usr.sbin/ppp/ppp/server.c b/usr.sbin/ppp/ppp/server.c index 7e3a5dc00d1..934e559e311 100644 --- a/usr.sbin/ppp/ppp/server.c +++ b/usr.sbin/ppp/ppp/server.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: server.c,v 1.13 2002/01/16 13:20:23 brian Exp $ + * $OpenBSD: server.c,v 1.14 2002/01/16 14:13:06 brian Exp $ */ #include <sys/param.h> @@ -259,7 +259,7 @@ server_LocalOpen(struct bundle *bundle, const char *name, mode_t mask) ifsun.sun_family = AF_LOCAL; strcpy(ifsun.sun_path, name); - s = socket(AF_LOCAL, SOCK_STREAM, 0); + s = socket(PF_LOCAL, SOCK_STREAM, 0); if (s < 0) { log_Printf(LogERROR, "Local: socket: %s\n", strerror(errno)); goto failed; @@ -328,7 +328,7 @@ server_TcpOpen(struct bundle *bundle, u_short port) sin6->sin6_port = htons(port); sin6->sin6_len = (u_int8_t)sizeof ss; sz = sizeof *sin6; - s = socket(AF_INET6, SOCK_STREAM, 0); + s = socket(PF_INET6, SOCK_STREAM, 0); } else #endif { @@ -337,7 +337,7 @@ server_TcpOpen(struct bundle *bundle, u_short port) sin->sin_len = (u_int8_t)sizeof ss; sin->sin_addr.s_addr = INADDR_ANY; sz = sizeof *sin; - s = socket(AF_INET, SOCK_STREAM, 0); + s = socket(PF_INET, SOCK_STREAM, 0); } if (s < 0) { diff --git a/usr.sbin/ppp/ppp/tcp.c b/usr.sbin/ppp/ppp/tcp.c index 30cb24bb429..3d9a5159e54 100644 --- a/usr.sbin/ppp/ppp/tcp.c +++ b/usr.sbin/ppp/ppp/tcp.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: tcp.c,v 1.12 2002/01/16 13:20:23 brian Exp $ + * $OpenBSD: tcp.c,v 1.13 2002/01/16 14:13:06 brian Exp $ */ #include <sys/types.h> @@ -84,7 +84,7 @@ tcp_OpenConnection(const char *name, char *host, char *port) } log_Printf(LogPHASE, "%s: Connecting to %s:%s/tcp\n", name, host, port); - sock = socket(AF_INET, SOCK_STREAM, 0); + sock = socket(PF_INET, SOCK_STREAM, 0); if (sock < 0) return -2; diff --git a/usr.sbin/ppp/ppp/tun.c b/usr.sbin/ppp/ppp/tun.c index 254a48f10d7..7636cb1eb9d 100644 --- a/usr.sbin/ppp/ppp/tun.c +++ b/usr.sbin/ppp/ppp/tun.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: tun.c,v 1.13 2001/08/19 23:22:18 brian Exp $ + * $OpenBSD: tun.c,v 1.14 2002/01/16 14:13:06 brian Exp $ */ #include <sys/param.h> @@ -88,7 +88,7 @@ tun_configure(struct bundle *bundle) struct ifreq ifr; int s; - s = socket(AF_INET, SOCK_DGRAM, 0); + s = socket(PF_INET, SOCK_DGRAM, 0); if (s < 0) { log_Printf(LogERROR, "tun_configure: socket(): %s\n", strerror(errno)); diff --git a/usr.sbin/ppp/ppp/udp.c b/usr.sbin/ppp/ppp/udp.c index 95982265ecc..261fa7bb88f 100644 --- a/usr.sbin/ppp/ppp/udp.c +++ b/usr.sbin/ppp/ppp/udp.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: udp.c,v 1.11 2002/01/16 13:20:23 brian Exp $ + * $OpenBSD: udp.c,v 1.12 2002/01/16 14:13:06 brian Exp $ */ #include <sys/types.h> @@ -229,7 +229,7 @@ udp_CreateDevice(struct physical *p, char *host, char *port) log_Printf(LogPHASE, "%s: Connecting to %s:%s/udp\n", p->link.name, host, port); - p->fd = socket(AF_INET, SOCK_DGRAM, 0); + p->fd = socket(PF_INET, SOCK_DGRAM, 0); if (p->fd >= 0) { log_Printf(LogDEBUG, "%s: Opened udp socket %s\n", p->link.name, p->name.full); |