ng_tee.c (68876) | ng_tee.c (69922) |
---|---|
1 2/* 3 * ng_tee.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: Julian Elischer <julian@freebsd.org> 38 * | 1 2/* 3 * ng_tee.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: Julian Elischer <julian@freebsd.org> 38 * |
39 * $FreeBSD: head/sys/netgraph/ng_tee.c 68876 2000-11-18 15:17:43Z dwmalone $ | 39 * $FreeBSD: head/sys/netgraph/ng_tee.c 69922 2000-12-12 18:52:14Z julian $ |
40 * $Whistle: ng_tee.c,v 1.18 1999/11/01 09:24:52 julian Exp $ 41 */ 42 43/* 44 * This node is like the tee(1) command and is useful for ``snooping.'' 45 * It has 4 hooks: left, right, left2right, and right2left. Data 46 * entering from the right is passed to the left and duplicated on 47 * right2left, and data entering from the left is passed to the right --- 85 unchanged lines hidden (view full) --- 133 NULL, 134 ngt_constructor, 135 ngt_rcvmsg, 136 ngt_rmnode, 137 ngt_newhook, 138 NULL, 139 NULL, 140 ngt_rcvdata, | 40 * $Whistle: ng_tee.c,v 1.18 1999/11/01 09:24:52 julian Exp $ 41 */ 42 43/* 44 * This node is like the tee(1) command and is useful for ``snooping.'' 45 * It has 4 hooks: left, right, left2right, and right2left. Data 46 * entering from the right is passed to the left and duplicated on 47 * right2left, and data entering from the left is passed to the right --- 85 unchanged lines hidden (view full) --- 133 NULL, 134 ngt_constructor, 135 ngt_rcvmsg, 136 ngt_rmnode, 137 ngt_newhook, 138 NULL, 139 NULL, 140 ngt_rcvdata, |
141 ngt_rcvdata, | |
142 ngt_disconnect, 143 ng_tee_cmds 144}; 145NETGRAPH_INIT(tee, &ng_tee_typestruct); 146 147/* 148 * Node constructor 149 */ --- 120 unchanged lines hidden (view full) --- 270 * send the original onwards out through the left link. 271 * Do the opposite for data coming in from the left link. 272 * Data coming in right2left or left2right is forwarded 273 * on through the appropriate destination hook as if it had come 274 * from the other side. 275 */ 276static int 277ngt_rcvdata(hook_p hook, struct mbuf *m, meta_p meta, | 141 ngt_disconnect, 142 ng_tee_cmds 143}; 144NETGRAPH_INIT(tee, &ng_tee_typestruct); 145 146/* 147 * Node constructor 148 */ --- 120 unchanged lines hidden (view full) --- 269 * send the original onwards out through the left link. 270 * Do the opposite for data coming in from the left link. 271 * Data coming in right2left or left2right is forwarded 272 * on through the appropriate destination hook as if it had come 273 * from the other side. 274 */ 275static int 276ngt_rcvdata(hook_p hook, struct mbuf *m, meta_p meta, |
278 struct mbuf **ret_m, meta_p *ret_meta) | 277 struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp) |
279{ 280 const sc_p sc = hook->node->private; 281 struct hookinfo *const hinfo = (struct hookinfo *) hook->private; 282 struct hookinfo *dest; 283 struct hookinfo *dup; 284 int error = 0; 285 286 /* Which hook? */ --- 100 unchanged lines hidden --- | 278{ 279 const sc_p sc = hook->node->private; 280 struct hookinfo *const hinfo = (struct hookinfo *) hook->private; 281 struct hookinfo *dest; 282 struct hookinfo *dup; 283 int error = 0; 284 285 /* Which hook? */ --- 100 unchanged lines hidden --- |