[Click] Input flush action for userspace FromDevice?

Markku Savela Markku.Savela at vtt.fi
Fri Oct 19 01:47:37 EDT 2012


On 10/17/2012 01:19 PM, Markku Savela wrote:

> I cannot find such function in FromDevice or is there? First
> that comes to mind is some kind of flush handler that
> would read and discard input, until none... (there is, of
> course, a small concern of reading forever and never seeing
> "no data" if new data for socket is generated faster than
> click can read).

Ok, here is my test for such handler. This is not anything
that could be incorporated as is: it is hard coded to assume
the linux method for reading -- I didn't have time to study
how to achieve same with PCAP or NETMAP...

I suppose I should have wrapped this in FROMDEVICE_ALLOW_LINUX
and check the selected _method too.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: flush.diff
Type: text/x-patch
Size: 1124 bytes
Desc: not available
Url : http://amsterdam.lcs.mit.edu/pipermail/click/attachments/20121019/f668aada/attachment.bin 


More information about the click mailing list