[Click] click element handlers

Amita Ekbote amita.ekbote at gmail.com
Tue Dec 8 16:01:09 EST 2009


thanks! will try it out.

On Tue, Dec 8, 2009 at 11:13 AM, Cliff Frey <cliff at meraki.com> wrote:

> The way Roberto suggests is the highest-performance option. (pass one
> element as a configuration parameter to another element)
>
> If you want to actually use a read handler, look at the HandlerCall
> class...
> and the cpHandlerCallRead definition in confparse.hh... and it should be
> fairly easy to set up.
>
> Cliff
>
> On Tue, Dec 8, 2009 at 2:03 AM, Roberto Riggio <
> roberto.riggio at create-net.org> wrote:
>
> > Hi,
> >
> > instead of using handlers you could pass the element whose member
> > you want to access to the element where you want to use that information.
> >
> > You can find some examples in the in the roofnet's elements
> > (click-packages tree),
> > i.e. the SR2ETTStat element accept as configuration parameter the
> > AvailableRates
> > element. Give a look at sr2ettstat.cc for more info about how to write
> > the configure
> > method in this case.
> >
> > Alternatively, I think that you can also traverse the entire click graph
> > looking for your
> > element. An example can be found in the FromDevice element.
> >
> > R.
> >
> > On 12/08/2009 05:19 AM, Amita Ekbote wrote:
> > > Hello,
> > >
> > > I havent been able to figure out how to use click element handlers. I
> am
> > > writing an element to provide statistics about a link, and i need to
> > > retrieve the number of packets sent by the timed source, I am using a
> > > counter and need the count to be used in another element. Any
> suggestions
> > to
> > > how to go about doing this would be really helpful.
> > >
> > > Thanks
> > >
> > >
> >
> > _______________________________________________
> > click mailing list
> > click at amsterdam.lcs.mit.edu
> > https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>



-- 
Amita Ekbote


More information about the click mailing list