summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvs <mvs@cvs.openbsd.org>2021-01-02 13:15:16 +0000
committermvs <mvs@cvs.openbsd.org>2021-01-02 13:15:16 +0000
commite26228c6c455ecc3bf9669b34547682eb86fe4fc (patch)
tree3004c5af0b794ec3fddc7c9140da4e732b35f180
parentcc0c46ff7778b4946dea93d3c38d4cf9c6408640 (diff)
Remove PIPEX{S,G}MODE ioctl(2) commands. This time they are pretty dummy
and were kept only for backward compatibility reasons. ok mpi@ yasuoka@
-rw-r--r--share/man/man4/pipex.418
-rw-r--r--sys/net/pipex.c9
-rw-r--r--sys/net/pipex.h4
-rw-r--r--usr.sbin/npppd/npppd/npppd_iface.c49
4 files changed, 7 insertions, 73 deletions
diff --git a/share/man/man4/pipex.4 b/share/man/man4/pipex.4
index 446871418ab..7299bf7044e 100644
--- a/share/man/man4/pipex.4
+++ b/share/man/man4/pipex.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pipex.4,v 1.13 2020/08/09 14:35:31 mvs Exp $
+.\" $OpenBSD: pipex.4,v 1.14 2021/01/02 13:15:15 mvs Exp $
.\"
.\" Copyright (c) 2012 YASUOKA Masahiko <yasuoka@openbsd.org>
.\" Copyright (c) 2010 SUENAGA Hiroki <hsuenaga@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: August 9 2020 $
+.Dd $Mdocdate: January 2 2021 $
.Dt PIPEX 4
.Os
.Sh NAME
@@ -57,20 +57,6 @@ or
devices.
The added requests are as follows:
.Bl -tag -width Ds
-.It Dv PIPEXGMODE Fa "int *"
-Get the devices's
-.Nm
-operation mode.
-1 to enable
-.Nm
-on this device; 0 to disable.
-.It Dv PIPEXSMODE Fa "int *"
-Set the device's
-.Nm
-operation mode.
-1 to enable
-.Nm
-on this device; 0 to disable.
.It Dv PIPEXASESSION Fa "struct pipex_session_req *"
Add a new PPP session to be handled by
.Nm .
diff --git a/sys/net/pipex.c b/sys/net/pipex.c
index 797f2ee939d..7b1088fde74 100644
--- a/sys/net/pipex.c
+++ b/sys/net/pipex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipex.c,v 1.127 2020/08/30 19:48:16 mvs Exp $ */
+/* $OpenBSD: pipex.c,v 1.128 2021/01/02 13:15:15 mvs Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -163,13 +163,6 @@ pipex_ioctl(void *ownersc, u_long cmd, caddr_t data)
NET_ASSERT_LOCKED();
switch (cmd) {
- case PIPEXSMODE:
- break;
-
- case PIPEXGMODE:
- *(int *)data = 1;
- break;
-
case PIPEXCSESSION:
ret = pipex_config_session(
(struct pipex_session_config_req *)data, ownersc);
diff --git a/sys/net/pipex.h b/sys/net/pipex.h
index 950407177b6..b2a42889280 100644
--- a/sys/net/pipex.h
+++ b/sys/net/pipex.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipex.h,v 1.28 2020/08/27 10:47:52 yasuoka Exp $ */
+/* $OpenBSD: pipex.h,v 1.29 2021/01/02 13:15:15 mvs Exp $ */
/*
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -165,8 +165,6 @@ struct pipex_session_descr_req {
/* PIPEX ioctls */
-#define PIPEXSMODE _IOW ('p', 1, int)
-#define PIPEXGMODE _IOR ('p', 2, int)
#define PIPEXASESSION _IOW ('p', 3, struct pipex_session_req)
#define PIPEXDSESSION _IOWR('p', 4, struct pipex_session_close_req)
#define PIPEXCSESSION _IOW ('p', 5, struct pipex_session_config_req)
diff --git a/usr.sbin/npppd/npppd/npppd_iface.c b/usr.sbin/npppd/npppd/npppd_iface.c
index 1f95dbd0ee2..54835c73b8d 100644
--- a/usr.sbin/npppd/npppd/npppd_iface.c
+++ b/usr.sbin/npppd/npppd/npppd_iface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: npppd_iface.c,v 1.13 2015/12/05 16:10:31 yasuoka Exp $ */
+/* $OpenBSD: npppd_iface.c,v 1.14 2021/01/02 13:15:15 mvs Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: npppd_iface.c,v 1.13 2015/12/05 16:10:31 yasuoka Exp $ */
+/* $Id: npppd_iface.c,v 1.14 2021/01/02 13:15:15 mvs Exp $ */
/**@file
* The interface of npppd and kernel.
* This is an implementation to use tun(4) or pppx(4).
@@ -96,11 +96,6 @@ static void npppd_iface_io_event_handler (int, short, void *);
static int npppd_iface_log (npppd_iface *, int, const char *, ...)
__printflike(3,4);
-#ifdef USE_NPPPD_PIPEX
-static int npppd_iface_pipex_enable(npppd_iface *_this);
-static int npppd_iface_pipex_disable(npppd_iface *_this);
-#endif /* USE_NPPPD_PIPEX */
-
/** initialize npppd_iface */
void
@@ -311,12 +306,7 @@ npppd_iface_start(npppd_iface *_this)
goto fail;
}
-#ifdef USE_NPPPD_PIPEX
- if (npppd_iface_pipex_enable(_this) != 0) {
- log_printf(LOG_WARNING,
- "npppd_iface_pipex_enable() failed: %m");
- }
-#else
+#ifndef USE_NPPPD_PIPEX
if (_this->using_pppx) {
npppd_iface_log(_this, LOG_ERR,
"pipex is required when using pppx interface");
@@ -358,13 +348,6 @@ npppd_iface_stop(npppd_iface *_this)
in_host_route_delete(&_this->ip4addr, &gw);
}
if (_this->devf >= 0) {
-#ifdef USE_NPPPD_PIPEX
- if (npppd_iface_pipex_disable(_this) != 0) {
- log_printf(LOG_CRIT,
- "npppd_iface_pipex_disable() failed: %m");
- }
-#endif /* USE_NPPPD_PIPEX */
-
event_del(&_this->ev);
close(_this->devf);
npppd_iface_log(_this, LOG_INFO, "Stopped");
@@ -384,32 +367,6 @@ npppd_iface_fini(npppd_iface *_this)
/***********************************************************************
- * PIPEX related functions
- ***********************************************************************/
-#ifdef USE_NPPPD_PIPEX
-
-/** enable PIPEX on PPPAC interface */
-int
-npppd_iface_pipex_enable(npppd_iface *_this)
-{
- int enable = 1;
-
- return ioctl(_this->devf, PIPEXSMODE, &enable);
-}
-
-/** disable PIPEX on PPPAC interface */
-int
-npppd_iface_pipex_disable(npppd_iface *_this)
-{
- int disable = 0;
-
- return ioctl(_this->devf, PIPEXSMODE, &disable);
-}
-
-#endif /* USE_NPPPD_PIPEX */
-
-
-/***********************************************************************
* I/O related functions
***********************************************************************/
/** I/O event handler */