/* -*-c-*-
*
- * $Id: unet.c,v 1.2 2001/02/03 18:39:59 mdw Exp $
+ * $Id: unet.c,v 1.3 2001/02/19 19:10:28 mdw Exp $
*
* User-space network device support.
*
/*----- Revision history --------------------------------------------------*
*
* $Log: unet.c,v $
+ * Revision 1.3 2001/02/19 19:10:28 mdw
+ * New option to allow changing interface flags.
+ *
* Revision 1.2 2001/02/03 18:39:59 mdw
* Setting the maximum interface count now does the right thing.
*
u->nif.rebuild_header = 0;
u->nif.set_mac_address = 0;
- u->nif.type = ARPHRD_LOOPBACK; /* Got a better idea? */
+ u->nif.type = ARPHRD_TUNNEL; /* Got a better idea? */
u->nif.hard_header_len = 0;
u->nif.mtu = 1500 - MAX_HEADER;
u->nif.addr_len = 0;
unet_maxif); )
break;
+ /* --- @UNIOCFIFFLAGS@ and @UNIOCSIFFLAGS@ --- */
+
+ case UNIOCGIFFLAGS:
+ D( printk(KERN_DEBUG "unet: UNIOCGIFFFLAGS\n"); )
+ e = u->nif.flags;
+ break;
+ case UNIOCSIFFLAGS:
+ D( printk(KERN_DEBUG "unet: UNIOCSIFFFLAGS: arg = %ld\n", arg); )
+ if ((u->nif.flags ^ arg) & ~IFF_VOLATILE)
+ return (-EINVAL);
+ u->nif.flags = arg;
+ break;
+
/* --- Everything else --- *
*
* You lose.