/samples/bpf/ |
D | parse_ldabs.c | 22 return load_half(ctx, nhoff + offsetof(struct iphdr, frag_off)) in ip_is_fragment() 31 if (load_half(skb, offsetof(struct ethhdr, h_proto)) != ETH_P_IP) in handle_ingress() 33 if (load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)) != IPPROTO_UDP || in handle_ingress() 38 if (load_half(skb, troff + offsetof(struct udphdr, dest)) == DEFAULT_PKTGEN_UDP_PORT) in handle_ingress()
|
D | sockex2_kern.c | 47 return load_half(ctx, nhoff + offsetof(struct iphdr, frag_off)) in ip_is_fragment() 69 *ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in parse_ip() 72 flow->src = load_word(skb, nhoff + offsetof(struct iphdr, saddr)); in parse_ip() 73 flow->dst = load_word(skb, nhoff + offsetof(struct iphdr, daddr)); in parse_ip() 89 nhoff + offsetof(struct ipv6hdr, nexthdr)); in parse_ipv6() 91 nhoff + offsetof(struct ipv6hdr, saddr)); in parse_ipv6() 93 nhoff + offsetof(struct ipv6hdr, daddr)); in parse_ipv6() 108 proto = load_half(skb, nhoff + offsetof(struct vlan_hdr, in flow_dissector() 114 proto = load_half(skb, nhoff + offsetof(struct vlan_hdr, in flow_dissector() 134 nhoff + offsetof(struct gre_hdr, flags)); in flow_dissector() [all …]
|
D | tcbpf1_kern.c | 20 #define IP_CSUM_OFF (ETH_HLEN + offsetof(struct iphdr, check)) 21 #define TOS_OFF (ETH_HLEN + offsetof(struct iphdr, tos)) 31 #define TCP_CSUM_OFF (ETH_HLEN + sizeof(struct iphdr) + offsetof(struct tcphdr, check)) 32 #define IP_SRC_OFF (ETH_HLEN + offsetof(struct iphdr, saddr)) 45 #define TCP_DPORT_OFF (ETH_HLEN + sizeof(struct iphdr) + offsetof(struct tcphdr, dest)) 57 __u8 proto = load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)); in bpf_prog1()
|
D | sockex3_kern.c | 76 return load_half(ctx, nhoff + offsetof(struct iphdr, frag_off)) in ip_is_fragment() 152 nhoff + offsetof(struct gre_hdr, flags)); in parse_ip_proto() 154 nhoff + offsetof(struct gre_hdr, proto)); in parse_ip_proto() 202 ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in PROG() 205 g->flow.src = load_word(skb, nhoff + offsetof(struct iphdr, saddr)); in PROG() 206 g->flow.dst = load_word(skb, nhoff + offsetof(struct iphdr, daddr)); in PROG() 228 nhoff + offsetof(struct ipv6hdr, nexthdr)); in PROG() 230 nhoff + offsetof(struct ipv6hdr, saddr)); in PROG() 232 nhoff + offsetof(struct ipv6hdr, daddr)); in PROG() 246 proto = load_half(skb, nhoff + offsetof(struct vlan_hdr, in PROG()
|
D | cookie_uid_helper_example.c | 33 #define offsetof(type, member) __builtin_offsetof(type, member) macro 119 -32 + (__s16)offsetof(struct stats, uid)), in prog_load() 121 -32 + (__s16)offsetof(struct stats, packets), 1), in prog_load() 127 offsetof(struct __sk_buff, len)), in prog_load() 129 -32 + (__s16)offsetof(struct stats, bytes)), in prog_load() 151 offsetof(struct stats, packets)), in prog_load() 153 offsetof(struct __sk_buff, len)), in prog_load() 155 offsetof(struct stats, bytes)), in prog_load() 157 offsetof(struct __sk_buff, len)), in prog_load()
|
D | test_lwt_bpf.c | 84 #define IP_CSUM_OFF offsetof(struct iphdr, check) 85 #define IP_DST_OFF offsetof(struct iphdr, daddr) 86 #define IP_SRC_OFF offsetof(struct iphdr, saddr) 87 #define IP_PROTO_OFF offsetof(struct iphdr, protocol) 88 #define TCP_CSUM_OFF offsetof(struct tcphdr, check) 89 #define UDP_CSUM_OFF offsetof(struct udphdr, check) 115 off = offsetof(struct icmp6hdr, icmp6_cksum); in rewrite()
|
D | test_cgrp2_sock.c | 44 BPF_MOV64_IMM(BPF_REG_2, offsetof(struct bpf_sock, bound_dev_if)), in prog_load() 45 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_3, offsetof(struct bpf_sock, bound_dev_if)), in prog_load() 62 BPF_MOV64_IMM(BPF_REG_2, offsetof(struct bpf_sock, mark)), in prog_load() 63 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_3, offsetof(struct bpf_sock, mark)), in prog_load() 70 BPF_MOV64_IMM(BPF_REG_2, offsetof(struct bpf_sock, priority)), in prog_load() 71 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_3, offsetof(struct bpf_sock, priority)), in prog_load()
|
D | sockex1_kern.c | 17 int index = load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)); in bpf_prog1()
|
D | sock_example.c | 49 BPF_LD_ABS(BPF_B, ETH_HLEN + offsetof(struct iphdr, protocol) /* R0 = ip->proto */), in test_sock()
|
D | test_lru_dist.c | 25 #ifndef offsetof 26 # define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER) macro 30 (type *)( (char *)__mptr - offsetof(type,member) );})
|
D | test_cgrp2_attach.c | 66 BPF_LDX_MEM(BPF_W, BPF_REG_1, BPF_REG_6, offsetof(struct __sk_buff, len)), /* r1 = skb->len */ in prog_load()
|
/samples/qmi/ |
D | qmi_sample_client.c | 52 .offset = offsetof(struct test_name_type_v01, 61 .offset = offsetof(struct test_name_type_v01, 81 .offset = offsetof(struct test_ping_req_msg_v01, 90 .offset = offsetof(struct test_ping_req_msg_v01, 99 .offset = offsetof(struct test_ping_req_msg_v01, 123 .offset = offsetof(struct test_ping_resp_msg_v01, 133 .offset = offsetof(struct test_ping_resp_msg_v01, 142 .offset = offsetof(struct test_ping_resp_msg_v01, 151 .offset = offsetof(struct test_ping_resp_msg_v01, 160 .offset = offsetof(struct test_ping_resp_msg_v01, [all …]
|
/samples/seccomp/ |
D | dropper.c | 32 (offsetof(struct seccomp_data, arch))), in install_filter() 35 (offsetof(struct seccomp_data, nr))), in install_filter()
|
D | bpf-helper.h | 66 #define LO_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) 68 #define LO_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) + sizeof(__u32) 90 #define HI_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) + sizeof(__u32) 93 #define HI_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) 261 offsetof(struct seccomp_data, nr))
|
D | bpf-direct.c | 31 #define syscall_arg(_n) (offsetof(struct seccomp_data, args[_n])) 32 #define syscall_nr (offsetof(struct seccomp_data, nr))
|
D | user-trap.c | 90 offsetof(struct seccomp_data, nr)), in user_trap_syscall()
|
/samples/vfio-mdev/ |
D | mbochs.c | 414 case offsetof(struct vfio_region_gfx_edid, link_state): in handle_edid_regs() 415 case offsetof(struct vfio_region_gfx_edid, edid_size): in handle_edid_regs() 1060 ext->base.cap_offset = offsetof(typeof(*ext), type); in mbochs_get_region_info()
|