On Tue, May 14, 2002 at 05:23:19PM -0400, Timothy Ball wrote:
> It's a static library but I was wondering on the possibility of making
> it a .so and making the lib gpl'ed.
Presumably, as per the subject line, you mean "LGPLed". It currently
*is* GPLed.
> I'm working on some stuff that needs
> to write to tcpdump format, but it's an embedded device and I can't
> release the source code. (mostly cause of the boss)
Well, I'm not its sole author - Gilbert Ramirez is the original author,
and several other people have contributed to it as well - so you
shouldn't just be asking me about LGPLing it.
However, there is a pile of non-GPLed code that can be used to write
tcpdump-format files. It can be found at
http://www.tcpdump.org/
:-)
(I.e., why not just use "pcap_dump_open()", "pcap_dump()", and
"pcap_dump_close()", which are what tcpdump uses?
"pcap_dump_open()" has an API that's a bit annoying if what you're
writing *isn't* coming from "pcap_open_live()" or "pcap_open_offline()",
but you can either
1) use "pcap_open_dead()", which is in the current version of
libpcap
or
2) cut-and-paste the code rather than using it as is, which
might be the right answer for an embedded device.
If your embedded device is running Linux or BSD - as I infer it might
be, from the "possibility of making it a .so" - then it might either
already *have* a shared libpcap with "pcap_open_dead()", or it might be
possible to build one. Neither libpcap from tcpdump.org nor wiretap are
currently built as shared libraries on UNIX systems because doing that
on multiple UNIX platforms involves dragging in in Full Frontal Libtool,
which is a non-trivial effort.)