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="in1" ifNotMatch="mixed" }
+ msg bpf: setprogram { thisHook="in2" ifNotMatch="mixed" }
+ msg bpf: setprogram { thisHook="mixed" ifNotMatch="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,
-- 
Ruslan Ermilov
[EMAIL PROTECTED]
FreeBSD committer

Attachment: pgpdXBdx3okco.pgp
Description: PGP signature

Reply via email to