Open beraldoleal opened 7 years ago
The same for Python.h:
pcapdumper.cc:10:10: fatal error: Python.h: No such file or directory
@beraldoleal It turns out that pcapy relies on a lower-level library libpcap-dev
to be built. Since ofp_sniffer has this OS-level dependency, probably the most convenient way to ship the code is with Docker. I'll talk to AmLight dev guys to start shipping with Docker.
I wrote a prototype with a minimal set of dependencies and ofp_sniffer is working fine inside a container, note on docker-compose that I'm using network_mode: host
, in order to have full visibility of the networking stack. You can grab the docker-compose file and Dockerfile from this branch on my repo;
https://github.com/viniciusarcanjo/ofp_sniffer/commit/3e6205b99164f70371176481b6c83bad366df7f2
Inside the container:
root@volos:/opt/ofp_sniffer# python3.6 ofp_sniffer.py -i lo
Sniffing device lo
Packet #1 - 2017-09-16 22:37:47.638290 127.0.0.1:6633 -> 127.0.0.1:50032 Size: 122 Bytes
OpenFlow Version: 1.0(1) Type: OFPT_STATS_REQUEST(16) Length: 56 XID: 3514162067
StatReq Type: Flow(OFPST_FLOW)
Match - wildcards: 0x3fffff
StatReq Table_id: 255 Pad: 0 Out_Port: None(0xFFFF)
Packet #2 - 2017-09-16 22:37:47.641140 127.0.0.1:50032 -> 127.0.0.1:6633 Size: 174 Bytes
OpenFlow Version: 1.0(1) Type: OFPT_STATS_REPLY(17) Length: 108 XID: 3514162067
StatRes Type: Flow(1)
StatRes Length: 96 Table_id: 0 Pad: 0
StatRes Match - wildcards: 0x3820fb dl_src: ee:ee:ee:ee:ee:02
StatRes duration_sec: 3, duration_nsec: 756000000, priority: 50001, idle_timeout: 0, hard_timeout: 0, pad: 0, cookie: 0, packet_count: 0, byte_count: 0
StatRes Action - Type: OUTPUT Length: 8 Port: Controller(0xFFFD) Max Length: 65535
Hi Guys, Looks like cc1plus is a dependency to run ofp_sniffer.
I'm getting the following error when installing with
pip3.6 install docs/requirements.txt
: