[Click] Repeating packets read from FromDump

Eddie Kohler kohler at cs.ucla.edu
Thu Jul 15 11:20:47 EDT 2004


Kevin,

You're right that FromDump wouldn't do this.  But I just added two things to the 
anoncvs version so that you can, sort of.  The features are a read/write 
'filepos' handler for FromDump, and a 'loop' option for DriverManager.  Check out:


f :: FromDump(~/src/ipsumdump/test/hdlc.trace, FORCE_IP true, STOP true)
   -> IPPrint
   -> Discard
DriverManager(wait_stop, write f.filepos 24, write f.active true, loop)


The number "24" is the length of a tcpdump file's header, so 'write f.filepos 
24' resets FromDump to the position of the first packet.

You could also perform 'write f.filepos 24' and 'write f.active true' using a 
ControlSocket.

Eddie



kevin_mitchell at agilent.com wrote:
> Hello,
>  
> For testing purposes I'm reading packets from a dump file, using FromDump, and then sending them out of one of my interfaces, after altering them.  Now when all the packets have been sent click just waits.  I can see an option to tell the driver to stop at that point.  But what I can't see is any way to tell click to start reading the file from the beginning again, and keep going until I kill it.  This seems a reasonable thing to want to do, especially when using the timing argument to limit the packet generation rate.   Unless I've misread things I couldn't see a parameter for the FromDump element that would have this effect.  Is there some other way of achieving this in Click, or would I have to write my own element to do this?
>  
> Thanks,
>  
> Kevin
>  
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click



More information about the click mailing list