据我所知
const struct net_device *in
钩子参数描述数据包通过的网络接口。
有没有可能从该结构中获取接口的IPv4地址?
内核版本3.2.0
谢谢
发布于 2018-11-02 16:07:40
我找到了我需要这里的代码。我的适配器只有一个IPv4地址,所以我设法用:
((in->ip_ptr)->ifa_list)->ifa_address;
https://stackoverflow.com/questions/53124311
相似问题