Searched refs:iph (Results 1 – 6 of 6) sorted by relevance
/tools/testing/selftests/bpf/ |
D | test_xdp.c | 87 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 …]
|
D | test_pkt_access.c | 37 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()
|
D | test_l4lb.c | 262 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 …]
|
D | test_progs.c | 43 struct iphdr iph; member 47 .iph.ihl = 5, 48 .iph.protocol = 6, 49 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 56 struct ipv6hdr iph; member 60 .iph.nexthdr = 6, 61 .iph.payload_len = __bpf_constant_htons(MAGIC_BYTES), 129 struct iphdr *iph = (void *)buf + sizeof(struct ethhdr); in test_xdp() local 149 iph->protocol != IPPROTO_IPIP, "ipv4", in test_xdp()
|
/tools/testing/selftests/net/ |
D | msg_zerocopy.c | 225 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 …]
|
/tools/testing/selftests/networking/timestamping/ |
D | txtimestamp.c | 341 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()
|