[Click] Custom aggregate element

Cliff Frey cliff at meraki.com
Mon Jul 18 11:20:42 EDT 2011


For your first question, I'm not sure what is going on.  It is important
that the AggregateCounter is not frozen... perhaps by adding chatter calls
to elements/analysis/aggcounter.cc you can get to the bottom of the issue.

I'm not quite sure what you mean by this second point, but you could add a
read_handler for this.  I believe that the main risk would be running out of
memory if the result from the read_handler was very very large.

Cliff

On Mon, Jul 18, 2011 at 6:49 AM, Roberto Riggio <
roberto.riggio at create-net.org> wrote:

> BTW,
>
> is there a way, besides the write_text_file handler, to get a list of
> the aggregated counters? Consider that I'm using the element in a router
> configuration in order to get some statistics about the packet types
> sent over a certain wireless interface.
>
> R.
>
> On 18/07/2011 14:11, Roberto Riggio wrote:
> > Hi,
> >
> > I wrote a very simple element, starting from aggregatelen that sets the
> > aggregate annotation to a value specified in a packet field. The core
> > function is the following:
> >
> > Packet *
> > AggregateWingPacketType::handle_packet(Packet *p)
> > {
> >       click_ether *eh = (click_ether *) p->data();
> >       struct wing_header *pk = (struct wing_header *) (eh + 1);
> >       uint8_t type = pk->_type;
> >       SET_AGGREGATE_ANNO(p, type);
> >       return p;
> > }
> >
> > The chain i'm using in the click configuration is the following:
> >
> > ->  AggregateWingPacketType() ->  count :: AggregateCounter() ->
> >
> > however if I call the handler:
> >
> > write count.write_text_file -
> >
> > i get an empty output although packets are flowing trough the
> > AggregateWingPacketType element.
> >
> > Is there any particular requirement on the packets flowing trough the
> > AggregateCounter element? (in my case the ip header is not set)
> >
> > Thanks
> >
> > R.
> >
>
>
> --
> --------------------------------------------------------
> Roberto Riggio, Ph.D.
> CREATE-NET
> Network & Security Solutions for Pervasive Computing Systems (iNSPIRE)
> Senior Researcher
> Via alla Cascata 56/D - 38123 Povo Trento (Italy)
> e-mail: roberto.riggio at create-net.org
> Tel: (+39) 0461 408400 - interno/extension 708
> Fax: (+39) 0461 421157
> www.create-net.org/~rriggio
> --------------------------------------------------------
>
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited according to
> the Italian Law 196/2003 of the Legislature. If you received this in
> error, please contact the sender and delete the material from any
> computer.
>
> Le informazioni contenute in questo messaggio di posta elettronica e nei
> file allegati sono da considerarsi strettamente riservate. Il loro
> utilizzo e' consentito esclusivamente al destinatario del messaggio, per
> le finalita' indicate nel messaggio stesso. Qualora riceveste questo
> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
> darcene notizia via e-mail e di procedere alla cancellazione del
> messaggio stesso dal Vostro sistema. Trattenere il messaggio stesso,
> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo,
> od utilizzarlo per finalita' diverse, costituisce comportamento
> contrario ai principi dettati dal D. Lgs. 196/2003.
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list