: How do I get a c program to get a packet before anything else, so i can decide whether to forward it on or not in Linux? :
Write a device driver. There is plenty of documentation for writing device drivers in Linux (just ask google). Also you can check out the source code to an open source Linux firewall system as it will likely cover this (and it is likely what you are interested in or at least closely related).
"We can't do nothing and think someone else will make it right." -Kyoto Now, Bad Religion
Comments
:
Write a device driver. There is plenty of documentation for writing device drivers in Linux (just ask google). Also you can check out the source code to an open source Linux firewall system as it will likely cover this (and it is likely what you are interested in or at least closely related).
"We can't do nothing and think someone else will make it right."
-Kyoto Now, Bad Religion