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 144389 2005-03-31 12:19:44Z phk $ |
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> --- 205 unchanged lines hidden (view full) --- 248 return; 249 } 250 251 /* find any existing device, or allocate new unit number */ 252 i = clone_create(&tapclones, &tap_cdevsw, &unit, dev, extra); 253 if (i) { 254 *dev = make_dev(&tap_cdevsw, unit2minor(unit | extra), 255 UID_ROOT, GID_WHEEL, 0600, "%s%d", device_name, unit); |
256 if (*dev != NULL) { 257 dev_ref(*dev); |
258 (*dev)->si_flags |= SI_CHEAPCLONE; |
259 } |
260 } 261} /* tapclone */ 262 263 264/* 265 * tapcreate 266 * 267 * to create interface --- 610 unchanged lines hidden --- |