[Click] help with click packet structure and push, pull mechanism

Beyers Cronje bcronje at gmail.com
Thu Aug 11 09:54:10 EDT 2005


Hi Ges,

Just a suggestion, you could have your "FromDevice" element store the
data stream in a buffer. Then have a second element that pulls Packets
from this buffer. I've done something similar in an Indirect TCP
element. Your "FromDevice" element will have to copy data from the
buffer into the packet when Pull is called.

You didn't state what you want to do with these packets, ie add tcp/ip
headers to forward to an IP station ?

Beyers

On 8/11/05, Ges <ges_george at yahoo.com> wrote:
> Hi Eddie,
> 
> I am trying to use click to work on software radios (i
> think i already mentioned this in an earlier mail).
> 
> I am trying to write click elements (something similar
> to FromDevice) that read data streams from a device.
> >From the device, I dont get packets, i get data
> streams which i will convert into packets at a later
> stage. To convert the streams into packets, i have to
> write elements that work on demodulation, decoding
> (PHY properties) etc.
> 
> I have to find some way of making Click understand
> these streams (could be a vector of diff data types)
> instead of packets.
> 
> I see 3 ways of doing this...
> 1. include in class Element push(), pull() that
> understands a different type other than packet. and
> define this type!
> 
> 2. modify the packet class to include vector of these
> data streams (but i am not sure how i can later change
> the "packet" that includes my data stream to an actual
> packet!
> 
> 3. simply define a new type and forcefully cast it
> into a packet so that Click does not crib.
> 
> I am not sure which is the best way to approach the
> problem. Am i missing something here? is there a much
> cleaner way to do this?
> 
> Please help.
> 
> Thank you
> Gesly
> 
> 
> 
> ____________________________________________________
> Start your day with Yahoo! - make it your home page
> http://www.yahoo.com/r/hs
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>



More information about the click mailing list