Deleted Added
sdiff udiff text old ( 160376 ) new ( 162711 )
full compact
1/*-
2 * Copyright (C) 1999-2000 by Maksim Yevmenkin <m_evmenkin@yahoo.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * BASED ON:
27 * -------------------------------------------------------------------------
28 *
29 * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
30 * Nottingham University 1987.
31 */
32
33/*
34 * $FreeBSD: head/sys/net/if_tap.c 160376 2006-07-15 02:13:05Z brooks $
35 * $Id: if_tap.c,v 0.21 2000/07/23 21:46:02 max Exp $
36 */
37
38#include "opt_inet.h"
39
40#include <sys/param.h>
41#include <sys/conf.h>
42#include <sys/fcntl.h>
43#include <sys/filio.h>
44#include <sys/kernel.h>
45#include <sys/malloc.h>

--- 561 unchanged lines hidden (view full) ---

607static int
608tapioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
609{
610 struct tap_softc *tp = dev->si_drv1;
611 struct ifnet *ifp = tp->tap_ifp;
612 struct tapinfo *tapp = NULL;
613 int s;
614 int f;
615
616 switch (cmd) {
617 case TAPSIFINFO:
618 s = splimp();
619 tapp = (struct tapinfo *)data;
620 ifp->if_mtu = tapp->mtu;
621 ifp->if_type = tapp->type;
622 ifp->if_baudrate = tapp->baudrate;

--- 58 unchanged lines hidden (view full) ---

681 return (0);
682
683 /* VMware/VMnet port ioctl's */
684
685 case SIOCGIFFLAGS: /* get ifnet flags */
686 bcopy(&ifp->if_flags, data, sizeof(ifp->if_flags));
687 break;
688
689 case VMIO_SIOCSIFFLAGS: /* VMware/VMnet SIOCSIFFLAGS */
690 f = *(intptr_t *)data;
691 f &= 0x0fff;
692 f &= ~IFF_CANTCHANGE;
693 f |= IFF_UP;
694
695 s = splimp();
696 ifp->if_flags = f | (ifp->if_flags & IFF_CANTCHANGE);
697 splx(s);
698 break;

--- 274 unchanged lines hidden ---