Looking for a example of reading incoming IP
Hello everyone,
I am looking for a example of netfilter hook to read the ip address of incoming packets in both PreRoute and PostRoute.
I searched online for some example but none of them work for the kernel 2.6.29 I am using. I am not sure whether there something has been changed there.
I could set up the hook now but always fail to read the correct ip address. Basically I want to store that ip address into a char array than just print it out.
Appreciate any help especially some concrete example.
Thanks in advance,
-Kunsheng Chen
Quoted 3 lines · Kunsheng Chen
I am looking for a example of netfilter hook to read the ip address of incoming packets in both PreRoute and PostRoute.
Have a look at the Writing Netfilter Modules e-book
(http://jengelh.medozas.de/), section 2 ("match extension"), which presents a fictional ipaddr module for demonstrational purposes that reads and prints said address.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html