svr4_socket.c (111119) | svr4_socket.c (115550) |
---|---|
1/* 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1996 Christos Zoulas. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 14 unchanged lines hidden (view full) --- 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * | 1/* 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1996 Christos Zoulas. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 14 unchanged lines hidden (view full) --- 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * |
31 * $FreeBSD: head/sys/compat/svr4/svr4_socket.c 111119 2003-02-19 05:47:46Z imp $ | 31 * $FreeBSD: head/sys/compat/svr4/svr4_socket.c 115550 2003-05-31 20:33:18Z phk $ |
32 */ 33 34/* 35 * In SVR4 unix domain sockets are referenced sometimes 36 * (in putmsg(2) for example) as a [device, inode] pair instead of a pathname. 37 * Since there is no iname() routine in the kernel, and we need access to 38 * a mapping from inode to pathname, we keep our own table. This is a simple 39 * linked list that contains the pathname, the [device, inode] pair, the --- 17 unchanged lines hidden (view full) --- 57#include <compat/svr4/svr4.h> 58#include <compat/svr4/svr4_types.h> 59#include <compat/svr4/svr4_util.h> 60#include <compat/svr4/svr4_socket.h> 61#include <compat/svr4/svr4_signal.h> 62#include <compat/svr4/svr4_sockmod.h> 63#include <compat/svr4/svr4_proto.h> 64 | 32 */ 33 34/* 35 * In SVR4 unix domain sockets are referenced sometimes 36 * (in putmsg(2) for example) as a [device, inode] pair instead of a pathname. 37 * Since there is no iname() routine in the kernel, and we need access to 38 * a mapping from inode to pathname, we keep our own table. This is a simple 39 * linked list that contains the pathname, the [device, inode] pair, the --- 17 unchanged lines hidden (view full) --- 57#include <compat/svr4/svr4.h> 58#include <compat/svr4/svr4_types.h> 59#include <compat/svr4/svr4_util.h> 60#include <compat/svr4/svr4_socket.h> 61#include <compat/svr4/svr4_signal.h> 62#include <compat/svr4/svr4_sockmod.h> 63#include <compat/svr4/svr4_proto.h> 64 |
65struct svr4_sockcache_entry { 66 struct proc *p; /* Process for the socket */ 67 void *cookie; /* Internal cookie used for matching */ 68 struct sockaddr_un sock;/* Pathname for the socket */ 69 udev_t dev; /* Device where the socket lives on */ 70 ino_t ino; /* Inode where the socket lives on */ 71 TAILQ_ENTRY(svr4_sockcache_entry) entries; 72}; 73 74extern TAILQ_HEAD(svr4_sockcache_head, svr4_sockcache_entry) svr4_head; 75extern int svr4_str_initialized; 76 | |
77struct sockaddr_un * 78svr4_find_socket(td, fp, dev, ino) 79 struct thread *td; 80 struct file *fp; 81 udev_t dev; 82 ino_t ino; 83{ 84 struct svr4_sockcache_entry *e; --- 109 unchanged lines hidden --- | 65struct sockaddr_un * 66svr4_find_socket(td, fp, dev, ino) 67 struct thread *td; 68 struct file *fp; 69 udev_t dev; 70 ino_t ino; 71{ 72 struct svr4_sockcache_entry *e; --- 109 unchanged lines hidden --- |