On Tue, Feb 20, 2001 at 10:55:38AM -0800, Guy Harris wrote:
> Therefore, "pcap_compile()" will return an error; you're not checking
> for that in your code.  If it returns a value of -1, that means it's
> failed; you should then use "pcap_geterr()" to get a string giving a
> textual description of the error in the filter, and print that

The man page for the current version of libpcap does a better job of
documenting that than the libpcap 0.4 man page text I cited:

       pcap_compile() is used to compile the string  str  into  a
       filter  program.   program  is  a pointer to a bpf_program
       struct and is filled in by pcap_compile().  optimize  con-
       trols  whether  optimization on the resulting code is per-
       formed.  netmask specifies the netmask of the  local  net.
       A   return   of  -1  indicates  an  error  in  which  case
       pcap_geterr() may be used to display the error text.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to