streams.c (111815) | streams.c (115550) |
---|---|
1/* 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1994 Christos Zoulas 4 * Copyright (c) 1997 Todd Vierling 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * Stolen from NetBSD /sys/compat/svr4/svr4_net.c. Pseudo-device driver 30 * skeleton produced from /usr/share/examples/drivers/make_pseudo_driver.sh 31 * in 3.0-980524-SNAP then hacked a bit (but probably not enough :-). 32 * | 1/* 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1994 Christos Zoulas 4 * Copyright (c) 1997 Todd Vierling 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * Stolen from NetBSD /sys/compat/svr4/svr4_net.c. Pseudo-device driver 30 * skeleton produced from /usr/share/examples/drivers/make_pseudo_driver.sh 31 * in 3.0-980524-SNAP then hacked a bit (but probably not enough :-). 32 * |
33 * $FreeBSD: head/sys/dev/streams/streams.c 111815 2003-03-03 12:15:54Z phk $ | 33 * $FreeBSD: head/sys/dev/streams/streams.c 115550 2003-05-31 20:33:18Z phk $ |
34 */ 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/kernel.h> /* SYSINIT stuff */ 39#include <sys/conf.h> /* cdevsw stuff */ 40#include <sys/malloc.h> /* malloc region definitions */ 41#include <sys/file.h> --- 18 unchanged lines hidden (view full) --- 60#include <compat/svr4/svr4_ioctl.h> 61#include <compat/svr4/svr4_stropts.h> 62#include <compat/svr4/svr4_socket.h> 63 64static int svr4_soo_close(struct file *, struct thread *); 65static int svr4_ptm_alloc(struct thread *); 66static d_open_t streamsopen; 67 | 34 */ 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/kernel.h> /* SYSINIT stuff */ 39#include <sys/conf.h> /* cdevsw stuff */ 40#include <sys/malloc.h> /* malloc region definitions */ 41#include <sys/file.h> --- 18 unchanged lines hidden (view full) --- 60#include <compat/svr4/svr4_ioctl.h> 61#include <compat/svr4/svr4_stropts.h> 62#include <compat/svr4/svr4_socket.h> 63 64static int svr4_soo_close(struct file *, struct thread *); 65static int svr4_ptm_alloc(struct thread *); 66static d_open_t streamsopen; 67 |
68struct svr4_sockcache_entry { 69 struct proc *p; /* Process for the socket */ 70 void *cookie; /* Internal cookie used for matching */ 71 struct sockaddr_un sock;/* Pathname for the socket */ 72 dev_t dev; /* Device where the socket lives on */ 73 ino_t ino; /* Inode where the socket lives on */ 74 TAILQ_ENTRY(svr4_sockcache_entry) entries; 75}; | 68struct svr4_sockcache_head svr4_head; |
76 | 69 |
77TAILQ_HEAD(svr4_sockcache_head, svr4_sockcache_entry) svr4_head; 78 | |
79/* Initialization flag (set/queried by svr4_mod LKM) */ 80int svr4_str_initialized = 0; 81 82/* 83 * Device minor numbers 84 */ 85enum { 86 dev_ptm = 10, --- 332 unchanged lines hidden --- | 70/* Initialization flag (set/queried by svr4_mod LKM) */ 71int svr4_str_initialized = 0; 72 73/* 74 * Device minor numbers 75 */ 76enum { 77 dev_ptm = 10, --- 332 unchanged lines hidden --- |