netgraph to userspace?

Julian Elischer julian at elischer.org
Fri Aug 18 07:50:41 UTC 2006


Rajkumar S wrote:

> Hi,
>
> Is it possible to take a packet from netgraph to userspace and drop it
> there? ie, can I
> insert some netgraph node between say lower and upper of a ng_ether
> push the packets to
> userspace [snort] for some processing and possibly either drop it there?


of course..

man ng_socket

that's one of the main Features of netgraph

>
> I know  that NgSendData and NgRecvData can be used to sent and receive
> data using
> ng_socket, but what I want to confirm is that does these work like a
> man in the middle,
> receiving from one end and sent it to next? And if I receive a packet

you can use two sockets.. attach one to lower and the other to upper.

> and forgets to
> sent, it's effectievly dropped?  yes


>
> With warm regards,
>
> raj
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"



More information about the freebsd-net mailing list