I'm using debian at the moment on an arm microprocessor. I am trying to capture packets sent via the ethernet port, classify them using some code that I have, and then send the result out via the second ethernet port.
I came accross the pcap() function on my google searches as a good function to use, but unfortunately, there is no manual entry for pcap on my debian OS. I doubt that the kernel will recognise the function if i tried calling it in my code.
Also, do I need to get my code running as a stand-alone on the processor before it is able to interact with the ethernet for the packet capture and sending? I just need to be able to read the headers of the packets to be able to classify them.
Any help would be appreciated. I have been looking this up for a while.