summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>2002-01-16 13:20:24 +0000
committerbrian <brian@cvs.openbsd.org>2002-01-16 13:20:24 +0000
commit5457a3df32e5ecb39a09c30d70d585905bd9995d (patch)
treea79dd3223c91d829ab31b2f77116157db636e591
parent01bda4f78146fa154b71159d5b667156cb9e3154 (diff)
socket's first argument is an address family, not a protocol family.
-rw-r--r--usr.sbin/ppp/ppp/arp.c4
-rw-r--r--usr.sbin/ppp/ppp/atm.c4
-rw-r--r--usr.sbin/ppp/ppp/mp.c4
-rw-r--r--usr.sbin/ppp/ppp/route.c6
-rw-r--r--usr.sbin/ppp/ppp/server.c8
-rw-r--r--usr.sbin/ppp/ppp/tcp.c4
-rw-r--r--usr.sbin/ppp/ppp/udp.c4
7 files changed, 17 insertions, 17 deletions
diff --git a/usr.sbin/ppp/ppp/arp.c b/usr.sbin/ppp/ppp/arp.c
index 27641f3951d..848bad04c09 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.11 2001/10/24 10:01:09 brian Exp $
+ * $OpenBSD: arp.c,v 1.12 2002/01/16 13:20:23 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(PF_ROUTE, SOCK_RAW, AF_INET);
+ routes = ID0socket(AF_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 d234786459e..1614a4321f4 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.4 2001/06/19 10:24:49 brian Exp $
+ * $OpenBSD: atm.c,v 1.5 2002/01/16 13:20:23 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(PF_NATM, SOCK_DGRAM, PROTO_NATMAAL5);
+ p->fd = socket(AF_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/mp.c b/usr.sbin/ppp/ppp/mp.c
index b8ec14f61bc..f7dff7abb15 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.25 2001/08/19 23:22:18 brian Exp $
+ * $OpenBSD: mp.c,v 1.26 2002/01/16 13:20:23 brian Exp $
*/
#include <sys/param.h>
@@ -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(PF_LOCAL, SOCK_DGRAM, 0);
+ s->fd = ID0socket(AF_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/route.c b/usr.sbin/ppp/ppp/route.c
index 630eaab06c6..e00001f8e8c 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.22 2001/11/23 19:21:36 brian Exp $
+ * $OpenBSD: route.c,v 1.23 2002/01/16 13:20:23 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(PF_ROUTE, SOCK_RAW, 0);
+ s = ID0socket(AF_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(PF_ROUTE, SOCK_RAW, 0);
+ s = ID0socket(AF_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 33d0f0a02bd..7e3a5dc00d1 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.12 2001/08/19 23:22:18 brian Exp $
+ * $OpenBSD: server.c,v 1.13 2002/01/16 13:20:23 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(PF_LOCAL, SOCK_STREAM, 0);
+ s = socket(AF_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(PF_INET6, SOCK_STREAM, 0);
+ s = socket(AF_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(PF_INET, SOCK_STREAM, 0);
+ s = socket(AF_INET, SOCK_STREAM, 0);
}
if (s < 0) {
diff --git a/usr.sbin/ppp/ppp/tcp.c b/usr.sbin/ppp/ppp/tcp.c
index 1eafedac274..30cb24bb429 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.11 2001/06/19 10:24:59 brian Exp $
+ * $OpenBSD: tcp.c,v 1.12 2002/01/16 13:20:23 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(PF_INET, SOCK_STREAM, 0);
+ sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock < 0)
return -2;
diff --git a/usr.sbin/ppp/ppp/udp.c b/usr.sbin/ppp/ppp/udp.c
index cf5a9feb850..95982265ecc 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.10 2001/06/19 10:25:01 brian Exp $
+ * $OpenBSD: udp.c,v 1.11 2002/01/16 13:20:23 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(PF_INET, SOCK_DGRAM, 0);
+ p->fd = socket(AF_INET, SOCK_DGRAM, 0);
if (p->fd >= 0) {
log_Printf(LogDEBUG, "%s: Opened udp socket %s\n", p->link.name,
p->name.full);