Date: Sat, 26 Aug 2006 18:44:24 +0400 From: Ruslan Ermilov <ru@freebsd.org> To: Rajkumar S <rajkumars@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: Netgraph plumbing question Message-ID: <20060826144424.GC30165@rambler-co.ru> In-Reply-To: <64de5c8b0608250849p2912457cs84c227cc914d1f10@mail.gmail.com> References: <64de5c8b0608250849p2912457cs84c227cc914d1f10@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--jq0ap7NbKX2Kqbes Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 25, 2006 at 09:19:04PM +0530, Rajkumar S wrote: > In the ng_split node is it possible to merge 2 incoming streams into > mixed, while all packets received at mixed goes via out? If merge node > does not support that, is there any other way to get the same result? > No, but it's trivial to set up ng_bpf(4) to do it. Since the default BPF program will be non-matching, "ifNotMatch" action should be used. # ngctl [...] + mkpeer bpf mixed mixed + name mixed bpf + conn bpf: in1 in1 + conn bpf: in2 in2 + conn bpf: out out + msg bpf: setprogram { thisHook=3D"in1" ifNotMatch=3D"mixed" } + msg bpf: setprogram { thisHook=3D"in2" ifNotMatch=3D"mixed" } + msg bpf: setprogram { thisHook=3D"mixed" ifNotMatch=3D"out" } + write in1 33 Rec'd data packet on hook "mixed": 0000: 21 ! + write in2 33 Rec'd data packet on hook "mixed": 0000: 21 ! + write mixed 33 Rec'd data packet on hook "out": 0000: 21 ! Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --jq0ap7NbKX2Kqbes Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFE8F5IqRfpzJluFF4RArghAJwPb2mkdQqQzd+dFLM+q61CX1/gHQCeKMkN zd5mz5mgHsFmYL+gtSrMBNw= =C12K -----END PGP SIGNATURE----- --jq0ap7NbKX2Kqbes--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060826144424.GC30165>