Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pypcap Installation #91

Open
stephenfin opened this issue Dec 11, 2013 · 1 comment
Open

pypcap Installation #91

stephenfin opened this issue Dec 11, 2013 · 1 comment

Comments

@stephenfin
Copy link
Contributor

Firstly, we've just begun using OFTest as part of this project. I must compliment ye on a job well done - it's definitely a quite nifty tool.

Now onto business. The one major difficulty we've had with OFTeste has been getting pypcap setup. We use a number of non-Debian distros so the package isn't available in the repos, and installation from source is a nightmare. There's load of issues, ranging from it not finding libpcap when it is installed to some weird build routines and myriad other documented issues). This is a pypcap issue moreso than a OFTest one but seeing as pypcap appears to be a dead project it seems like something ye can't rely on.

As a feature request, could I ask that ye carry out one of the following?

  • Fork pypcap, update if necessary and provide instructions on how to run it
  • Move pypcap into the OFTest mainline (reducing requirements)
  • Provide instructions on setting it up from source (these instructions do not appear to exist elsewhere)

I don't like filing issues without providing at least some code but I'm not sure which of the following is an option yet (and we've still to get pypcap running so I can't contribute here yet).

@rlane
Copy link
Contributor

rlane commented Dec 11, 2013

Is there another python pcap library that's better maintained? We could detect it at runtime. The main requirement is that it has to support sending packets, not just receiving them.

Another option is to use AF_PACKET sockets, which is what OFTest did originally. That code should still be there as a fallback if pypcap isn't found. The problem with AF_PACKET sockets is that recent Linux kernels offload the VLAN tag into a control message (see HAVE_PACKET_AUXDATA in libpcap). libpcap deals with this. Python 3.3 appears to have support for these control messages but Python 2.7 does not. Maybe a minimal C extension would be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants