hua Blanton" <[EMAIL PROTECTED]>
To: tcpdump-workers@lists.tcpdump.org
Subject: Re: [tcpdump-workers] pcap_loop segfaults
Date: Sun, 19 Jun 2005 09:20:01 -0400
>
> ury segal wrote:
> > Just to same you some pain, here is another
> > error in your program: Look at your die
Joshua Blanton wrote:
It does appear that printf doesn't set errno, at least on linux and
OSX,
It probably will set errno if
1) it gets an error writing to the standard output (e.g., if it's
redirected to a file, and the file system is full or you're over quota)
or
2) it calls "isatty()
ury segal wrote:
> Just to same you some pain, here is another
> error in your program: Look at your die()
> function:
< code snip >
> Once you call fflush() or vfprintf() the value
> that was in errno when you called the function
> is GONE. errno is a global variable that may be
> changed insid
- Original Message -
From: "ury segal" <[EMAIL PROTECTED]>
To: tcpdump-workers@lists.tcpdump.org
Subject: Re: [tcpdump-workers] pcap_loop segfaults
Date: Sun, 19 Jun 2005 02:22:48 -0400 (EDT)
>
> Just to same you some pain, here is another
> error in your
exander medvedev" <[EMAIL PROTECTED]>
> To: tcpdump-workers@lists.tcpdump.org
> Subject: Re: [tcpdump-workers] pcap_loop segfaults
> Date: Sat, 18 Jun 2005 23:26:20 -0500 (CDT)
>
> >
> > hallo,
> >
> > i didn't go into much detail but for a sta
odd, yet this yas seemed to fix it, much thanks.
- Original Message -
From: "alexander medvedev" <[EMAIL PROTECTED]>
To: tcpdump-workers@lists.tcpdump.org
Subject: Re: [tcpdump-workers] pcap_loop segfaults
Date: Sat, 18 Jun 2005 23:26:20 -0500 (CDT)
>
> hallo,
>
hallo,
i didn't go into much detail but for a start:
i'd make "pcap_t *pfd" global and change:
if (!(pcap_open_live(iface, snaplen, 0, -1, errbuf)))
to
if ((pfd = pcap_open_live(iface, snaplen, 0, -1, errbuf)) != NULL)
this should get you started :-)
good luck,
-alexm
23:16 18/06/2005
On Sun,
Hello, i'm attempting my first pcap capture, but pcap_loop segfaults, and i'm
not quite sure why:
-- begin ./sniff output --
xzziroz:/home/kspecial# ./sniff
-> successfuly listening on iterface 'eth0'
Segmentation fault
xzziroz:/home/kspecial# gdb sniff
GNU gdb 6.3-debian
Copyright 2004 Free Sof