![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux网络协议栈
徐维溢
这个作者很懒,什么都没留下…
展开
-
linux网络协议栈br_handle_frame_finish
/* note: already called with rcu_read_lock */int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb){ const unsigned char *dest = eth_hdr(skb)->h_dest; struct net_bridge_port *p = br_port_get_rcu(skb->dev); struct net..原创 2022-04-08 17:01:50 · 3217 阅读 · 0 评论 -
linux网络协议栈neigh_update
/* Generic update routine. -- lladdr is new lladdr or NULL, if it is not supplied. -- new is new state. -- flags NEIGH_UPDATE_F_OVERRIDE allows to override existing lladdr, if it is different. NEIGH_UPDATE_F_WEAK_OVERRIDE will suspect...原创 2021-04-14 10:26:17 · 590 阅读 · 0 评论 -
linux网络协议栈neigh_periodic_work
static void neigh_periodic_work(struct work_struct *work){ struct neigh_table *tbl = container_of(work, struct neigh_table, gc_work.work); struct neighbour *n; struct neighbour __rcu **np; unsigned int i; struct neigh_hash_table *nht; NEIGH_CACHE..原创 2021-04-13 15:07:00 · 504 阅读 · 0 评论 -
linux网络协议栈neigh_timer_handler
/* Called when a timer expires for a neighbour entry. */static void neigh_timer_handler(unsigned long arg){ unsigned long now, next; struct neighbour *neigh = (struct neighbour *)arg; unsigned int state; int notify = 0; write_lock(&neigh->..原创 2021-04-13 13:34:44 · 412 阅读 · 0 评论 -
linux网络协议栈arp_process
/* * Process an arp request. */static int arp_process(struct sk_buff *skb){ struct net_device *dev = skb->dev; struct in_device *in_dev = __in_dev_get_rcu(dev); struct arphdr *arp; unsigned char *arp_ptr; struct rtable *rt; unsigned char *s..原创 2021-04-12 17:57:04 · 721 阅读 · 4 评论 -
linux网络协议栈br_handle_frame
rx_handler_result_t br_handle_frame(struct sk_buff **pskb){ struct net_bridge_port *p; struct sk_buff *skb = *pskb; const unsigned char *dest = eth_hdr(skb)->h_dest; br_should_route_hook_t *rhook; //本地环回包直接返回 if (unlikely(skb->pkt_typ.原创 2021-03-15 17:53:54 · 777 阅读 · 0 评论 -
linux网络协议栈ip_rcv
int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev){ const struct iphdr *iph; struct net *net; u32 len; //丢弃PACKET_OTHERHOST类型的包 /* When the interface is in promisc. mode, drop all the.原创 2021-03-12 16:39:56 · 847 阅读 · 0 评论 -
linux网络协议栈__netif_receive_skb_core
static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc){ struct packet_type *ptype, *pt_prev; rx_handler_func_t *rx_handler; struct net_device *orig_dev; bool deliver_exact = false; int ret = NET_RX_DROP; __be16 type; net_timest.原创 2021-03-10 11:06:19 · 1832 阅读 · 0 评论