On Fri, 17 Oct 2003, Guy Harris wrote:
> On Thu, Oct 16, 2003 at 07:20:10PM -0600, Craig Davison wrote:
> > What do you think about adding a pcap_dump_fileno(pcap_dumper_t*)
> > function that returns a FILE *,
>
> The name should probably be "pcap_dump_file()" (by analogy to
> "pcap_file()" and "pcap_fileno()").

You're absolutely right.

> Given that, I might be inclined to have "pcap_dump_ex()", or something
> such as that, which could take a "char *errbuf" and fill in the buffer
> with an error string, or have a "pcap_dumper_t" be a structure with a
> "FILE *" and an error buffer in it and have a "pcap_dump_geterr()"
> routine.

The pcap_dump_geterr is also a good idea because it's consistent with
pcap_geterr. Of course, pcap_dump (or pcap_dump_ex if you take that
path) would have to return an int to indicate success or failure
(currently pcap_dump is a void function).

-- 
Craig Davison
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]

Reply via email to