I'm trying to add a new route using the netlink package. The equivalent I need is ip route add $P1_NET dev $IF1 src $IP1 table $T1
. The issue is that I don't know what field corresponds to the dev
parameter. Is there a mapping somewhere or can I use the interface index instead its name ("dev")?
Looking at the link you sent, I'd guess IifName
. And looking at the code seems to confirm that.