How to Read Incoming packets from ethernet card?
11 views (last 30 days)
Show older comments
I have been given this assignment to read incoming IP packets and display their information in a tabular form. It is something similar to the opensource application Wireshark but I have to make the same in matlab . I am very new to matlab and would seek some guidance on the same . I have to display the packer header information i.e. packet size,packet protocol,source,destination.
2 Comments
Victor Haro
on 25 Sep 2012
HI,
Maybe you can USE Tcpdump for mac or linux, or windump for windows.
You can send the results to TXT , example
tcpdump -enni 4 >> text.txt
And you can process the data with Matlab
Regards
Answers (1)
Walter Roberson
on 19 Aug 2011
Wireshark and similar programs require privileged access to the ethernet device, as normally programs can only access packets destined for them.
Based upon what I have seen of the interface provided by the Instrument Control Toolbox, I don't expect this facility would be available using those tools.
I think you might have better success using the tcpudpip MATLAB File Exchange contribution. That would, though, in a sense be cheating, in that contribution uses the NetCat libraries that do all of the hard work and then just transfer the packets over to MATLAB.
2 Comments
Walter Roberson
on 20 Aug 2011
Should be possible. Once you have the stored packets, the rest is mostly tedium, especially to find the documentation needed to fully decode proprietary protocols.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!