Deleted Added
full compact
if_vlan.c (36078) if_vlan.c (38482)
1/*
2 * Copyright 1998 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

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

21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*
2 * Copyright 1998 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

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

21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $Id: if_vlan.c,v 1.1 1998/03/18 01:40:12 wollman Exp $
29 * $Id: if_vlan.c,v 1.2 1998/05/15 20:02:47 wollman Exp $
30 */
31
32/*
33 * if_vlan.c - pseudo-device driver for IEEE 802.1Q virtual LANs.
34 * Might be extended some day to also handle IEEE 802.1p priority
35 * tagging. This is sort of sneaky in the implementation, since
36 * we need to pretend to be enough of an Ethernet implementation
37 * to make arp work. The way we do this is by telling everyone

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

75u_int vlan_proto = ETHERTYPE_VLAN;
76SYSCTL_INT(_net_link_vlan_link, VLANCTL_PROTO, proto, CTLFLAG_RW, &vlan_proto,
77 0, "Ethernet protocol used for VLAN encapsulation");
78
79static struct ifvlan ifv_softc[NVLAN];
80
81static void vlan_start(struct ifnet *ifp);
82static void vlan_ifinit(void *foo);
30 */
31
32/*
33 * if_vlan.c - pseudo-device driver for IEEE 802.1Q virtual LANs.
34 * Might be extended some day to also handle IEEE 802.1p priority
35 * tagging. This is sort of sneaky in the implementation, since
36 * we need to pretend to be enough of an Ethernet implementation
37 * to make arp work. The way we do this is by telling everyone

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

75u_int vlan_proto = ETHERTYPE_VLAN;
76SYSCTL_INT(_net_link_vlan_link, VLANCTL_PROTO, proto, CTLFLAG_RW, &vlan_proto,
77 0, "Ethernet protocol used for VLAN encapsulation");
78
79static struct ifvlan ifv_softc[NVLAN];
80
81static void vlan_start(struct ifnet *ifp);
82static void vlan_ifinit(void *foo);
83static int vlan_ioctl(struct ifnet *ifp, int cmd, caddr_t addr);
83static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr);
84
85static void
86vlaninit(void *dummy)
87{
88 int i;
89
90 for (i = 0; i < NVLAN; i++) {
91 struct ifnet *ifp = &ifv_softc[i].ifv_if;

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

257 sdl1->sdl_type = IFT_ETHER;
258 sdl1->sdl_alen = ETHER_ADDR_LEN;
259 bcopy(LLADDR(sdl2), LLADDR(sdl1), ETHER_ADDR_LEN);
260 bcopy(LLADDR(sdl2), ifv->ifv_ac.ac_enaddr, ETHER_ADDR_LEN);
261 return 0;
262}
263
264static int
84
85static void
86vlaninit(void *dummy)
87{
88 int i;
89
90 for (i = 0; i < NVLAN; i++) {
91 struct ifnet *ifp = &ifv_softc[i].ifv_if;

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

257 sdl1->sdl_type = IFT_ETHER;
258 sdl1->sdl_alen = ETHER_ADDR_LEN;
259 bcopy(LLADDR(sdl2), LLADDR(sdl1), ETHER_ADDR_LEN);
260 bcopy(LLADDR(sdl2), ifv->ifv_ac.ac_enaddr, ETHER_ADDR_LEN);
261 return 0;
262}
263
264static int
265vlan_ioctl(struct ifnet *ifp, int cmd, caddr_t data)
265vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
266{
267 struct ifaddr *ifa;
268 struct ifnet *p;
269 struct ifreq *ifr;
270 struct ifvlan *ifv;
271 struct vlanreq vlr;
272 int error = 0;
273

--- 90 unchanged lines hidden ---
266{
267 struct ifaddr *ifa;
268 struct ifnet *p;
269 struct ifreq *ifr;
270 struct ifvlan *ifv;
271 struct vlanreq vlr;
272 int error = 0;
273

--- 90 unchanged lines hidden ---