linuxlibpcaplibnet

Are there any examples with libpcap and libnet?


I want to capture ip packages on one server, and then forward the packages to another server by libnet, who has some examples ? thanks in advance.


Solution

  • Check out these tutorials:

    Programming with pcap

    Libnet 1.1 tutorial for beginners

    If you have code fragments that are not working, please include.

    Edit

    The 2nd link no longer works. Below is a different link that might help. In general, links should not be listed since they expire or become obsolete. Searching for 'libnet tutorial for beginners' or 'pcap tutorial for beginners' would be a good start.

    Libnet tutorial for beginners