Closed lazytiger closed 2 years ago
I assume you're asking about the RawSocket PHY? It's not directly supported, but you can get the FD with .as_raw_fd()
and then dosetsockopt()
on it yourself.
I want to set marks for all the packets coming from TapTunInterface, what should I do? Can I just setsockopt on TapTunInterface fd? Thanks
I'm not sure it's possible with tun/tap. You can probably use iptables to mark all packets coming from tap0
I have tried the following iptables rules
iptables -t mangle -A OUTPUT -o tun0 -j MARK --set-mark 1
but no packets were matched
Correct iptables usage is out of scope of smoltcp, I'm afraid.
Thanks for the reply.
Is it possible to set SO_MARK in smoltcp?