----- Original Message ----- 
From: "Guy Harris" <[EMAIL PROTECTED]>
To: <tcpdump-workers@lists.tcpdump.org>
Sent: Monday, July 11, 2005 1:49 PM
Subject: Re: [tcpdump-workers] FreeBSD 5.4 & BIOCSRTIMEOUT &
pcap_open_live()


> Richard Huddleston wrote:
> > Freshly installed FreeBSD 5.4.  New user of FreeBSD.
> >
> > pcap_open_live() fails with a
> >
> >     BIOCSRTIMEOUT: Invalid argument
> >
> > pcap_open_live( device, BUFSIZ, 1, -1, errbuf )
>
> itimerfix() in the 5.4 kernel does
>
> int
> itimerfix(struct timeval *tv)
> {
>
>          if (tv->tv_sec < 0 || tv->tv_sec > 100000000 ||
>              tv->tv_usec < 0 || tv->tv_usec >= 1000000)
>                  return (EINVAL);
>          if (tv->tv_sec == 0 && tv->tv_usec != 0 && tv->tv_usec < tick)
>                  tv->tv_usec = tick;
>          return (0);
> }
>
> so it rejects negative values.
>
> Furthermore, BPF doesn't support negative values for the timeout - the
> timeout is, internally to the kernel's BPF implementation, stored as an
> *unsigned* variable with a count of clock ticks.
>
> What are you trying to accomplish here?

Just referencing Tim Carsten's pcap doc:  "...to_ms is the read time out...0
sniffs until an error occurs; -1 sniffs indefinitely)."


-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.

Reply via email to