Added support for SIOCSIFMTU.

This commit is contained in:
David Greenman 1994-08-08 13:33:16 +00:00
parent 4e68ceaba0
commit 8867d2f19c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1946
6 changed files with 76 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}