I am using sniffer to sniff packets for a short duration say 20sec . I want to overwrite the file with new sniffed packets . Right now while saving packets both old and new packets are written into the file. After 20 sec the sniffer restarts sniffing so I want to write only packets sniffed in that duration into the file. How can I do that?
Thanks in advance.