[Click] Logging packet data to disk

John Bicket jbicket at gmail.com
Mon Nov 28 01:02:46 EST 2005


We have had this same issue, and we generally do one of two things:
1. someone (Doug or Dan?) wrote elements/grid/packetlogger.cc and
elements/grid/packetlogger2.cc which stores packets which you can
read out of the handler "log".
2. Use something like "ToHost(fakedump)" in your config and send
it all the packets you want recorded; you can run
"tcpdump -i fakedump -w foo.dump"
and it will grab the packets you hand to tohost and put them in a file.

John


On 11/28/05, Ramanathan Palaniappan <ramwisc at gmail.com> wrote:
>
> Hi,
>
> I have been working on a small element that logs all the received packets
> in
> pcap format. I am trying to do this in the linux kernel module and I am
> kind
> of not sure how to go about writing the packets to disk from the kernel. I
> am looking for an approach that wll take minimal amount of overhead.
>
> Thanks,
> Ramanathan
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
>


More information about the click mailing list