Lines Matching refs:skb
53 static int dn_neigh_output(struct neighbour *neigh, struct sk_buff *skb);
166 static void dn_neigh_error_report(struct neighbour *neigh, struct sk_buff *skb) in dn_neigh_error_report() argument
169 kfree_skb(skb); in dn_neigh_error_report()
172 static int dn_neigh_output(struct neighbour *neigh, struct sk_buff *skb) in dn_neigh_output() argument
174 struct dst_entry *dst = skb_dst(skb); in dn_neigh_output()
184 err = dev_hard_header(skb, dev, ntohs(skb->protocol), in dn_neigh_output()
185 neigh->ha, mac_addr, skb->len); in dn_neigh_output()
189 err = dev_queue_xmit(skb); in dn_neigh_output()
191 kfree_skb(skb); in dn_neigh_output()
197 static int dn_neigh_output_packet(struct net *net, struct sock *sk, struct sk_buff *skb) in dn_neigh_output_packet() argument
199 struct dst_entry *dst = skb_dst(skb); in dn_neigh_output_packet()
203 return neigh->output(neigh, skb); in dn_neigh_output_packet()
210 struct sk_buff *skb) in dn_long_output() argument
216 struct dn_skb_cb *cb = DN_SKB_CB(skb); in dn_long_output()
219 if (skb_headroom(skb) < headroom) { in dn_long_output()
220 struct sk_buff *skb2 = skb_realloc_headroom(skb, headroom); in dn_long_output()
223 kfree_skb(skb); in dn_long_output()
226 consume_skb(skb); in dn_long_output()
227 skb = skb2; in dn_long_output()
231 data = skb_push(skb, sizeof(struct dn_long_packet) + 3); in dn_long_output()
234 *((__le16 *)data) = cpu_to_le16(skb->len - 2); in dn_long_output()
247 skb_reset_network_header(skb); in dn_long_output()
250 &init_net, sk, skb, NULL, neigh->dev, in dn_long_output()
258 struct sk_buff *skb) in dn_short_output() argument
264 struct dn_skb_cb *cb = DN_SKB_CB(skb); in dn_short_output()
267 if (skb_headroom(skb) < headroom) { in dn_short_output()
268 struct sk_buff *skb2 = skb_realloc_headroom(skb, headroom); in dn_short_output()
271 kfree_skb(skb); in dn_short_output()
274 consume_skb(skb); in dn_short_output()
275 skb = skb2; in dn_short_output()
279 data = skb_push(skb, sizeof(struct dn_short_packet) + 2); in dn_short_output()
280 *((__le16 *)data) = cpu_to_le16(skb->len - 2); in dn_short_output()
288 skb_reset_network_header(skb); in dn_short_output()
291 &init_net, sk, skb, NULL, neigh->dev, in dn_short_output()
301 struct sk_buff *skb) in dn_phase3_output() argument
307 struct dn_skb_cb *cb = DN_SKB_CB(skb); in dn_phase3_output()
309 if (skb_headroom(skb) < headroom) { in dn_phase3_output()
310 struct sk_buff *skb2 = skb_realloc_headroom(skb, headroom); in dn_phase3_output()
313 kfree_skb(skb); in dn_phase3_output()
316 consume_skb(skb); in dn_phase3_output()
317 skb = skb2; in dn_phase3_output()
321 data = skb_push(skb, sizeof(struct dn_short_packet) + 2); in dn_phase3_output()
322 *((__le16 *)data) = cpu_to_le16(skb->len - 2); in dn_phase3_output()
330 skb_reset_network_header(skb); in dn_phase3_output()
333 &init_net, sk, skb, NULL, neigh->dev, in dn_phase3_output()
337 int dn_to_neigh_output(struct net *net, struct sock *sk, struct sk_buff *skb) in dn_to_neigh_output() argument
339 struct dst_entry *dst = skb_dst(skb); in dn_to_neigh_output()
356 return dn_phase3_output(neigh, sk, skb); in dn_to_neigh_output()
358 return dn_long_output(neigh, sk, skb); in dn_to_neigh_output()
360 return dn_short_output(neigh, sk, skb); in dn_to_neigh_output()
373 void dn_neigh_pointopoint_hello(struct sk_buff *skb) in dn_neigh_pointopoint_hello() argument
375 kfree_skb(skb); in dn_neigh_pointopoint_hello()
381 int dn_neigh_router_hello(struct net *net, struct sock *sk, struct sk_buff *skb) in dn_neigh_router_hello() argument
383 struct rtnode_hello_message *msg = (struct rtnode_hello_message *)skb->data; in dn_neigh_router_hello()
392 neigh = __neigh_lookup(&dn_neigh_table, &src, skb->dev, 1); in dn_neigh_router_hello()
406 memcpy(neigh->ha, ð_hdr(skb)->h_source, ETH_ALEN); in dn_neigh_router_hello()
436 kfree_skb(skb); in dn_neigh_router_hello()
443 int dn_neigh_endnode_hello(struct net *net, struct sock *sk, struct sk_buff *skb) in dn_neigh_endnode_hello() argument
445 struct endnode_hello_message *msg = (struct endnode_hello_message *)skb->data; in dn_neigh_endnode_hello()
452 neigh = __neigh_lookup(&dn_neigh_table, &src, skb->dev, 1); in dn_neigh_endnode_hello()
465 memcpy(neigh->ha, ð_hdr(skb)->h_source, ETH_ALEN); in dn_neigh_endnode_hello()
475 kfree_skb(skb); in dn_neigh_endnode_hello()