if_tun.c (130585) | if_tun.c (130640) |
---|---|
1/* $NetBSD: if_tun.c,v 1.14 1994/06/29 06:36:25 cgd Exp $ */ 2 3/* 4 * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk> 5 * Nottingham University 1987. 6 * 7 * This source may be freely distributed, however I would be interested 8 * in any changes that are made. 9 * 10 * This driver takes packets off the IP i/f and hands them up to a 11 * user process to have its wicked way with. This driver has it's 12 * roots in a similar driver written by Phil Cockcroft (formerly) at 13 * UCL. This driver is based much more on read/write/poll mode of 14 * operation though. 15 * | 1/* $NetBSD: if_tun.c,v 1.14 1994/06/29 06:36:25 cgd Exp $ */ 2 3/* 4 * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk> 5 * Nottingham University 1987. 6 * 7 * This source may be freely distributed, however I would be interested 8 * in any changes that are made. 9 * 10 * This driver takes packets off the IP i/f and hands them up to a 11 * user process to have its wicked way with. This driver has it's 12 * roots in a similar driver written by Phil Cockcroft (formerly) at 13 * UCL. This driver is based much more on read/write/poll mode of 14 * operation though. 15 * |
16 * $FreeBSD: head/sys/net/if_tun.c 130585 2004-06-16 09:47:26Z phk $ | 16 * $FreeBSD: head/sys/net/if_tun.c 130640 2004-06-17 17:16:53Z phk $ |
17 */ 18 19#include "opt_atalk.h" 20#include "opt_inet.h" 21#include "opt_inet6.h" 22#include "opt_ipx.h" 23#include "opt_mac.h" 24 --- 108 unchanged lines hidden (view full) --- 133 .d_name = TUNNAME, 134}; 135 136static void 137tunclone(void *arg, char *name, int namelen, struct cdev **dev) 138{ 139 int u, i; 140 | 17 */ 18 19#include "opt_atalk.h" 20#include "opt_inet.h" 21#include "opt_inet6.h" 22#include "opt_ipx.h" 23#include "opt_mac.h" 24 --- 108 unchanged lines hidden (view full) --- 133 .d_name = TUNNAME, 134}; 135 136static void 137tunclone(void *arg, char *name, int namelen, struct cdev **dev) 138{ 139 int u, i; 140 |
141 if (*dev != NODEV) | 141 if (*dev != NULL) |
142 return; 143 144 if (strcmp(name, TUNNAME) == 0) { 145 u = -1; 146 } else if (dev_stdclone(name, NULL, TUNNAME, &u) != 1) 147 return; /* Don't recognise the name */ 148 if (u != -1 && u > IF_MAXUNIT) 149 return; /* Unit number too high */ --- 707 unchanged lines hidden --- | 142 return; 143 144 if (strcmp(name, TUNNAME) == 0) { 145 u = -1; 146 } else if (dev_stdclone(name, NULL, TUNNAME, &u) != 1) 147 return; /* Don't recognise the name */ 148 if (u != -1 && u > IF_MAXUNIT) 149 return; /* Unit number too high */ --- 707 unchanged lines hidden --- |