Home
last modified time | relevance | path

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

/samples/bpf/
Dsock_flags_kern.c17 bpf_trace_printk(fmt, sizeof(fmt), sk->family, sk->type, sk->protocol); in bpf_prog1()
25 sk->protocol == IPPROTO_ICMPV6) in bpf_prog1()
36 bpf_trace_printk(fmt, sizeof(fmt), sk->family, sk->type, sk->protocol); in bpf_prog2()
43 sk->protocol == IPPROTO_ICMP) in bpf_prog2()
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()
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()
Dxdp_tx_iptunnel_common.h18 __u8 protocol; member
Dsockex1_kern.c17 int index = load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)); in bpf_prog1()
Dparse_simple.c41 if (iph->protocol != IPPROTO_UDP || iph->ihl != 5) in handle_ingress()
Dparse_ldabs.c33 if (load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)) != IPPROTO_UDP || in handle_ingress()
Dhbm_kern.h96 if (sk->protocol == IPPROTO_TCP) { in get_tcp_info()
129 pkti->is_tcp = (iph.protocol == 6); in hbm_get_pkt_info()
Dsock_example.c49 BPF_LD_ABS(BPF_B, ETH_HLEN + offsetof(struct iphdr, protocol) /* R0 = ip->proto */), in test_sock()
Dtest_lwt_bpf.c48 skb->protocol); in do_test_ctx()
87 #define IP_PROTO_OFF offsetof(struct iphdr, protocol)
Dxdp1_kern.c30 return iph->protocol; in parse_ipv4()
Dxdp_tx_iptunnel_user.c173 vip.protocol = IPPROTO_TCP; in main()
199 vip.protocol = atoi(optarg); in main()
Dxdp2_kern.c46 return iph->protocol; in parse_ipv4()
Dtcbpf1_kern.c57 __u8 proto = load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)); in bpf_prog1()
Dxdp_fwd_kern.c73 fib_params.l4_protocol = iph->protocol; in xdp_fwd_flags()
Dxdp_adjust_tail_kern.c104 iph->protocol = IPPROTO_ICMP; in send_icmp4_too_big()
Dxdp_redirect_cpu_kern.c165 if (!(iph->protocol == IPPROTO_UDP)) in get_dest_port_ipv4_udp()
185 return iph->protocol; in get_proto_ipv4()
480 cpu_hash = SuperFastHash((char *)&cpu_hash, 4, INITVAL + iph->protocol); in get_ipv4_hash_ip_pair()
Dxdp_router_ipv4_kern.c105 return iph->protocol; in parse_ipv4()
Dsockex2_kern.c69 *ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in parse_ip()
Dtc_l2_redirect_kern.c83 if (iph->protocol != IPPROTO_IPIP) in _l2_to_iptun_ingress_forward()
Dsockex3_kern.c202 ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in PROG()