summaryrefslogtreecommitdiff
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2013-08-16 12:29:19 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2013-08-16 12:29:19 +0000
commite2233471d26dbc4873aac0e003bca50a13ee6e05 (patch)
tree1c3f55926a277b4dea5b5319e5167f9478b4bd3c /sbin/ifconfig
parent2a3648c202d647cecf6c94e2dd5e064219387e00 (diff)
Replace the misleading SIOC{G,S}IFGENERIC ioctls by SIOCG{G,S}PPPPARAMS.
This is another ABI break but no port rely on them as verified by naddy@. ok claudio@, mikeb@, henning@
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 28634bb5eb7..21a924f2b74 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.267 2013/07/16 08:21:10 mpi Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.268 2013/08/16 12:29:17 mpi Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -4069,8 +4069,8 @@ spppauthinfo(struct sauthreq *spa, int d)
ifr.ifr_data = (caddr_t)spa;
spa->cmd = d == 0 ? SPPPIOGMAUTH : SPPPIOGHAUTH;
- if (ioctl(s, SIOCGIFGENERIC, &ifr) == -1)
- err(1, "SIOCGIFGENERIC(SPPPIOGXAUTH)");
+ if (ioctl(s, SIOCGSPPPPARAMS, &ifr) == -1)
+ err(1, "SIOCGSPPPPARAMS(SPPPIOGXAUTH)");
}
void
@@ -4090,8 +4090,8 @@ setspppproto(const char *val, int d)
errx(1, "setpppproto");
spa.cmd = d == 0 ? SPPPIOSMAUTH : SPPPIOSHAUTH;
- if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1)
- err(1, "SIOCSIFGENERIC(SPPPIOSXAUTH)");
+ if (ioctl(s, SIOCSSPPPPARAMS, &ifr) == -1)
+ err(1, "SIOCSSPPPPARAMS(SPPPIOSXAUTH)");
}
void
@@ -4113,8 +4113,8 @@ setspppname(const char *val, int d)
errx(1, "setspppname");
spa.cmd = d == 0 ? SPPPIOSMAUTH : SPPPIOSHAUTH;
- if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1)
- err(1, "SIOCSIFGENERIC(SPPPIOSXAUTH)");
+ if (ioctl(s, SIOCSSPPPPARAMS, &ifr) == -1)
+ err(1, "SIOCSSPPPPARAMS(SPPPIOSXAUTH)");
}
void
@@ -4136,8 +4136,8 @@ setspppkey(const char *val, int d)
errx(1, "setspppkey");
spa.cmd = d == 0 ? SPPPIOSMAUTH : SPPPIOSHAUTH;
- if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1)
- err(1, "SIOCSIFGENERIC(SPPPIOSXAUTH)");
+ if (ioctl(s, SIOCSSPPPPARAMS, &ifr) == -1)
+ err(1, "SIOCSSPPPPARAMS(SPPPIOSXAUTH)");
}
void
@@ -4169,8 +4169,8 @@ setsppppeerflag(const char *val, int d)
spa.flags |= flag;
spa.cmd = SPPPIOSHAUTH;
- if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1)
- err(1, "SIOCSIFGENERIC(SPPPIOSXAUTH)");
+ if (ioctl(s, SIOCSSPPPPARAMS, &ifr) == -1)
+ err(1, "SIOCSSPPPPARAMS(SPPPIOSXAUTH)");
}
void
@@ -4212,11 +4212,11 @@ sppp_status(void)
ifr.ifr_data = (caddr_t)&spr;
spr.cmd = SPPPIOGDEFS;
- if (ioctl(s, SIOCGIFGENERIC, &ifr) == -1) {
+ if (ioctl(s, SIOCGSPPPPARAMS, &ifr) == -1) {
return;
}
- if (spr.cmd != SPPPIOGDEFS || spr.phase == PHASE_DEAD)
+ if (spr.phase == PHASE_DEAD)
return;
printf("\tsppp: phase ");
switch (spr.phase) {