Closed xxhenglyxx closed 6 years ago
@xxhenglyxx You need to install libpcap to your PC. Please refer to this guide(MacOS section): http://seladb.github.io/PcapPlusPlus-Doc/download.html
@echo-Mike I already have libpcap installed from brew before installing PcapPlusPlus, and I did followed the instruction from the page you refer me to, but still did not work.
Hi @xxhenglyxx thanks for using PcapPlusPlus. Regarding your problem:
xcode-select --install
)?--std=c++14
and see if it's working@xxhenglyxx did you have a chance to go over the items mentioned above?
@seladb sorry for the late replies. I compiled it successfully but I did not compiled the example provided with the library. I already install the Xcode command line tools, removing --std=c++14 did not help also.
I went to look at the Tests folder and ran the Packet++Test, the result was only 3 pass and the rest got failed, why is like that ? The 3 that was passed is EthPacketCreation, Ipv4PacketCreation, InsertDataToPacket. And this is the Pcap++Test
@xxhenglyxx you should run it from Packet++Test folder, meaning:
cd /<your_pcapplusplus_folder>/Tests/Packet++Test
Bin/Packet++Test
Same for Pcap++Test:
cd /<your_pcapplusplus_folder>/Tests/Pcap++Test
sudo Bin/Pcap++Test -i <interface_ip>
@seladb Yes I did run exactly like that. After I cloned the library, I cd into my Downloads/PcapPlusPlus/... and run the test from within. I feel like I miss something so that is why it wont work, is there anything I should have beside the thing inside the documentation ?
have you run the configure-mac_os_x.sh
script?
I'd advise you to start fresh - clone the library again, run the configuration script, run the make command and then try to run the unit-tests. It'd be great if you can attach the console output to this ticket
Hi, any updates on this issue?
@seladb Yes so sorry for the late reply. I did run the configure-mac_os_x.sh
script and the script ran successfully. I will clone the library again and redo everything all over then will update on this issue again.
So I cloned the library again, and ran configure-mac_os_x.sh
, then follow up with ./configure-linux.sh --use-immediate-mode
.
then running make all
this time throws me these errors:
@xxhenglyxx you shouldn't run configure-linux.sh --use-immediate-mode
since you're on a Mac. You should run only configure-mac_os_x.sh
. If you want to use immediate mode you can run: configure-mac_os_x.sh --use-immediate-mode
instead.
Please let me know if it solves these errors
It successfully build but here are the test results:
You should run the unit-test from its own directory:
cd <pcapplusplus_home>/Tests/Packet++Test
Bin/Packet++Test
cd <pcapplusplus_home>/Tests/Pcap++Test
sudo Bin/Pcap++Test -i <your_ip_address>
Yes I did run it from its own unit-test directory. After I cloned it at some location, then cd into it, follow all the installation steps, then run unit test within it.
The unit-test applications fail to read the input files for some reason, with the info I have it's hard for me to say why. One more thing I can suggest is to record everything you do and send me the output as a text file, not as an image. Please record everything from cloning the project to running the unit-tests
Ok I will do that and send it to you.
Here is the file: output.txt
Thanks!
You're running:
cd Tests/Packet++Test/Bin
./Packet++Test
But you should run:
cd Tests/Packet++Test
Bin/Packet++Test
Same for Pcap++Test, you're running:
cd Tests/Pcap++Test/Bin
./Pcap++Test
but you should run:
cd Tests/Pcap++Test
sudo Bin/Pcap++Test -i <your_ip_address>
Please let me know if it solves the problem
@seladb Wow. Yes everything are passed now.
Awesome! If that's ok with you, I'll close the issue now. Please reopen it if you still encounter issues
Platform: Macosx - High Sierra
First time using this library, I cloned the repository and successfully built it. I am trying to test if it works by copying and running the reading pcap example from the documentation. Here is how i compile and build it
And I used the pcaps that was being captured by using wireshark and export it as .pcap file, changed the file name and run it, and this is the output i got: