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")?
哪个字段对应于netlink中的“ dev”(设备)参数?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- dongzhi9032 2015-07-06 02:07关注
Looking at the link you sent, I'd guess
IifName
. And looking at the code seems to confirm that.解决 无用评论 打赏 举报