Home
last modified time | relevance | path

Searched refs:ip4 (Results 1 – 2 of 2) sorted by relevance

/system/netd/bpf_progs/
Dclatd.c200 const struct iphdr* const ip4 = data; in sched_cls_egress_clat_rawip() local
206 if (data + sizeof(*ip4) > data_end) return TC_ACT_OK; in sched_cls_egress_clat_rawip()
209 if (ip4->version != 4) return TC_ACT_OK; in sched_cls_egress_clat_rawip()
212 if (ip4->ihl != 5) return TC_ACT_OK; in sched_cls_egress_clat_rawip()
216 for (int i = 0; i < sizeof(*ip4) / sizeof(__u16); ++i) { in sched_cls_egress_clat_rawip()
217 sum4 += ((__u16*)ip4)[i]; in sched_cls_egress_clat_rawip()
226 if (ntohs(ip4->tot_len) < sizeof(*ip4)) return TC_ACT_OK; in sched_cls_egress_clat_rawip()
229 if (ip4->frag_off & ~htons(IP_DF)) return TC_ACT_OK; in sched_cls_egress_clat_rawip()
231 switch (ip4->protocol) { in sched_cls_egress_clat_rawip()
238 if (data + sizeof(*ip4) + sizeof(struct udphdr) > data_end) return TC_ACT_OK; in sched_cls_egress_clat_rawip()
[all …]
/system/netd/tests/
Dtun_interface.cpp149 in_addr ip4; in addAddress() member
158 inet_pton(AF_INET, addr.c_str(), &ip.ip4); in addAddress()
159 addrlen = sizeof(ip.ip4); in addAddress()