From 8867d2f19cc29331670e7fbe83dc5cfd3ab36965 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Mon, 8 Aug 1994 13:33:16 +0000 Subject: [PATCH] Added support for SIOCSIFMTU. --- sys/dev/ep/if_ep.c | 14 +++++++++++++- sys/dev/ie/if_ie.c | 13 ++++++++++++- sys/i386/isa/if_el.c | 14 +++++++++++++- sys/i386/isa/if_ep.c | 14 +++++++++++++- sys/i386/isa/if_ie.c | 13 ++++++++++++- sys/i386/isa/if_is.c | 14 +++++++++++++- 6 files changed, 76 insertions(+), 6 deletions(-) diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index b47f829389b0..57e17691e1ac 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * From: if_ep.c,v 1.9 1994/01/25 10:46:29 deraadt Exp $ - * $Id: if_ep.c,v 1.8 1994/03/15 01:58:22 wollman Exp $ + * $Id: if_ep.c,v 1.10 1994/05/25 08:59:10 rgrimes Exp $ */ #include "ep.h" @@ -818,6 +818,18 @@ epioctl(ifp, cmd, data) sizeof(sc->sc_addr)); break; #endif + case SIOCSIFMTU: + + /* + * Set the interface MTU. + */ + if (ifr->ifr_mtu > ETHERMTU) { + error = EINVAL; + } else { + ifp->if_mtu = ifr->ifr_mtu; + } + break; + default: error = EINVAL; } diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c index fbb1d5e11add..4499f2354525 100644 --- a/sys/dev/ie/if_ie.c +++ b/sys/dev/ie/if_ie.c @@ -39,7 +39,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ie.c,v 1.2 1993/11/25 01:31:36 wollman Exp $ + * $Id: if_ie.c,v 1.6 1994/05/27 04:02:04 rgrimes Exp $ */ /* @@ -1749,6 +1749,17 @@ ieioctl(ifp, command, data) break; #endif /* MULTICAST */ + case SIOCSIFMTU: + /* + * Set the interface MTU. + */ + if (ifr->ifr_mtu > ETHERMTU) { + error = EINVAL; + } else { + ifp->if_mtu = ifr->ifr_mtu; + } + break; + default: error = EINVAL; } diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c index c16c5dfb77c7..be1809919583 100644 --- a/sys/i386/isa/if_el.c +++ b/sys/i386/isa/if_el.c @@ -6,7 +6,7 @@ * * Questions, comments, bug reports and fixes to kimmel@cs.umass.edu. * - * $Id$ + * $Id: if_el.c,v 1.3 1994/08/02 07:39:32 davidg Exp $ */ /* Except of course for the portions of code lifted from other FreeBSD * drivers (mainly elread, elget and el_ioctl) @@ -781,6 +781,18 @@ el_ioctl(ifp, command, data) el_init(ifp->if_unit); } + case SIOCSIFMTU: + + /* + * Set the interface MTU. + */ + if (ifr->ifr_mtu > ETHERMTU) { + error = EINVAL; + } else { + ifp->if_mtu = ifr->ifr_mtu; + } + break; + default: error = EINVAL; } diff --git a/sys/i386/isa/if_ep.c b/sys/i386/isa/if_ep.c index b47f829389b0..57e17691e1ac 100644 --- a/sys/i386/isa/if_ep.c +++ b/sys/i386/isa/if_ep.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * From: if_ep.c,v 1.9 1994/01/25 10:46:29 deraadt Exp $ - * $Id: if_ep.c,v 1.8 1994/03/15 01:58:22 wollman Exp $ + * $Id: if_ep.c,v 1.10 1994/05/25 08:59:10 rgrimes Exp $ */ #include "ep.h" @@ -818,6 +818,18 @@ epioctl(ifp, cmd, data) sizeof(sc->sc_addr)); break; #endif + case SIOCSIFMTU: + + /* + * Set the interface MTU. + */ + if (ifr->ifr_mtu > ETHERMTU) { + error = EINVAL; + } else { + ifp->if_mtu = ifr->ifr_mtu; + } + break; + default: error = EINVAL; } diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c index fbb1d5e11add..4499f2354525 100644 --- a/sys/i386/isa/if_ie.c +++ b/sys/i386/isa/if_ie.c @@ -39,7 +39,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ie.c,v 1.2 1993/11/25 01:31:36 wollman Exp $ + * $Id: if_ie.c,v 1.6 1994/05/27 04:02:04 rgrimes Exp $ */ /* @@ -1749,6 +1749,17 @@ ieioctl(ifp, command, data) break; #endif /* MULTICAST */ + case SIOCSIFMTU: + /* + * Set the interface MTU. + */ + if (ifr->ifr_mtu > ETHERMTU) { + error = EINVAL; + } else { + ifp->if_mtu = ifr->ifr_mtu; + } + break; + default: error = EINVAL; } diff --git a/sys/i386/isa/if_is.c b/sys/i386/isa/if_is.c index 8817a69411d0..021725539278 100644 --- a/sys/i386/isa/if_is.c +++ b/sys/i386/isa/if_is.c @@ -11,7 +11,7 @@ * of this software, nor does the author assume any responsibility * for damages incurred with its use. * - * $Id$ + * $Id: if_is.c,v 1.24 1994/08/02 07:39:37 davidg Exp $ */ /* TODO @@ -1088,6 +1088,18 @@ is_ioctl(ifp, cmd, data) break; #endif + case SIOCSIFMTU: + + /* + * Set the interface MTU. + */ + if (ifr->ifr_mtu > ETHERMTU) { + error = EINVAL; + } else { + ifp->if_mtu = ifr->ifr_mtu; + } + break; + default: error = EINVAL; }