Ethereal-dev: Re: [ethereal-dev] AIX: gtk problem solved, now an ethereal problem

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Craig Rodrigues <rodrigc@xxxxxxxxxxxx>
Date: Mon, 15 Nov 1999 09:53:07 -0500
On Sun, Nov 14, 1999 at 11:42:49PM -0800, Guy Harris wrote:
> > OK, I did that and here is what I get:
> > Failed to open lo0 with pcap_open_live(), error is: lo0: No buffer space available
> 
> ...but, when you stepped through "pcap_open_live()", the "open()" call
> returned 10, not -1?
> 
> Odd.  In "bpf_open()", does it break out of the
> 
>         do {
>                 (void)sprintf(device, "/dev/bpf%d", n++);
>                 fd = open(device, O_RDONLY);
>         } while (fd < 0 && errno == EBUSY);
> 
> loop with "fd" being a non-negative number?

Yes, fd is set to 10, and errno is set to 0x4a.

The actual lines where errstr is set is in pcap-bpf.c:

        (void) ioctl(fd, BIOCSBLEN, (caddr_t)&v);

        (void)strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
        if (ioctl(fd, BIOCSETIF, (caddr_t)&ifr) < 0) {
                sprintf(ebuf, "%s: %s", device, pcap_strerror(errno));
                goto bad;
        }

Ideas?

-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@xxxxxxxxxxxx