if_tun.c (47625) | if_tun.c (47640) |
---|---|
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. --- 107 unchanged lines hidden (view full) --- 116#define dev_val(n) (((n) >> 8) | ((n) & 0xff)) 117 118static void 119tunattach(dummy) 120 void *dummy; 121{ 122 register int i; 123 struct ifnet *ifp; | 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. --- 107 unchanged lines hidden (view full) --- 116#define dev_val(n) (((n) >> 8) | ((n) & 0xff)) 117 118static void 119tunattach(dummy) 120 void *dummy; 121{ 122 register int i; 123 struct ifnet *ifp; |
124 dev_t dev; | |
125 126 if ( tun_devsw_installed ) 127 return; | 124 125 if ( tun_devsw_installed ) 126 return; |
128 dev = makedev(CDEV_MAJOR, 0); 129 cdevsw_add(&dev, &tun_cdevsw, NULL); | 127 cdevsw_add(&tun_cdevsw); |
130 tun_devsw_installed = 1; 131 for ( i = 0; i < NTUN; i++ ) { 132#ifdef DEVFS 133 tun_devfs_token[i] = devfs_add_devswf(&tun_cdevsw, minor_val(i), 134 DV_CHR, UID_UUCP, 135 GID_DIALER, 0600, 136 "tun%d", i); 137#endif --- 562 unchanged lines hidden --- | 128 tun_devsw_installed = 1; 129 for ( i = 0; i < NTUN; i++ ) { 130#ifdef DEVFS 131 tun_devfs_token[i] = devfs_add_devswf(&tun_cdevsw, minor_val(i), 132 DV_CHR, UID_UUCP, 133 GID_DIALER, 0600, 134 "tun%d", i); 135#endif --- 562 unchanged lines hidden --- |