Currently architecting a side-project idea I have that requires tcpdump
on an Arduino 101. This will be my first project and just wondering if this is possible or if maybe I should get a Raspberry Pi?
I won the Arduino 101 at a hackathon so I already have it and I think I need to order an Ethernet Shield but want to ask before I order parts.
Update: hrm, it appears I will need to do the packet sniffing with possibly libpcap. Found example here https://www.tcpdump.org/sniffex.c
1 Answer 1
You are better off with a Raspberry Pi or a Beaglebone board, as either of those are full-blown computers that are directly running Linux variants. You would find that the standard implementation of tcpdump would directly work on them (if it's not already included in the base operating system).
The Arduino Ethernet shield is basically a separate processor that implements some portions of the Ethernet stack and repackages it in a way that the simple micro controller in the Arduino can easily access. It will not provide low-level access to the OSI protocol stack. So I doubt that you would be able to get access to the full IP package contents.
-
\$\begingroup\$ Much thanks, so if I did want to use the Arduino, I would have to do the sniffing in C (no Linux apps like tcpdump) and it is likely I wouldn't have access to the actual packets, correct? \$\endgroup\$Elijah Lynn– Elijah Lynn2019年02月18日 22:23:56 +00:00Commented Feb 18, 2019 at 22:23
-
1\$\begingroup\$ @ElijahLynn that's correct. Unless the IC in the Ethernet shield provides that functionality, which I seriously doubt. \$\endgroup\$Edgar Brown– Edgar Brown2019年02月18日 22:31:37 +00:00Commented Feb 18, 2019 at 22:31
-
1\$\begingroup\$ @ElijahLynn You might be able to convert the tcpdump source code to work on the Arduino, if it can fit in the amount of memory it has. \$\endgroup\$Stack Exchange Broke The Law– Stack Exchange Broke The Law2019年02月19日 04:41:17 +00:00Commented Feb 19, 2019 at 4:41
-
\$\begingroup\$ Thanks, I am going to go the Pi route for this prototype! \$\endgroup\$Elijah Lynn– Elijah Lynn2019年02月27日 04:10:24 +00:00Commented Feb 27, 2019 at 4:10
-
\$\begingroup\$ Beware that Ethernet on the Beaglebone only works on something like 60% of power-on's, due to a longstanding design bug with the circuitry around the PHY that TI has zero interest in fixing. \$\endgroup\$Chris Stratton– Chris Stratton2019年02月27日 05:30:08 +00:00Commented Feb 27, 2019 at 5:30