Lines Matching defs:sizeof

29 	(offsetof(TYPE, MEMBER) + sizeof((((TYPE *)0)->MEMBER)))
87 sizeof(flow_ports_t) !=
92 sizeof(flow_ports_t) !=
127 if (bpf_dynptr_read(iphdr, sizeof(*iphdr), dynptr, *offset, 0))
130 *offset += sizeof(*iphdr);
144 if (bpf_dynptr_read(ports, sizeof(*ports), dynptr, *offset, 0))
147 *offset += sizeof(*ports);
177 _Static_assert(sizeof(struct iphdr) == 20, "iphdr must be 20 bytes");
181 for (size_t i = 0; i < sizeof(struct iphdr) / 2; i++)
215 if (bpf_dynptr_read(&exthdr, sizeof(exthdr), dynptr, *offset, 0))
247 if (bpf_dynptr_read(ipv6, sizeof(*ipv6), dynptr, *offset, 0))
250 *offset += sizeof(*ipv6);
276 sizeof(*encap) +
277 sizeof(struct in_addr) * encap->unigue.hop_count;
278 int32_t encap_overhead = payload_off - sizeof(struct ethhdr);
298 sizeof(*encap) +
299 sizeof(struct in_addr) * encap->unigue.hop_count;
301 payload_off - sizeof(struct ethhdr) - sizeof(struct iphdr);
302 int32_t delta = sizeof(struct gre_base_hdr) - encap_overhead;
303 __u8 encap_buffer[sizeof(encap_gre_t)] = {};
394 if (bpf_skb_pull_data(skb, sizeof(encap_gre_t))) {
399 encap_gre = bpf_dynptr_slice_rdwr(dynptr, 0, encap_buffer, sizeof(encap_buffer));
415 bpf_dynptr_write(dynptr, 0, encap_buffer, sizeof(encap_buffer), 0);
430 memcpy(temp, encap->eth.h_dest, sizeof(temp));
432 sizeof(encap->eth.h_dest));
433 memcpy(encap->eth.h_source, temp, sizeof(encap->eth.h_source));
462 *offset += sizeof(struct in_addr);
492 if (bpf_dynptr_read(next_hop, sizeof(*next_hop), dynptr, *offset, 0))
495 *offset += sizeof(*next_hop);
504 * fill_tuple(&t, foo, sizeof(struct iphdr), 123, 321)
506 * clang will substitue a costant for sizeof, which allows the verifier
515 case sizeof(struct iphdr): {
521 return sizeof(tuple->ipv4);
524 case sizeof(struct ipv6hdr): {
527 sizeof(tuple->ipv6.daddr));
529 sizeof(tuple->ipv6.saddr));
532 return sizeof(tuple->ipv6);
556 uint64_t iphlen = sizeof(struct iphdr);
558 if (tuplen == sizeof(tuple->ipv6))
559 iphlen = sizeof(struct ipv6hdr);
562 sizeof(*tcp)) == 0) {
611 if (bpf_dynptr_read(&icmp, sizeof(icmp), dynptr, *offset, 0)) {
616 *offset += sizeof(icmp);
651 sizeof(tuple.ipv4), metrics);
663 if (bpf_dynptr_read(&icmp6, sizeof(icmp6), dynptr, *offset, 0)) {
694 memcpy(&tuple.ipv6.saddr, &ipv6.daddr, sizeof(tuple.ipv6.saddr));
695 memcpy(&tuple.ipv6.daddr, &ipv6.saddr, sizeof(tuple.ipv6.daddr));
702 return classify_icmp(skb, l4_proto, &tuple, sizeof(tuple.ipv6),
715 if (bpf_dynptr_read(&tcp, sizeof(tcp), dynptr, *offset, 0)) {
720 *offset += sizeof(tcp);
738 if (bpf_dynptr_read(&udph, sizeof(udph), dynptr, *offset, 0)) {
742 *offset += sizeof(udph);
754 .len = sizeof(ipv4),
796 .len = sizeof(ipv6),
837 __u8 encap_buffer[sizeof(encap_headers_t)] = {};
865 if (bpf_skb_pull_data(skb, sizeof(*encap)))
868 encap = bpf_dynptr_slice_rdwr(&dynptr, 0, encap_buffer, sizeof(encap_buffer));
872 off += sizeof(*encap);
910 sizeof(encap->unigue) / 4 + encap->unigue.hop_count) {
978 bpf_dynptr_write(&dynptr, 0, encap_buffer, sizeof(encap_buffer), 0);