register callback for special packet types like udp and icmp?
Hello,
is there a way to define callback (match) functions for special packet types like udp and icmp? I would like to have a match function which only reacts on udp and icmp packets. Is this possible in a kernelspace module and/or in a libnetfilter_queue daemon and how?
thanks in advance,
Thomas
Quoted 6 lines · Thomas Mader
Hello,
is there a way to define callback (match) functions for special packet types like udp and icmp? I would like to have a match function which only reacts on udp and icmp packets. Is this possible in a kernelspace module and/or in a
libnetfilter_queuedaemon and how?
Both would work. For kernel modules, it's as simple as specifying .proto = IPPROTO_UDP or IPPROTO_ICMP, see
http://jengelh.medozas.de/documents/Netfilter_Modules.pdf