Lines Matching refs:bpf_htons
62 if (skb->protocol != bpf_htons(ETH_P_IPV6)) in sched_cls_ingress6_nat_6_prog()
70 if (eth->h_proto != bpf_htons(ETH_P_IPV6)) in sched_cls_ingress6_nat_6_prog()
92 eth2.h_proto = bpf_htons(ETH_P_IP); // But replace the ethertype in sched_cls_ingress6_nat_6_prog()
98 .tot_len = bpf_htons(bpf_ntohs(ip6->payload_len) + sizeof(struct iphdr)), // u16 in sched_cls_ingress6_nat_6_prog()
100 .frag_off = bpf_htons(IP_DF), // u16 in sched_cls_ingress6_nat_6_prog()
130 if (bpf_skb_change_proto(skb, bpf_htons(ETH_P_IP), 0)) in sched_cls_ingress6_nat_6_prog()
159 if (skb->protocol != bpf_htons(ETH_P_IP)) in sched_cls_egress4_snat4_prog()
167 if (eth->h_proto != bpf_htons(ETH_P_IP)) in sched_cls_egress4_snat4_prog()
179 if (bpf_htons(ip4->tot_len) > 0xFFFF - sizeof(struct ipv6hdr)) in sched_cls_egress4_snat4_prog()
200 if (ip4->frag_off & ~bpf_htons(IP_DF)) in sched_cls_egress4_snat4_prog()
227 eth2.h_proto = bpf_htons(ETH_P_IPV6); // But replace the ethertype in sched_cls_egress4_snat4_prog()
233 .payload_len = bpf_htons(bpf_ntohs(ip4->tot_len) - 20), // __be16 in sched_cls_egress4_snat4_prog()
254 if (bpf_skb_change_proto(skb, bpf_htons(ETH_P_IPV6), 0)) in sched_cls_egress4_snat4_prog()