该函数位于include/net/dst.h,该函数未定义于ipv4的目录下,这也意味着数据将传递到主机到网络层了。 [cpp] view plain copy 393 static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n, 394 struct sk_buff *skb) 395 { 396 const struct hh_cache *hh; 397 398 ...
9. err = dst_output(skb); 10. } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 由上面两个函数,真正调用的其实是rth->dst.output= ip_output指向的函数,该函数将主要工作放到ip_finish_output去完成,这和接收时的方法很类似,并且这里也有一个钩子函数。 AI检测代码解析 1. 298 int ip_output(struct sk...
第411行调用的是neigh_resolve_output,该函数是通过路由表查到的,不论硬件支不支持硬件头缓存,neigh_resolve_output都会被调用到,它来源如下: staticconststructneigh_ops arp_generic_ops = { .family = AF_INET, .solicit = arp_solicit, .error_report =arp_error_report, .output = neigh_resolve_output,...