/packages/modules/Connectivity/bpf_progs/ |
D | clatd.c | 96 if (ntohs(ip6->payload_len) > 0xFFFF - sizeof(struct iphdr)) return TC_ACT_PIPE; in nat64() 116 __u16 tot_len = ntohs(ip6->payload_len) + sizeof(struct iphdr); // cannot overflow, see above in nat64() 139 if (tot_len < sizeof(struct iphdr)) return TC_ACT_PIPE; in nat64() 164 struct iphdr ip = { in nat64() 166 .ihl = sizeof(struct iphdr) / sizeof(__u32), // u4 in nat64() 245 try_make_writable(skb, l2_header_size + sizeof(struct iphdr)); in nat64() 253 if (data + l2_header_size + sizeof(struct iphdr) > data_end) return TC_ACT_SHOT; in nat64() 262 *(struct iphdr*)(new_eth + 1) = ip; in nat64() 265 *(struct iphdr*)data = ip; in nat64() 307 try_make_writable(skb, sizeof(struct iphdr)); [all …]
|
D | test.c | 64 struct iphdr *ip = data + hsize; 65 hsize += sizeof(struct iphdr);
|
D | test@mainline.c | 64 struct iphdr *ip = data + hsize; 65 hsize += sizeof(struct iphdr);
|
D | dscpPolicy.c | 37 #define IP4_OFFSET(field, header) ((header) + offsetof(struct iphdr, field)) 68 const struct iphdr* const iph = (void*)(eth + 1); in DEFINE_BPF_MAP_GRW() 69 hdr_size = l2_header_size + sizeof(struct iphdr); in DEFINE_BPF_MAP_GRW()
|
D | offload.c | 59 #define IP4_HLEN sizeof(struct iphdr) 69 #define IP4_OFFSET(field) offsetof(struct iphdr, field) 364 struct ethhdr* eth, struct iphdr* ip, const struct rawip_bool rawip, in do_forward4_bottom() 456 const int tcp4_overhead = sizeof(struct iphdr) + sizeof(struct tcphdr) + 12; in do_forward4_bottom() 580 struct iphdr* ip = is_ethernet ? (void*)(eth + 1) : data; in do_forward4()
|
D | offload@mainline.c | 59 #define IP4_HLEN sizeof(struct iphdr) 69 #define IP4_OFFSET(field) offsetof(struct iphdr, field) 364 struct ethhdr* eth, struct iphdr* ip, const struct rawip_bool rawip, in do_forward4_bottom() 456 const int tcp4_overhead = sizeof(struct iphdr) + sizeof(struct tcphdr) + 12; in do_forward4_bottom() 580 struct iphdr* ip = is_ethernet ? (void*)(eth + 1) : data; in do_forward4()
|
D | bpf_net_helpers.h | 33 #define IP4_OFFSET(field) offsetof(struct iphdr, field)
|
D | netd.c | 200 int ip_overhead = (is_ipv6 ? sizeof(struct ipv6hdr) : sizeof(struct iphdr)); \ in DEFINE_BPF_MAP_RO_NETD()
|
/packages/modules/Connectivity/clatd/ |
D | translate.h | 47 void fill_ip_header(struct iphdr *ip_targ, uint16_t payload_len, uint8_t protocol, 50 const struct iphdr *old_header); 61 const struct iphdr *old_header); 62 uint8_t parse_frag_header(const struct ip6_frag *frag_hdr, struct iphdr *ip_targ); 66 const struct iphdr *old_header); 67 uint8_t parse_frag_header(const struct ip6_frag *frag_hdr, struct iphdr *ip_targ);
|
D | clatd_test.cpp | 187 int is_ipv4_fragment(struct iphdr *ip) { in is_ipv4_fragment() 201 int ipv4_fragment_offset(struct iphdr *ip) { in ipv4_fragment_offset() 217 struct iphdr *ip = (struct iphdr *)packet; in check_packet() 296 struct iphdr *ip = nullptr; in reassemble_packet() 312 struct iphdr *ip_orig = (struct iphdr *)packet; in reassemble_packet() 322 ip = (struct iphdr *)reassembled; in reassemble_packet() 409 struct iphdr *ip = (struct iphdr *)packet; in fix_udp_checksum() 525 struct iphdr *ip; in get_transport_checksum() 533 ip = (struct iphdr *)packet; in get_transport_checksum() 613 ASSERT_EQ(sizeof(struct iphdr), sizeof(v4_header)) << "Test IPv4 header: incorrect length\n"; in TEST_F() [all …]
|
D | dump.h | 29 void dump_ip(struct iphdr *header); 31 void dump_udp(const struct udphdr *udp, const struct iphdr *ip, const uint8_t *payload, 33 void dump_tcp(const struct tcphdr *tcp, const struct iphdr *ip, const uint8_t *payload,
|
D | translate.c | 124 void fill_ip_header(struct iphdr *ip, uint16_t payload_len, uint8_t protocol, in fill_ip_header() 127 memset(ip, 0, sizeof(struct iphdr)); in fill_ip_header() 132 ip->tot_len = htons(sizeof(struct iphdr) + payload_len); in fill_ip_header() 159 const struct iphdr *old_header) { in fill_ip6_header() 180 const struct iphdr *old_header) { in maybe_fill_frag_header() 208 uint8_t parse_frag_header(const struct ip6_frag *frag_hdr, struct iphdr *ip_targ) { in parse_frag_header() 497 char iphdr[sizeof(struct ip6_hdr)]; in translate_packet() local 507 { iphdr, 0 }, // IP header. in translate_packet()
|
D | ipv6.c | 79 struct iphdr *ip_targ = (struct iphdr *)out[pos].iov_base; in ipv6_packet() 122 out[pos].iov_len = sizeof(struct iphdr); in ipv6_packet() 176 ip_targ->check = ip_checksum(ip_targ, sizeof(struct iphdr)); in ipv6_packet()
|
D | ipv4.c | 58 const struct iphdr *header = (struct iphdr *)packet; in ipv4_packet() 68 if (len < sizeof(struct iphdr)) { in ipv4_packet()
|
D | dump.c | 42 void dump_ip(struct iphdr *header) { in dump_ip() 151 void dump_udp(const struct udphdr *udp, const struct iphdr *ip, const uint8_t *payload, in dump_udp() 209 void dump_tcp(const struct tcphdr *tcp, const struct iphdr *ip, const uint8_t *payload, in dump_tcp()
|
/packages/modules/Connectivity/staticlibs/native/bpf_headers/include/bpf/ |
D | BpfClassic.h | 95 _Static_assert(field_sizeof(struct iphdr, field) == 1, "field of wrong size"); \ 96 offsetof(iphdr, field); \ 102 _Static_assert(field_sizeof(struct iphdr, field) == 2, "field of wrong size"); \ 103 offsetof(iphdr, field); \ 109 _Static_assert(field_sizeof(struct iphdr, field) == 4, "field of wrong size"); \ 110 offsetof(iphdr, field); \
|
/packages/modules/DnsResolver/tests/ |
D | tun_forwarder.cpp | 47 static constexpr ssize_t IP4_HDRLEN = sizeof(struct iphdr); 245 const iphdr* const ipHeader = reinterpret_cast<iphdr*>(ipv4Packet.base()); in validateIpv4Packet() 327 iphdr* ipHeader = reinterpret_cast<iphdr*>(ipv4Packet.base()); in translateIpv4Packet() 343 ipHeader->check = ip_checksum(ipHeader, sizeof(struct iphdr)); in translateIpv4Packet()
|
/packages/modules/Connectivity/staticlibs/native/ip_checksum/ |
D | checksum.h | 27 uint32_t ipv4_pseudo_header_checksum(const struct iphdr* ip, uint16_t len);
|
D | checksum.c | 100 uint32_t ipv4_pseudo_header_checksum(const struct iphdr* ip, uint16_t len) { in ipv4_pseudo_header_checksum()
|