Home
last modified time | relevance | path

Searched refs:iphdr (Results 1 - 25 of 41) sorted by relevance

12

/third_party/lwip/src/core/ipv4/
H A Dip4.c310 * @param iphdr the IP header of the input packet
314 ip4_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp) argument
352 IPH_TTL_SET(iphdr, IPH_TTL(iphdr) - 1);
354 if (IPH_TTL(iphdr) == 0) {
358 if (IPH_PROTO(iphdr) != IP_PROTO_ICMP) {
366 if (IPH_CHKSUM(iphdr) >= PP_HTONS(0xffffU - 0x100)) {
367 IPH_CHKSUM_SET(iphdr, (u16_t)(IPH_CHKSUM(iphdr) + PP_HTONS(0x100) + 1));
369 IPH_CHKSUM_SET(iphdr, (u16_
461 const struct ip_hdr *iphdr; global() local
886 struct ip_hdr *iphdr; global() local
1141 struct ip_hdr *iphdr = (struct ip_hdr *)p->payload; global() local
[all...]
H A Dicmp.c212 struct ip_hdr *iphdr = (struct ip_hdr *)p->payload; in icmp_input() local
213 ip4_addr_copy(iphdr->src, *src); in icmp_input()
214 ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); in icmp_input()
235 IPH_TTL_SET(iphdr, ICMP_TTL); in icmp_input()
236 IPH_CHKSUM_SET(iphdr, 0); in icmp_input()
239 IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, hlen)); in icmp_input()
343 struct ip_hdr *iphdr; in icmp_send_response() local
369 iphdr = (struct ip_hdr *)p->payload; in icmp_send_response()
371 ip4_addr_debug_print_val(ICMP_DEBUG, iphdr in icmp_send_response()
[all...]
H A Dip4_frag.c185 SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); in ip_reass_free_complete_datagram()
265 if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) { in ip_reass_remove_oldest_datagram()
328 SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN); in ip_reass_enqueue_new_datagram()
578 if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) { in ip4_reass()
595 ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { in ip4_reass()
596 /* ipr->iphdr is not the header from the first fragment, but fraghdr is in ip4_reass()
597 * -> copy fraghdr into ipr->iphdr since we want to have the header in ip4_reass()
600 SMEMCPY(&ipr->iphdr, fraghdr, IP_HLEN); in ip4_reass()
648 SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN); in ip4_reass()
769 struct ip_hdr *iphdr; in ip4_frag() local
[all...]
H A Detharp.c860 struct ip_hdr *iphdr = LWIP_ALIGNMENT_CAST(struct ip_hdr *, q->payload); local
865 if (!ip4_addr_islinklocal(&iphdr->src))
/third_party/lwip/test/unit/ip4/
H A Dtest_ip4.c29 struct ip_hdr *iphdr = (struct ip_hdr *)p->payload; in create_ip4_input_fragment() local
30 IPH_VHL_SET(iphdr, 4, sizeof(struct ip_hdr) / 4); in create_ip4_input_fragment()
31 IPH_TOS_SET(iphdr, 0); in create_ip4_input_fragment()
32 IPH_LEN_SET(iphdr, lwip_htons(p->tot_len)); in create_ip4_input_fragment()
33 IPH_ID_SET(iphdr, lwip_htons(ip_id)); in create_ip4_input_fragment()
35 IPH_OFFSET_SET(iphdr, lwip_htons(start / 8)); in create_ip4_input_fragment()
37 IPH_OFFSET_SET(iphdr, lwip_htons((start / 8) | IP_MF)); in create_ip4_input_fragment()
39 IPH_TTL_SET(iphdr, 5); in create_ip4_input_fragment()
40 IPH_PROTO_SET(iphdr, IP_PROTO_UDP); in create_ip4_input_fragment()
41 IPH_CHKSUM_SET(iphdr, in create_ip4_input_fragment()
[all...]
/third_party/lwip/test/unit/tcp/
H A Dtcp_helper.c52 struct ip_hdr* iphdr; in tcp_create_segment_wnd() local
70 iphdr = (struct ip_hdr*)p->payload; in tcp_create_segment_wnd()
72 iphdr->dest.addr = ip_2_ip4(dst_ip)->addr; in tcp_create_segment_wnd()
73 iphdr->src.addr = ip_2_ip4(src_ip)->addr; in tcp_create_segment_wnd()
74 IPH_VHL_SET(iphdr, 4, IP_HLEN / 4); in tcp_create_segment_wnd()
75 IPH_TOS_SET(iphdr, 0); in tcp_create_segment_wnd()
76 IPH_LEN_SET(iphdr, htons(p->tot_len)); in tcp_create_segment_wnd()
77 IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN)); in tcp_create_segment_wnd()
256 struct ip_hdr *iphdr in test_tcp_input() local
[all...]
/third_party/lwip/src/include/lwip/
H A Dip6_frag.h83 #define IPV6_FRAG_SRC(ipr) ((ipr)->iphdr->src)
84 #define IPV6_FRAG_DEST(ipr) ((ipr)->iphdr->dest)
93 struct ip6_hdr *iphdr; /* pointer to the first (original) IPv6 header */ member
H A Dip4_frag.h64 struct ip_hdr iphdr; member
/third_party/lwip/src/netif/ppp/
H A Ddemand.c325 unsigned iphdr; local
342 iphdr = (pkt->data[4] & 15) << 2;
350 pkt_checksum = *((unsigned short *) (pkt->data+10+iphdr));
363 pkt_checksum = *((unsigned short *) (pkt->data+20+iphdr));
393 *((unsigned short *) (pkt->data+20+iphdr)) = pkt_checksum;
396 *((unsigned short *) (pkt->data+10+iphdr)) = pkt_checksum;
409 ntohs(*( (short *) (pkt->data+iphdr+4))),
411 ntohs(*( (short *) (pkt->data+iphdr+6))));
/third_party/lwip/src/core/ipv6/
H A Dip6_frag.c188 if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)ipr->iphdr))) { in ip6_reass_free_complete_datagram()
385 ipr->iphdr = ip_data.current_ip6_header; in ip6_reass()
532 ipr->iphdr = ip_data.current_ip6_header; in ip6_reass()
629 MEMMOVE((u8_t*)ipr->iphdr + sizeof(struct ip6_frag_hdr), ipr->iphdr, in ip6_reass()
630 (size_t)((u8_t*)p->payload - (u8_t*)ipr->iphdr)); in ip6_reass()
633 iphdr_ptr = (struct ip6_hdr*)((u8_t*)ipr->iphdr + in ip6_reass()
H A Dip6.c414 * @param iphdr the IPv6 header of the input packet
418 ip6_forward(struct pbuf *p, struct ip6_hdr *iphdr, struct netif *inp) argument
445 if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) {
477 IP6H_HOPLIM_SET(iphdr, IP6H_HOPLIM(iphdr) - 1);
479 if (IP6H_HOPLIM(iphdr) == 0) {
482 if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) {
493 if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) {
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/ap/
H A Dfils_hlp.c161 struct iphdr *iph; in fils_dhcp_handler()
482 const struct iphdr *iph; in fils_process_hlp_udp()
488 iph = (const struct iphdr *) pos; in fils_process_hlp_udp()
513 const struct iphdr *iph; in fils_process_hlp_ip()
518 iph = (const struct iphdr *) pos; in fils_process_hlp_ip()
/third_party/ltp/testcases/network/stress/ns-tools/
H A Dns-icmpv4_sender.c359 pkt_size = sizeof(struct iphdr) /* IP header */ in create_clean_packet()
367 pkt.hdr.ihl = sizeof(struct iphdr) / 4; in create_clean_packet()
390 sizeof(struct iphdr)); in create_clean_packet()
523 calc_checksum((u_int16_t *) & (pkt->hdr), sizeof(struct iphdr)); in thrust_fakes()
H A Dns-icmp_redirector.c390 +sizeof(struct iphdr) /* IPv4 header */ in return_icmp4_redirect()
406 sndip_p->hdr.ihl = sizeof(struct iphdr) / 4; in return_icmp4_redirect()
417 sizeof(struct iphdr)); in return_icmp4_redirect()
H A Dns-traffic.h112 struct iphdr hdr;
/third_party/libbpf/src/
H A Dbpf_helper_defs.h44 struct iphdr;
2508 * *iph_len* contains **sizeof**\ (**struct iphdr**) or
2735 * *iph_len* contains **sizeof**\ (**struct iphdr**) or
4595 static __s64 (*bpf_tcp_raw_gen_syncookie_ipv4)(struct iphdr *iph, struct tcphdr *th, __u32 th_len) = (void *) 204;
4640 static long (*bpf_tcp_raw_check_syncookie_ipv4)(struct iphdr *iph, struct tcphdr *th) = (void *) 206;
/third_party/musl/porting/liteos_a/kernel/include/netinet/
H A Dip.h24 struct iphdr { struct
/third_party/musl/porting/liteos_m_iccarm/kernel/include/netinet/
H A Dip.h24 struct iphdr { struct
/third_party/musl/porting/uniproton/kernel/include/netinet/
H A Dip.h24 struct iphdr { struct
/third_party/musl/porting/liteos_m/kernel/include/netinet/
H A Dip.h24 struct iphdr { struct
/third_party/musl/include/netinet/
H A Dip.h24 struct iphdr { struct
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/common/
H A Ddhcp.h42 struct iphdr iph;
/third_party/ltp/testcases/network/sockets/
H A DltpClient.c443 struct iphdr *ip = netPacket; in output_to_display()
588 struct iphdr *ip; in ltp_traceroute()
/third_party/toybox/toys/pending/
H A Ddhcp.c169 struct iphdr iph;
687 memset(&packet.iph, 0, ((size_t) &((struct iphdr *)0)->protocol)); in read_raw()
751 packet.udph.len = htons(sizeof(dhcp_raw_t) - sizeof(struct iphdr) - padding); in send_raw()
/third_party/wpa_supplicant/wpa_supplicant-2.9/hostapd/
H A Dap_ctrl_iface.c1830 struct iphdr ip; in hostapd_data_test_rx()
1917 struct iphdr *ip; in hostapd_ctrl_iface_data_test_tx()
1956 ip = (struct iphdr *) (eth + 1); in hostapd_ctrl_iface_data_test_tx()

Completed in 30 milliseconds

12