skb_set_inner_network_header(skb, skb->mac_len); skb_set_inner_protocol(skb, skb->protocol); } skb_push(skb, MPLS_HLEN); memmove(skb_mac_header(skb) - MPLS_HLEN,skb_mac_header(skb), skb->mac_len); skb_reset_mac_header(skb); skb_set_network_header(skb, skb->mac_len); new_...
skb->protocol = skb->inner_protocol;/* Push back the mac header that skb_mac_gso_segment() has pulled. * It will be re-pulled by the call to skb_mac_gso_segment() below */__skb_push(skb, skb->mac_len);/* Segment inner packet. */mpls_features = skb->dev->mpls_features & ...
skb_reset_network_header(skb); iph = ip_hdr(skb); skb_put(skb, length); skb->ip_summed = CHECKSUM_NONE; skb->transport_header = skb->network_header; err = memcpy_fromiovecend((void *)iph, from, 0, length); if (err) goto error_fault; /* We don't modify invalid header */ ...
(skb, 0, skb->len, 0)); } __skb_push(skb, tnl_hlen - ghl); skb_reset_inner_headers(skb); skb->encapsulation = 1; skb_reset_mac_header(skb); skb_set_network_header(skb, mac_len); skb->mac_len = mac_len; skb->protocol = protocol; } while ((skb = skb->next)); out:...
(conststruct iphdr *)skb_inner_network_header(skb), &rt_dst(rt)); err = ip_local_out(skb);if(unlikely(net_xmit_eval(err))) pkt_len =0;returnpkt_len; } 开发者ID:emaste,项目名称:openvswitch,代码行数:42,代码来源:ip_tunnels_core.c ...
csum_fold(skb_checksum(skb,0, skb->len,0)))gotodrop;/* check if the inner packet is destined to mcast group */encap = (struct ipv6hdr *)(skb_transport_header(skb) +sizeof(*pim));if(!ipv6_addr_is_multicast(&encap->daddr) || e...
skb_reset_network_header(new_skb);skb_set_transport_header(new_skb, out->l3_hdr_len);memcpy(skb_network_header(new_skb), out->l3_hdr, out->l3_hdr_len);memcpy(skb_transport_header(new_skb), out->l4_hdr, out->l4_hdr_len);memcpy(skb_transport_header(new_skb) + out->l4_hdr_len...
skb_reset_network_header(skb); skb_mac_header_rebuild(skb); err =0; out:returnerr; } 开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:31,代码来源:xfrm4_mode_tunnel.c 示例3: xfrm6_beet_make_header ▲点赞 3▼ staticvoidxfrm6_beet_make_header(struct sk_buff *skb){struct...
示例13: skb_network_header tnl_skb_gso_segment(struct sk_buff *skb,netdev_features_tfeatures,booltx_path,sa_family_tsa_family){void*iph = skb_network_header(skb);intpkt_hlen = skb_inner_network_offset(skb);/* inner l2 + tunnel hdr. */intmac_offset = skb_inner_mac_offset(skb);int...
*skb_mac_header(skb) = IPPROTO_COMP; out_ok: skb_push(skb, -skb_network_offset(skb));return0; } 开发者ID:Albinoman887,项目名称:pyramid-3.4.10,代码行数:30,代码来源:xfrm_ipcomp.c 示例4: match ▲点赞 1▼ staticboolmatch(conststruct sk_buff *skb, struct xt_action_param *par){unsi...