Home
last modified time | relevance | path

Searched refs:protocol (Results 1 – 16 of 16) sorted by relevance

/samples/bpf/
A Dxdp_tx_iptunnel_kern.c36 static __always_inline void count_tx(u32 protocol) in count_tx() argument
40 rxcnt_count = bpf_map_lookup_elem(&rxcnt, &protocol); in count_tx()
46 u8 protocol) in get_dport() argument
51 switch (protocol) { in get_dport()
95 dport = get_dport(iph + 1, data_end, iph->protocol); in handle_ipv4()
99 vip.protocol = iph->protocol; in handle_ipv4()
132 iph->protocol = IPPROTO_IPIP; in handle_ipv4()
147 count_tx(vip.protocol); in handle_ipv4()
171 vip.protocol = ip6h->nexthdr; in handle_ipv6()
210 count_tx(vip.protocol); in handle_ipv6()
A Dparse_varlen.c64 if (iph->protocol == IPPROTO_IPIP) { in parse_ipv4()
71 if (iph->protocol == IPPROTO_TCP) in parse_ipv4()
73 else if (iph->protocol == IPPROTO_UDP) in parse_ipv4()
96 nexthdr = iph->protocol; in parse_ipv6()
A Dxdp_tx_iptunnel_common.h18 __u8 protocol; member
A Dsockex1_kern.c18 int index = load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)); in bpf_prog1()
A Dparse_simple.c41 if (iph->protocol != IPPROTO_UDP || iph->ihl != 5) in handle_ingress()
A Dparse_ldabs.c34 if (load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)) != IPPROTO_UDP || in handle_ingress()
A Dhbm_kern.h91 if (sk->protocol == IPPROTO_TCP) { in get_tcp_info()
124 pkti->is_tcp = (iph.protocol == 6); in hbm_get_pkt_info()
A Dsock_example.c50 BPF_LD_ABS(BPF_B, ETH_HLEN + offsetof(struct iphdr, protocol) /* R0 = ip->proto */), in test_sock()
A Dtest_lwt_bpf.c40 skb->protocol); in do_test_ctx()
79 #define IP_PROTO_OFF offsetof(struct iphdr, protocol)
A Dtcbpf1_kern.c58 __u8 proto = load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)); in bpf_prog1()
A Dxdp_tx_iptunnel_user.c169 vip.protocol = IPPROTO_TCP; in main()
195 vip.protocol = atoi(optarg); in main()
A Dxdp_fwd_kern.c73 fib_params.l4_protocol = iph->protocol; in xdp_fwd_flags()
A Dxdp_adjust_tail_kern.c108 iph->protocol = IPPROTO_ICMP; in send_icmp4_too_big()
A Dsockex2_kern.c69 *ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in parse_ip()
A Dtc_l2_redirect_kern.c80 if (iph->protocol != IPPROTO_IPIP) in _l2_to_iptun_ingress_forward()
A Dsockex3_kern.c171 ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in bpf_func_ip()

Completed in 17 milliseconds