ng_ksocket.c (68876) | ng_ksocket.c (69922) |
---|---|
1 2/* 3 * ng_ksocket.c 4 * 5 * Copyright (c) 1996-1999 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 22 unchanged lines hidden (view full) --- 31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * 37 * Author: Archie Cobbs <archie@freebsd.org> 38 * | 1 2/* 3 * ng_ksocket.c 4 * 5 * Copyright (c) 1996-1999 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 22 unchanged lines hidden (view full) --- 31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * 37 * Author: Archie Cobbs <archie@freebsd.org> 38 * |
39 * $FreeBSD: head/sys/netgraph/ng_ksocket.c 68876 2000-11-18 15:17:43Z dwmalone $ | 39 * $FreeBSD: head/sys/netgraph/ng_ksocket.c 69922 2000-12-12 18:52:14Z julian $ |
40 * $Whistle: ng_ksocket.c,v 1.1 1999/11/16 20:04:40 archie Exp $ 41 */ 42 43/* 44 * Kernel socket node type. This node type is basically a kernel-mode 45 * version of a socket... kindof like the reverse of the socket node type. 46 */ 47 --- 416 unchanged lines hidden (view full) --- 464 NULL, 465 ng_ksocket_constructor, 466 ng_ksocket_rcvmsg, 467 ng_ksocket_rmnode, 468 ng_ksocket_newhook, 469 NULL, 470 NULL, 471 ng_ksocket_rcvdata, | 40 * $Whistle: ng_ksocket.c,v 1.1 1999/11/16 20:04:40 archie Exp $ 41 */ 42 43/* 44 * Kernel socket node type. This node type is basically a kernel-mode 45 * version of a socket... kindof like the reverse of the socket node type. 46 */ 47 --- 416 unchanged lines hidden (view full) --- 464 NULL, 465 ng_ksocket_constructor, 466 ng_ksocket_rcvmsg, 467 ng_ksocket_rmnode, 468 ng_ksocket_newhook, 469 NULL, 470 NULL, 471 ng_ksocket_rcvdata, |
472 ng_ksocket_rcvdata, | |
473 ng_ksocket_disconnect, 474 ng_ksocket_cmds 475}; 476NETGRAPH_INIT(ksocket, &ng_ksocket_typestruct); 477 478#define ERROUT(x) do { error = (x); goto done; } while (0) 479 480/************************************************************************ --- 296 unchanged lines hidden (view full) --- 777 return (error); 778} 779 780/* 781 * Receive incoming data on our hook. Send it out the socket. 782 */ 783static int 784ng_ksocket_rcvdata(hook_p hook, struct mbuf *m, meta_p meta, | 472 ng_ksocket_disconnect, 473 ng_ksocket_cmds 474}; 475NETGRAPH_INIT(ksocket, &ng_ksocket_typestruct); 476 477#define ERROUT(x) do { error = (x); goto done; } while (0) 478 479/************************************************************************ --- 296 unchanged lines hidden (view full) --- 776 return (error); 777} 778 779/* 780 * Receive incoming data on our hook. Send it out the socket. 781 */ 782static int 783ng_ksocket_rcvdata(hook_p hook, struct mbuf *m, meta_p meta, |
785 struct mbuf **ret_m, meta_p *ret_meta) | 784 struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp) |
786{ 787 struct proc *p = curproc ? curproc : &proc0; /* XXX broken */ 788 const node_p node = hook->node; 789 const priv_p priv = node->private; 790 struct socket *const so = priv->so; 791 int error; 792 793 NG_FREE_META(meta); --- 116 unchanged lines hidden --- | 785{ 786 struct proc *p = curproc ? curproc : &proc0; /* XXX broken */ 787 const node_p node = hook->node; 788 const priv_p priv = node->private; 789 struct socket *const so = priv->so; 790 int error; 791 792 NG_FREE_META(meta); --- 116 unchanged lines hidden --- |