Hi,

On 20 December 2011 15:36, Michael Richardson <m...@sandelman.ca> wrote:
>
>>>>>> "Akos" == Akos Vandra <axo...@gmail.com> writes:
>    Akos> At the moment I am using a script-generated code to load the
>    Akos> library run-time, and load all the symbols to the according
>    Akos> function pointers.  I am not very familiar with how dynamic
>
> uhm, okay, but why?

When building wireshark based on the new libpcap with my module using
libusb-1.0, it didn't build, because it was missing symbols
(naturally, as wireshark didn't know it has to link libusb-1.0 as
well). So insted of digging into where I have to add them, it seemed
simpler to write a script.
Also it seems unnatural that only for my project wireshark, and any
other project using libpcap must use libusb-1.0...

>
>    Akos> So my questions are:  - What are the steps needed to 'nicely'
>    Akos> add support to a new device?  What do I have to add to the
>    Akos> configuration, makefiles, #ifdefs, to add conditional
>    Akos> building?   - How can I commit my newly supported device to
>    Akos> the libpcap tree?   - How can this libusb dependency be
>    Akos> solved? I don't think it would be fair to require all libpcap
>    Akos> users to need libusb, just for one device that they might not
>    Akos> even use - conditional building might solve this though.
>
> ./configure takes care of this.  libusb (and your code) would get used
> if the library exists.

I'm not quite sure I understand this. How would ./configure know that
that the libusb_claim_interface is in the libusb-1.0 library?
I'm sorry if I'm a bit slow here, I'm quite unfamiliar with autobuild
and autoconf, should look into them soon.

>
> Fork the code on github.com, and start patching, and ask us to review.
>

Allright, I started reading a tutorial on git and github, I only used
svn, and resisted git up until now. Don't really know why though.
But it seems more and more likely that if I will ever want to
contribute to an OS project, I must learn it, also it seems like a
nice tool...

Will get back to you as soon as I can create the commit.
Is there a how-to guide to how to add a new module to libpcap? Most OS
projects have a HACKING file, or something similar that would help me
get started on where to begin modifying...
My best guess would be to add a few lines to pcap-linux.c, to the
platfrom findalldevs function, between #ifdefs, but a guide would be
very nice to have.
If you can help me out with any nice documentation (on libpcap code
organization, or git/github) I would be very happy if you sent it to
me.

Regards,
  Ákos Vandra

> --
> ]       He who is tired of Weird Al is tired of life!           |  firewalls  
> [
> ]   Michael Richardson, Sandelman Software Works, Ottawa, ON    |net 
> architect[
> ] m...@sandelman.ottawa.on.ca http://www.sandelman.ottawa.on.ca/ |device 
> driver[
>   Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
>                       then sign the petition.
> -
> This is the tcpdump-workers list.
> Visit https://cod.sandelman.ca/ to unsubscribe.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to