Home
last modified time | relevance | path

Searched refs:iph (Results 1 – 22 of 22) sorted by relevance

/external/iproute2/ip/
Diptunnel.c52 if (p->iph.protocol && p->iph.protocol != proto) { in set_tunnel_proto()
57 p->iph.protocol = proto; in set_tunnel_proto()
67 p->iph.version = 4; in parse_args()
68 p->iph.ihl = 5; in parse_args()
72 p->iph.frag_off = htons(IP_DF); in parse_args()
125 p->iph.frag_off = 0; in parse_args()
127 p->iph.frag_off = htons(IP_DF); in parse_args()
131 p->iph.daddr = get_addr32(*argv); in parse_args()
133 p->iph.daddr = htonl(INADDR_ANY); in parse_args()
137 p->iph.saddr = get_addr32(*argv); in parse_args()
[all …]
/external/linux-kselftest/tools/testing/selftests/bpf/
Dtest_xdp.c87 struct iphdr *iph = data + sizeof(struct ethhdr); in handle_ipv4() local
95 if (iph + 1 > data_end) in handle_ipv4()
98 dport = get_dport(iph + 1, data_end, iph->protocol); in handle_ipv4()
102 vip.protocol = iph->protocol; in handle_ipv4()
104 vip.daddr.v4 = iph->daddr; in handle_ipv4()
106 payload_len = bpf_ntohs(iph->tot_len); in handle_ipv4()
120 iph = data + sizeof(*new_eth); in handle_ipv4()
121 old_eth = data + sizeof(*iph); in handle_ipv4()
125 iph + 1 > data_end) in handle_ipv4()
130 iph->version = 4; in handle_ipv4()
[all …]
Dtest_l4lb.c262 struct iphdr *iph; in parse_icmp() local
271 iph = data + off; in parse_icmp()
272 if (iph + 1 > data_end) in parse_icmp()
274 if (iph->ihl != 5) in parse_icmp()
276 pckt->proto = iph->protocol; in parse_icmp()
278 pckt->src = iph->daddr; in parse_icmp()
279 pckt->dst = iph->saddr; in parse_icmp()
339 struct iphdr *iph; in process_packet() local
371 iph = data + off; in process_packet()
372 if (iph + 1 > data_end) in process_packet()
[all …]
Dtest_pkt_access.c37 struct iphdr *iph = (struct iphdr *)(eth + 1); in process() local
39 if (iph + 1 > data_end) in process()
41 ihl_len = iph->ihl * 4; in process()
42 proto = iph->protocol; in process()
43 tcp = (struct tcphdr *)((void *)(iph) + ihl_len); in process()
Dtest_progs.c46 struct iphdr iph; member
50 .iph.ihl = 5,
51 .iph.protocol = 6,
52 .iph.tot_len = bpf_htons(MAGIC_BYTES),
59 struct ipv6hdr iph; member
63 .iph.nexthdr = 6,
64 .iph.payload_len = bpf_htons(MAGIC_BYTES),
132 struct iphdr *iph = (void *)buf + sizeof(struct ethhdr); in test_xdp() local
152 iph->protocol != IPPROTO_IPIP, "ipv4", in test_xdp()
/external/wpa_supplicant_8/src/ap/
Dfils_hlp.c161 struct iphdr *iph; in fils_dhcp_handler() local
254 sizeof(*iph) + sizeof(*udph) + (end - pos) + 2); in fils_dhcp_handler()
261 iph = wpabuf_put(resp, sizeof(*iph)); in fils_dhcp_handler()
262 iph->version = 4; in fils_dhcp_handler()
263 iph->ihl = sizeof(*iph) / 4; in fils_dhcp_handler()
264 iph->tot_len = htons(sizeof(*iph) + sizeof(*udph) + (end - pos)); in fils_dhcp_handler()
265 iph->ttl = 1; in fils_dhcp_handler()
266 iph->protocol = 17; /* UDP */ in fils_dhcp_handler()
267 iph->saddr = hapd->conf->dhcp_server.u.v4.s_addr; in fils_dhcp_handler()
268 iph->daddr = dhcp->client_ip; in fils_dhcp_handler()
[all …]
Ddhcp_snoop.c49 tot_len = ntohs(b->iph.tot_len); in handle_dhcp()
/external/linux-kselftest/tools/testing/selftests/net/
Dmsg_zerocopy.c225 static int setup_iph(struct iphdr *iph, uint16_t payload_len) in setup_iph() argument
230 memset(iph, 0, sizeof(*iph)); in setup_iph()
232 iph->version = 4; in setup_iph()
233 iph->tos = 0; in setup_iph()
234 iph->ihl = 5; in setup_iph()
235 iph->ttl = 2; in setup_iph()
236 iph->saddr = saddr->sin_addr.s_addr; in setup_iph()
237 iph->daddr = daddr->sin_addr.s_addr; in setup_iph()
238 iph->protocol = IPPROTO_EGP; in setup_iph()
239 iph->tot_len = htons(sizeof(*iph) + payload_len); in setup_iph()
[all …]
/external/iputils/Modules/
Dpg3.c245 struct iphdr *iph; in fill_packet() local
257 iph = (struct iphdr*)skb_put(skb, sizeof( struct iphdr)); in fill_packet()
272 iph->ihl=5; in fill_packet()
273 iph->version=4; in fill_packet()
274 iph->ttl=3; in fill_packet()
275 iph->tos=0; in fill_packet()
276 iph->protocol = IPPROTO_UDP; /* UDP */ in fill_packet()
277 iph->saddr = saddr; in fill_packet()
278 iph->daddr = in_aton(pg_dst); in fill_packet()
279 iph->frag_off = 0; in fill_packet()
[all …]
/external/toybox/toys/pending/
Ddhcp.c169 struct iphdr iph; member
661 if (bytes < (int) (sizeof(packet.iph) + sizeof(packet.udph))) { in read_raw()
665 if (bytes < ntohs(packet.iph.tot_len)) { in read_raw()
670 bytes = ntohs(packet.iph.tot_len); in read_raw()
672 if (packet.iph.protocol != IPPROTO_UDP || packet.iph.version != IPVERSION in read_raw()
673 || packet.iph.ihl != (sizeof(packet.iph) >> 2) in read_raw()
675 || ntohs(packet.udph.len) != (uint16_t)(bytes - sizeof(packet.iph))) { in read_raw()
680 check = packet.iph.check; in read_raw()
681 packet.iph.check = 0; in read_raw()
682 if (check != dhcp_checksum(&packet.iph, sizeof(packet.iph))) { in read_raw()
[all …]
Dip.c2348 printf("%s: %s/ip", ptnl->name, ptnl->iph.protocol == IPPROTO_IPIP ? "ip" : in display_tunnel()
2349 (ptnl->iph.protocol == IPPROTO_GRE ? "gre" : in display_tunnel()
2350 (ptnl->iph.protocol == IPPROTO_IPV6 ? "ipv6" : "unknown"))); in display_tunnel()
2351 printf(" remote %s local %s ", ptnl->iph.daddr ? in display_tunnel()
2352 inet_ntop(AF_INET, &ptnl->iph.daddr, rmt_addr, sizeof(rmt_addr)) : "any", in display_tunnel()
2353 ptnl->iph.saddr ? inet_ntop(AF_INET, &ptnl->iph.saddr, lcl_addr, in display_tunnel()
2365 if (ptnl->iph.ttl) printf(" ttl %d ", ptnl->iph.ttl); in display_tunnel()
2368 if (ptnl->iph.tos) { in display_tunnel()
2370 if (ptnl->iph.tos & 1) printf(" inherit"); in display_tunnel()
2371 if (ptnl->iph.tos & ~1) printf("%c%s ", ptnl->iph.tos & 1 ? '/' : ' ', in display_tunnel()
[all …]
Ddhcpd.c163 struct iphdr iph; member
169 struct ip6_hdr iph; member
881 memcpy(&packet.iph.ip6_src, &gconfig.server_nip6, sizeof(uint32_t)*4); in send_packet6()
882 memcpy(&packet.iph.ip6_dst, &gstate.client_nip6, sizeof(uint32_t)*4); in send_packet6()
887 packet.iph.ip6_ctlun.ip6_un1.ip6_un1_plen = htons(ntohs(packet.udph.len) + 0x11); in send_packet6()
889 packet.iph.ip6_ctlun.ip6_un1.ip6_un1_flow = htonl(0x60000000); in send_packet6()
890 packet.iph.ip6_ctlun.ip6_un1.ip6_un1_plen = packet.udph.len; in send_packet6()
891 packet.iph.ip6_ctlun.ip6_un1.ip6_un1_nxt = IPPROTO_UDP; in send_packet6()
892 packet.iph.ip6_ctlun.ip6_un1.ip6_un1_hlim = 0x64; in send_packet6()
932 packet.iph.protocol = IPPROTO_UDP; in send_packet()
[all …]
Ddhcp6.c113 struct ip6_hdr iph; member
/external/valgrind/coregrind/m_ume/
Delf.c663 ESZ(Phdr) *iph = &interp->p[j]; in VG_()
667 if (iph->p_type == PT_SUNWDTRACE) { in VG_()
668 if (iph->p_memsz < PT_SUNWDTRACE_SIZE) { in VG_()
672 if ((iph->p_flags & (PF_R | PF_W | PF_X)) in VG_()
681 thrptr_addr = iph->p_vaddr; in VG_()
686 if ((iph->p_type >= PT_LOPROC) && (iph->p_type <= PT_HIPROC)) { in VG_()
687 retval = arch_elf_pt_proc(&interp->e, iph, intfd, True, in VG_()
694 if (iph->p_type != PT_LOAD || iph->p_memsz == 0) in VG_()
698 interp_addr = iph->p_vaddr; in VG_()
704 end = (iph->p_vaddr - interp_addr) + iph->p_memsz; in VG_()
/external/linux-kselftest/tools/testing/selftests/networking/timestamping/
Dtxtimestamp.c341 struct iphdr *iph = (void *) buf; in do_test() local
343 memset(iph, 0, sizeof(*iph)); in do_test()
344 iph->ihl = 5; in do_test()
345 iph->version = 4; in do_test()
346 iph->ttl = 2; in do_test()
347 iph->daddr = daddr.sin_addr.s_addr; in do_test()
348 iph->protocol = IPPROTO_UDP; in do_test()
351 off = sizeof(*iph); in do_test()
/external/honggfuzz/examples/linux_kernel_ip/
Dlinux-kernel-4.10.0.patch66 iph = ip_hdr(skb);
68 +if (iph->ihl == 0) {
69 if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl)))
73 len = ntohs(iph->tot_len);
/external/iptables/utils/
Dnfsynproxy.c29 const struct iphdr *iph = (void *)data + 14; in parse_packet() local
30 const struct tcphdr *th = (void *)iph + iph->ihl * 4; in parse_packet()
/external/iputils/
Dping.c856 struct iphdr * iph = (struct iphdr *)(&icp[1]); in parse_reply() local
857 struct icmphdr *icp1 = (struct icmphdr*)((unsigned char *)iph + iph->ihl*4); in parse_reply()
860 cc < 8+iph->ihl*4+8) in parse_reply()
863 iph->daddr != whereto.sin_addr.s_addr || in parse_reply()
/external/libnl/include/linux-private/linux/
Dif_tunnel.h37 struct iphdr iph; member
/external/kernel-headers/original/uapi/linux/
Dif_tunnel.h55 struct iphdr iph; member
/external/iproute2/include/uapi/linux/
Dif_tunnel.h55 struct iphdr iph; member
/external/wpa_supplicant_8/src/common/
Ddhcp.h42 struct iphdr iph; member