Guest User

Untitled

a guest
Jul 18th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. skb = dev_alloc_skb( dlen + 2 );
  2. skb_reserve(skb,2);
  3. memcpy(skb_put(skb, dlen), pdcp_sdu,dlen);
  4.  
  5. skb->dev = nasdev[inst];
  6. skb_reset_mac_header(skb);
  7.  
  8. skb->pkt_type = PACKET_HOST;
  9. skb->ip_summed = CHECKSUM_NONE;
  10. ...
  11.  
  12. skb_reset_network_header(skb);
  13. network_header = (struct iphdr *)skb_network_header(skb);
  14. protocol = network_header->protocol;
  15. skb->protocol = htons(ETH_P_IP);
  16.  
  17. netif_rx(skb); // I need to send the packet instead of receiving it.
Add Comment
Please, Sign In to add comment