lib ipq
hi all
I use the lib ipq. I want to know how one can make the difference between an outgoing and incoming packets with the lib ipq . I queued incoming and outgoing packets .
thanks ;)
hi all
I use the lib ipq. I want to know how one can make the difference between an outgoing and incoming packets with the lib ipq . I queued incoming and outgoing packets .
i use the packet information to look at the tcp/ip headers and check the ip addresses to see if it is incoming or outgoing but it doesnt work if the localhost send a packet at his self (ex : source adress: 127.0.0.1 , dest adress: 127.0.0.1).
how can i make the difference ?
sorry for my bad english :)
You could probably mark the packet using the nfmark field of the skb.
If you are doing this with iptables, use the -j MARK target to do this; something
ala this:
iptables -A OUTPUT -t mangle -i eth0 -j MARK --set-mark 42
Make sure you do this before you queue the packet to userspace.
Regards,
Christian Theil Have.
If you need to do this from userspace with iptables probably
Quoted 14 lines · Unix User
hi all
I use the lib ipq. I want to know how one can make the difference between an outgoing and incoming packets with the lib ipq . I queued incoming and outgoing packets .
i use the packet information to look at the tcp/ip headers and check the ip addresses to see if it is incoming or outgoing but it doesnt work if the localhost send a packet at his self (ex : source adress: 127.0.0.1 , dest adress: 127.0.0.1).how can i make the difference ?
sorry for my bad english :)