111 __u8 csum_valid:1; 112 __u8 csum_complete_sw:1; 113 __u8 csum_level:2; 114 __u8 csum_bad:1; 115 #ifdef CONFIG_IPV6_NDISC_NODETYPE 116 __u8 ndisc_nodetype:2; 117 #endif 118 __u8 ipvs_property:1; 119 120 __u8 inner_protocol_type:1; 121 __u8 remcsum_offload:1; 122...
uh->check = csum_tcpudp_magic(inet_addr(srcIP), inet_addr(dstIP), skb->len - iph->ihl * 4, IPPROTO_UDP, skb->csum); skb->ip_summed = CHECKSUM_NONE;/*changing Mac address*/structethhdr* eth = (structethhdr*)skb_push(skb,sizeof(structethhdr));//add data to the start of a ...
skb->csum= csum_partial((char *)uh, sizeof(struct udphdr), skb->csum); uh->check= csum_tcpudp_magic(fl->fl4_src, fl->fl4_dst, user_data_len, IPPROTO_UDP,skb->csum); if(uh->check == 0) uh->check= -1; This is what a new SKB looks like after wepush the UDP header t...
马克-to-win,子类把父类的方法和属性当成自己的一样随便用的这种现象叫继承。In OOP, the ability t...
voidskb_copy_and_csum_dev(const structsk_buff*skb,u8*to)1825{1826__wsumcsum;1827long csstart;18281829if (skb->ip_summed ==CHECKSUM_PARTIAL)1830csstart =skb->csum_start -skb_headroom(skb);1831else1832csstart =skb_headlen(skb);18331834BUG_ON(csstart >skb_headlen(skb));18351836skb_copy_...
3316 __skb_postpull_rcsum(skb, start, len, 0) 调用者 名称描述 skb_remcsum_process Update skbuf and packet to reflect the remote checksum offload operation.* When called, ptr indicates the starting point for skb->csum when* ip_summed is CHECKSUM_COMPLETE. If we need create checksum ...
skb->csum = csum_partial((char *)uh, sizeof(struct udphdr), skb->csum); uh->check = csum_tcpudp_magic(fl->fl4_src, fl->fl4_dst, user_data_len, IPPROTO_UDP, skb->csum); if (uh->check == 0) uh->check = -1;
[SK_BUFF]: Introduce skb_transport_header(skb) Browse files Browse the repository at this point in the history For the places where we need a pointer to the transport header, it is still legal to touch skb->h.raw directly if just adding to, subtracting from or setting it to another...
@@ -734,12 +734,12 @@ static int pasemi_mac_start_tx(struct sk_buff *skb, struct net_device *dev) switch (ip_hdr(skb)->protocol) { case IPPROTO_TCP: dflags |= XCT_MACTX_CSUM_TCP; - dflags |= XCT_MACTX_IPH((skb->h.raw - skb->nh.raw) >> ...
[SK_BUFF]: Introduce skb_network_offset() For the quite common 'skb->nh.raw - skb->data' sequence. Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- drivers/isdn/i4l/isdn_net.c | 2 +- drivers/net/atl1/atl1_...