on comparison with wireshark

Hi Luca and all, In the above snap ,the wireshark shows the exact details like length,payload ,source,destination etc,.,Like that, is their any way to find payload,length in nDPI. please suggest me the possible solutions. Thank you,
nDPi is a DPI toolkit, not a packet sniffer. Please have a look at the code of https://github.com/ntop/nDPI/blob/dev/example/ndpiReader.c for an example
First of all, nDPI and Wireshark don't show the same informations to the user. Second, are u interested where you can find it inside the the code or you want just to see that information? For example: if you launch ndpiReader with the option -v 2, you can see more detailed informations about the flows (for example you can see, for every flow, the IP source and IP dest, the main protocol and subprotocol, the number of pkts for every flows and the length of these packets, and also the host name server if is present).
Thankyou Luca and kyroL01, hi kyroL01 As you said ,i used -v 2 it doesn't show the details as you mentioned. Its just show the protocols like TCP and UDP. please, put the snap as you got from your code.
Thank you
Hi Luca, Then which library or product gives the details as i mentioned before . can you help me. Thank you,
@rathnaTech ./ndpiReader -i wlan0 -v 2

It works as I explained
Thank you so much for spending your valuable time with me kYroL01.
No problem. But if you're interest in a packet sniffer library or a tool without a GUI , look at tcpdump & libpcap.
Greetings
Thank you once again kYroL01
Hi kYroL01, shall i know ,how to write a json file in ndpi. Please put snap if possible. Thank you
hi kYroL01, Are u there ?? .Please reply to me. Thank you
You have to use the -j option. -j file.json (Specify a file to write the content of packets in .json format)
Thank you Luca, I did . Please answer my other issues as i posted with various headings. Thank you.
hi kYroL01, you have mentioned in a previous comment that in order to see the content pf the packets i could put it in a json file using the command that you have mentioned. when i tried that command i couldn't use it. could you please specify how to use it?
This is the option to use: -j <file.json> | Specify a file to write the content of packets in .json format\n"
You have to compile ndpiReader with json library if you want to export statistic in a json file. After this you have to specify a .json file to pass with -j option and it be filled with stats u can see from here
kYroL01, thank you for replying, sorry another question, i <file.pcap|device> i have tried reading the packets from .pcap file, but when i tried substituting the file with the name of the device it wouldn't work. could you please demonstrate that part? i'm really sorry if i'm asking a lot it's just i have been trying to find anyone who has any sort of info about nDPI. thank you again
@mariam1411450 for sure you are digiting the wrong device name. ndpiReader -i wlan0 or ndpiReader -i eth0. You can see your devices name if you digit sudo ifconfig in your terminal.
@kYroL01 sorry for asking too much but I'm working on a graduation project with nDPI :D when I write these command it says ERROR: could not open pcap file or playlist wlan0: No such file or directory. The command I wrote was ndpiReader -i wlan0 enp0s3 and I tried ndpiReader -i wlan0 can you write to me the full command please ? thank you so much
I think you have to put sudo command
sudo ndpiReader -i [device name].
You can also pass a pcap file.
@kYroL01 genuinely, thank you so much for replying, i just wanted to ask another question about the payload, how does we show the payload of packets? does this command -j <file.json> | Specify a file to write the content of packets in .json format\n" achieve this purpose?
@mariam1411450 If you have this doubt, please, write me a private mail to avoid to spam too muche this thread, thanks.