R: [Winpcap-users] Sniffing every tot seconds..

Gianluca Varenni gianluca.varenni at cacetech.com
Thu Mar 2 15:39:40 GMT 2006


Francesco,

uhm, why don't you use pcap_next_ex() instead of pcap_loop() + 
pcap_breakloop()? I usually find pcap_next_ex() much more straightforward to 
use that loop....

Have a nice day
GV

----- Original Message ----- 
From: "Francesco Tabbita (IT)" <ingtabby at infinito.it>
To: <winpcap-users at winpcap.org>
Sent: Wednesday, March 01, 2006 3:27 AM
Subject: R: R: [Winpcap-users] Sniffing every tot seconds..


Hi! I have problem with breakloop... I must restart pcaploop after the call
to breakloop...but it doesn t work..maybe i must reopen the handle with
pcap_openlive?

-----Messaggio originale-----
Da: winpcap-users-bounces at winpcap.org
[mailto:winpcap-users-bounces at winpcap.org] Per conto di Vasily Borovyak
Inviato: mercoledì 1 marzo 2006 10.38
A: winpcap-users at winpcap.org
Oggetto: Re: R: [Winpcap-users] Sniffing every tot seconds..

You're welcome.
:)


Francesco Tabbita (IT) wrote:
>
> hi to all..thanks for your replies..
>
> 1) option read_timeout : i didn t understand from documentation what
> it does..i think it is only a way to read many packets instead only
> one at same time..
>
> 2) traffic arriving in non sniffing period must be delivered... i dont
> sniff it but it is important too...
>
> 3)there is a way to stop the loop function and so stop sniffing??maybe
> pcap_breakloop( )?
>
> i think i ll do as Vasily said:
>
> 1) start sniffing, remember the time of that moment.
> 2) after new packet received - check the current time if 3 seconds are
> elapsed since item 1.
> 3) If not elapsed then continue sniffing.
> 4) else - sleep(10 seconds) and go to item 1.
>
>
> -----Messaggio originale-----
> Da: winpcap-users-bounces at winpcap.org
> [mailto:winpcap-users-bounces at winpcap.org] Per conto di Guy Harris
> Inviato: mercoledi` 1 marzo 2006 0.40
> A: winpcap-users at winpcap.org
> Oggetto: Re: [Winpcap-users] Sniffing every tot seconds..
>
>
> On Feb 27, 2006, at 1:48 AM, Francesco Tabbita (IT) wrote:
>
> > Hi to all! I must sniff traffic for 2-3 seconds every 10
> > seconds.....that is: sniff for 3 seconds....wait 10 seconds...sniff
> > for 3 seconds...wait 10 seconds...
>
> What do you want to do with traffic that arrives during the 10-second
> periods when you're *not* sniffing? Do you want it to be discarded?
>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
> ----------------------------------------------------------------------
> --
>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>

--
Best regards. Vasily Borovyak <vbor at isd.dp.ua>

_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users


_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users



More information about the Winpcap-users mailing list