Problem in Netgraph ( TESTING OF MY NODE )

Julian Elischer julian at
Sun Mar 21 12:31:41 PST 2004

On Sun, 21 Mar 2004, [iso-8859-1] manish gautam wrote:

> Ist problem
> =============
> i hav created my own node named "m" .and using
> commands
> kldload netgraph
> kldload ng_ether
> kldload ng_m
> i also create an ether node and then i attach my "m"
> node to ether node using 
> ngctl mkpeer ed0: m upper right
>  after that on command ::-->
> ngctl msg my_m: getstats  ( my_m is name of peer to
> ether i.e my node )
> result is as follows ::-->
> Rec'd response "getstats" (1) from "my_m:":
> Args:  { right={inOctets=3508 inFrames=54 }
> left={outOctets=3508 outFrames=54 } }

It means that your module is doing SOMETHING
I can not say if it is working as I don't know aything about your node..
I presume it is based on the 'tee' node..

> Does that mean my node is working... YES or  NO?
> If yes , is every packet coming through ethernet card
> pass through my node. 

no,  you only connected to the 'upper' part of the ethernet 
interface so you are only capturing outgoing packets
I'm not sure if the node correctly does not could bytes going out a
disconnected hook or not.

you should also do: ngctl connect ng_m: ed0: left lower

or something like that I presume

you may also want to look at the ng_etf node
(and it's man page (man ng_etf)

I'm presuming youhave read the man pages.. there should be one for every
node type..
ng_tee ng_ether etc.

> If no, how do I check it and made every packet pass
> through my own node.

look at the packets by attaching nghook to the left2right and 
right2left hooks

More information about the freebsd-net mailing list