[Click] Writing your own element

Amita Ekbote amita.ekbote at gmail.com
Sat Jan 23 13:47:23 EST 2010


Hey,

The element is going to try and measure the link quality. In my element I
have the run_timer which is just sending out packets, I have written a small
client program to make sure that these packets make it. Once a packet is
received the client sends back a packet. I have the pull function which just
contains the pull print statement. I put a print statement before my click
element and it does receive a packet. For processing I have used "a/a" .


On Sat, Jan 23, 2010 at 12:15 PM, Ian Rose <ianrose at eecs.harvard.edu> wrote:

> Could you say a bit more about how you want this element to work - I'm
> afraid I'm not really getting the full picture.  Perhaps an example of how a
> packet should be handled would help.  And when you say that the receive "is
> not working out", what do you mean?  Are packets never received by your
> element?  It might help to put a Print element right before your element (in
> your click configuration) - this element will Print some stuff to the
> console every time a packet flows through it, so if nothing is ever printed
> then you know that packets simply aren't moving and it might be a problem
> with your click config itself (in which case, send it in an email so we can
> take a look).
>
> Also, what does your elements 'processing' method return?  Just look in
> <yourelement>.hh and you should see something like:
>
> const char *processing() const  { return PUSH; }
>
> or
>
> const char *processing() const  { return AGNOSTIC; }
>
> If you don't see a processing method then you are using the default
> (AGNOSTIC).
>
> - Ian
>
>
> Amita Ekbote wrote:
>
>> Hello,
>>
>> I need to write an element which can send packets and receive packets. The
>> send needs to be like the timed source and based on packets received the
>> send packet will be modified. The send and receive is to the same ip but
>> different port numbers. I have the run_timer function which sends the
>> packet
>> but integrating  the receive part in the same element is not working out.
>> I
>> could write another element for receive and pass it as configuration to
>> the
>> send but was hoping to integrate them into one element. Any suggestions
>> would be appreciated.
>>
>> Thanks
>>
>>


-- 
Amita Ekbote


More information about the click mailing list