/kernel/linux/linux-6.6/net/ipv4/netfilter/ |
H A D | nf_reject_ipv4.c | 23 iph = ip_hdr(skb); in nf_reject_iphdr_validate() 91 if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET)) in nf_reject_skb_v4_unreach() 100 if (pskb_trim_rcsum(oldskb, ntohs(ip_hdr(oldskb)->tot_len))) in nf_reject_skb_v4_unreach() 104 proto = ip_hdr(oldskb)->protocol; in nf_reject_skb_v4_unreach() 145 if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET)) in nf_reject_ip_tcphdr_get() 148 if (ip_hdr(oldskb)->protocol != IPPROTO_TCP) in nf_reject_ip_tcphdr_get() 172 struct iphdr *niph, *oiph = ip_hdr(oldskb); in nf_reject_iphdr_put() 196 struct iphdr *niph = ip_hdr(nskb); in nf_reject_ip_tcphdr_put() 229 fl.u.ip4.daddr = ip_hdr(skb_in)->saddr; in nf_reject_fill_skb_dst() 275 niph = ip_hdr(nsk in nf_send_reset() [all...] |
H A D | ipt_ECN.c | 28 struct iphdr *iph = ip_hdr(skb); in set_ect_ip() 34 iph = ip_hdr(skb); in set_ect_ip() 63 tcph = (void *)ip_hdr(skb) + ip_hdrlen(skb); in set_ect_tcp() 86 ip_hdr(skb)->protocol == IPPROTO_TCP) in ecn_tg()
|
/device/soc/rockchip/common/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/ |
H A D | dhd_ip.c | 636 static INLINE bool dhd_tcpdata_psh_acked(dhd_pub_t *dhdp, uint8 *ip_hdr, in dhd_tcpdata_psh_acked() argument 657 IPV4_ADDR_TO_STR(ntoh32_ua(&ip_hdr[IPV4_SRC_IP_OFFSET])), in dhd_tcpdata_psh_acked() 658 IPV4_ADDR_TO_STR(ntoh32_ua(&ip_hdr[IPV4_DEST_IP_OFFSET])), in dhd_tcpdata_psh_acked() 673 if (memcmp(&ip_hdr[IPV4_SRC_IP_OFFSET], in dhd_tcpdata_psh_acked() 675 memcmp(&ip_hdr[IPV4_DEST_IP_OFFSET], in dhd_tcpdata_psh_acked() 946 uint8 *ip_hdr; /* IP header of the new packet */ in dhd_tcpdata_info_get() local 979 ip_hdr = ether_hdr + ETHER_HDR_LEN; in dhd_tcpdata_info_get() 984 ip_hdr_len = IPV4_HLEN(ip_hdr); in dhd_tcpdata_info_get() 985 if (IP_VER(ip_hdr) != IP_VER_4 || IPV4_PROT(ip_hdr) ! in dhd_tcpdata_info_get() 1386 uint8 *ip_hdr; /* IP header of the new packet */ dhd_tcpdata_get_flag() local [all...] |
/kernel/linux/linux-5.10/net/ipv4/ |
H A D | ip_input.c | 154 u8 protocol = ip_hdr(skb)->protocol; in ip_call_ra_chain() 168 if (ip_is_fragment(ip_hdr(skb))) { in ip_call_ra_chain() 234 ip_protocol_deliver_rcu(net, skb, ip_hdr(skb)->protocol); in ip_local_deliver_finish() 253 if (ip_is_fragment(ip_hdr(skb))) { in ip_local_deliver() 285 iph = ip_hdr(skb); in ip_rcv_options() 319 return hint && !skb_dst(skb) && ip_hdr(hint)->daddr == iph->daddr && in ip_can_use_hint() 320 ip_hdr(hint)->tos == iph->tos; in ip_can_use_hint() 329 const struct iphdr *iph = ip_hdr(skb); in ip_rcv_finish_core() 350 iph = ip_hdr(skb); in ip_rcv_finish_core() 360 iph = ip_hdr(sk in ip_rcv_finish_core() [all...] |
H A D | xfrm4_input.c | 31 const struct iphdr *iph = ip_hdr(skb); in xfrm4_rcv_encap_finish() 50 struct iphdr *iph = ip_hdr(skb); in xfrm4_transport_finish() 145 iph = ip_hdr(skb); in xfrm4_udp_encap_rcv() 171 return xfrm4_rcv_spi(skb, ip_hdr(skb)->protocol, 0); in xfrm4_rcv()
|
H A D | tcp_ipv4.c | 98 return secure_tcp_seq(ip_hdr(skb)->daddr, in tcp_v4_init_seq() 99 ip_hdr(skb)->saddr, in tcp_v4_init_seq() 106 return secure_tcp_ts_off(net, ip_hdr(skb)->daddr, ip_hdr(skb)->saddr); in tcp_v4_init_ts_off() 730 addr = (union tcp_md5_addr *)&ip_hdr(skb)->saddr; in tcp_v4_send_reset() 746 ip_hdr(skb)->saddr, in tcp_v4_send_reset() 747 th->source, ip_hdr(skb)->daddr, in tcp_v4_send_reset() 757 addr = (union tcp_md5_addr *)&ip_hdr(skb)->saddr; in tcp_v4_send_reset() 779 key, ip_hdr(skb)->saddr, in tcp_v4_send_reset() 780 ip_hdr(sk in tcp_v4_send_reset() [all...] |
H A D | udp_offload.c | 198 iph = ip_hdr(seg); in __udpv4_gso_segment_csum() 222 iph = ip_hdr(seg); in __udpv4_gso_segment_list_csum() 226 (ip_hdr(seg)->daddr == ip_hdr(seg->next)->daddr) && in __udpv4_gso_segment_list_csum() 227 (ip_hdr(seg)->saddr == ip_hdr(seg->next)->saddr)) in __udpv4_gso_segment_list_csum() 232 iph2 = ip_hdr(seg); in __udpv4_gso_segment_list_csum() 399 iph = ip_hdr(skb); in udp4_ufo_fragment() 667 const struct iphdr *iph = ip_hdr(skb); in udp4_gro_complete()
|
/kernel/linux/linux-6.6/net/ipv4/ |
H A D | ip_input.c | 151 u8 protocol = ip_hdr(skb)->protocol; in ip_call_ra_chain() 165 if (ip_is_fragment(ip_hdr(skb))) { in ip_call_ra_chain() 233 ip_protocol_deliver_rcu(net, skb, ip_hdr(skb)->protocol); in ip_local_deliver_finish() 249 if (ip_is_fragment(ip_hdr(skb))) { in ip_local_deliver() 277 iph = ip_hdr(skb); in ip_rcv_options() 311 return hint && !skb_dst(skb) && ip_hdr(hint)->daddr == iph->daddr && in ip_can_use_hint() 312 ip_hdr(hint)->tos == iph->tos; in ip_can_use_hint() 321 const struct iphdr *iph = ip_hdr(skb); in ip_rcv_finish_core() 344 iph = ip_hdr(skb); in ip_rcv_finish_core() 354 iph = ip_hdr(sk in ip_rcv_finish_core() [all...] |
H A D | xfrm4_input.c | 31 const struct iphdr *iph = ip_hdr(skb); in xfrm4_rcv_encap_finish() 50 struct iphdr *iph = ip_hdr(skb); in xfrm4_transport_finish() 145 iph = ip_hdr(skb); in xfrm4_udp_encap_rcv() 171 return xfrm4_rcv_spi(skb, ip_hdr(skb)->protocol, 0); in xfrm4_rcv()
|
/kernel/linux/linux-5.10/net/ipv4/netfilter/ |
H A D | nf_reject_ipv4.c | 21 if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET)) in nf_reject_ip_tcphdr_get() 24 if (ip_hdr(oldskb)->protocol != IPPROTO_TCP) in nf_reject_ip_tcphdr_get() 48 struct iphdr *niph, *oiph = ip_hdr(oldskb); in nf_reject_iphdr_put() 72 struct iphdr *niph = ip_hdr(nskb); in nf_reject_ip_tcphdr_put() 105 fl.u.ip4.daddr = ip_hdr(skb_in)->saddr; in nf_reject_fill_skb_dst() 151 niph = ip_hdr(nskb); in nf_send_reset() 190 struct iphdr *iph = ip_hdr(skb_in); in nf_send_unreach()
|
H A D | ipt_ECN.c | 28 struct iphdr *iph = ip_hdr(skb); in set_ect_ip() 34 iph = ip_hdr(skb); in set_ect_ip() 63 tcph = (void *)ip_hdr(skb) + ip_hdrlen(skb); in set_ect_tcp() 86 ip_hdr(skb)->protocol == IPPROTO_TCP) in ecn_tg()
|
/kernel/linux/linux-6.6/include/linux/ |
H A D | ip.h | 19 static inline struct iphdr *ip_hdr(const struct sk_buff *skb) in ip_hdr() function 36 return ntohs(ip_hdr(skb)->tot_len) - skb_network_header_len(skb); in ip_transport_len() 49 return iph_totlen(skb, ip_hdr(skb)); in skb_ip_totlen()
|
/third_party/lwip/test/unit/tcp/ |
H A D | tcp_helper.c | 52 struct ip_hdr* iphdr; in tcp_create_segment_wnd() 54 u16_t pbuf_len = (u16_t)(sizeof(struct ip_hdr) + sizeof(struct tcp_hdr) + data_len); in tcp_create_segment_wnd() 60 EXPECT_RETNULL(p->len >= (sizeof(struct ip_hdr) + sizeof(struct tcp_hdr))); in tcp_create_segment_wnd() 63 EXPECT_RETNULL(p->len > (sizeof(struct ip_hdr) + sizeof(struct tcp_hdr))); in tcp_create_segment_wnd() 70 iphdr = (struct ip_hdr*)p->payload; in tcp_create_segment_wnd() 80 pbuf_header(p, -(s16_t)sizeof(struct ip_hdr)); in tcp_create_segment_wnd() 105 pbuf_header(p, sizeof(struct ip_hdr)); in tcp_create_segment_wnd() 256 struct ip_hdr *iphdr = (struct ip_hdr*)p->payload; in test_tcp_input() 264 pbuf_header(p, -(s16_t)sizeof(struct ip_hdr)); in test_tcp_input() [all...] |
/kernel/linux/linux-5.10/net/netfilter/ |
H A D | xt_DSCP.c | 31 u_int8_t dscp = ipv4_get_dsfield(ip_hdr(skb)) >> XT_DSCP_SHIFT; in dscp_tg() 37 ipv4_change_dsfield(ip_hdr(skb), in dscp_tg() 75 struct iphdr *iph = ip_hdr(skb); in tos_tg() 84 iph = ip_hdr(skb); in tos_tg()
|
/kernel/linux/linux-6.6/net/netfilter/ |
H A D | xt_DSCP.c | 33 u_int8_t dscp = ipv4_get_dsfield(ip_hdr(skb)) >> XT_DSCP_SHIFT; in dscp_tg() 39 ipv4_change_dsfield(ip_hdr(skb), XT_DSCP_ECN_MASK, in dscp_tg() 75 struct iphdr *iph = ip_hdr(skb); in tos_tg() 84 iph = ip_hdr(skb); in tos_tg()
|
/third_party/lwip/src/core/ipv4/ |
H A D | ip4_frag.c | 247 ip_reass_remove_oldest_datagram(struct ip_hdr *fraghdr, int pbufs_needed) in ip_reass_remove_oldest_datagram() 298 ip_reass_enqueue_new_datagram(struct ip_hdr *fraghdr, int clen) in ip_reass_enqueue_new_datagram() 370 struct ip_hdr *fraghdr; in ip_reass_chain_frag_into_datagram_and_validate() 374 fraghdr = (struct ip_hdr *)new_p->payload; in ip_reass_chain_frag_into_datagram_and_validate() 526 struct ip_hdr *fraghdr; in ip4_reass() 537 fraghdr = (struct ip_hdr *)p->payload; in ip4_reass() 647 fraghdr = (struct ip_hdr *)(ipr->p->payload); in ip4_reass() 768 struct ip_hdr *original_iphdr; in ip4_frag() 769 struct ip_hdr *iphdr; in ip4_frag() 778 original_iphdr = (struct ip_hdr *) in ip4_frag() [all...] |
/kernel/linux/linux-6.6/include/net/ |
H A D | inet_ecn.h | 178 return IP_ECN_set_ce(ip_hdr(skb)); in INET_ECN_set_ce() 197 return ipv4_get_dsfield(ip_hdr(skb)); in skb_get_dsfield() 214 return IP_ECN_set_ect1(ip_hdr(skb)); in INET_ECN_set_ect1() 293 inner = ip_hdr(skb)->tos; in IP_ECN_decapsulate() 312 inner = ip_hdr(skb)->tos; in IP6_ECN_decapsulate()
|
/third_party/lwip/test/unit/ip4/ |
H A D | test_ip4.c | 25 p = pbuf_alloc(PBUF_RAW, len + sizeof(struct ip_hdr), PBUF_RAM); in create_ip4_input_fragment() 29 struct ip_hdr *iphdr = (struct ip_hdr *)p->payload; in create_ip4_input_fragment() 30 IPH_VHL_SET(iphdr, 4, sizeof(struct ip_hdr) / 4); in create_ip4_input_fragment() 45 IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, sizeof(struct ip_hdr))); in create_ip4_input_fragment()
|
/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/ |
H A D | mac_data.c | 85 WIFI_ROM_TEXT hi_u8 mac_is_dhcp_port(mac_ip_header_stru *ip_hdr) in mac_is_dhcp_port() argument 88 if ((ip_hdr->protocol == MAC_UDP_PROTOCAL) && ((oal_net2host_short(ip_hdr->us_frag_off) & 0x1FFF) == 0)) { in mac_is_dhcp_port() 89 udp_hdr = (udp_hdr_stru *)(ip_hdr + 1); in mac_is_dhcp_port()
|
/kernel/linux/linux-5.10/drivers/staging/rtl8712/ |
H A D | xmit_linux.c | 69 struct iphdr ip_hdr; in r8712_set_qos() local 77 _r8712_pktfile_read(ppktfile, (u8 *)&ip_hdr, sizeof(ip_hdr)); in r8712_set_qos() 78 /*UserPriority = (ntohs(ip_hdr.tos) >> 5) & 0x3 ;*/ in r8712_set_qos() 79 UserPriority = ip_hdr.tos >> 5; in r8712_set_qos()
|
/kernel/linux/linux-6.6/drivers/staging/rtl8712/ |
H A D | xmit_linux.c | 68 struct iphdr ip_hdr; in r8712_set_qos() local 76 _r8712_pktfile_read(ppktfile, (u8 *)&ip_hdr, sizeof(ip_hdr)); in r8712_set_qos() 77 /*user_priority = (ntohs(ip_hdr.tos) >> 5) & 0x3 ;*/ in r8712_set_qos() 78 user_priority = ip_hdr.tos >> 5; in r8712_set_qos()
|
/kernel/linux/linux-5.10/include/linux/ |
H A D | ip.h | 19 static inline struct iphdr *ip_hdr(const struct sk_buff *skb) in ip_hdr() function 36 return ntohs(ip_hdr(skb)->tot_len) - skb_network_header_len(skb); in ip_transport_len()
|
/kernel/linux/linux-5.10/drivers/staging/octeon/ |
H A D | ethernet-tx.c | 366 (ip_hdr(skb)->version == 4) && in cvm_oct_xmit() 367 (ip_hdr(skb)->ihl == 5) && in cvm_oct_xmit() 368 ((ip_hdr(skb)->frag_off == 0) || in cvm_oct_xmit() 369 (ip_hdr(skb)->frag_off == htons(1 << 14))) && in cvm_oct_xmit() 370 ((ip_hdr(skb)->protocol == IPPROTO_TCP) || in cvm_oct_xmit() 371 (ip_hdr(skb)->protocol == IPPROTO_UDP))) { in cvm_oct_xmit() 587 (ip_hdr(skb)->protocol == IPPROTO_TCP) || in cvm_oct_xmit_pow() 588 (ip_hdr(skb)->protocol == IPPROTO_UDP); in cvm_oct_xmit_pow() 599 work->word2.s.is_frag = !((ip_hdr(skb)->frag_off == 0) || in cvm_oct_xmit_pow() 600 (ip_hdr(sk in cvm_oct_xmit_pow() [all...] |
/kernel/linux/linux-6.6/drivers/staging/octeon/ |
H A D | ethernet-tx.c | 364 (ip_hdr(skb)->version == 4) && in cvm_oct_xmit() 365 (ip_hdr(skb)->ihl == 5) && in cvm_oct_xmit() 366 ((ip_hdr(skb)->frag_off == 0) || in cvm_oct_xmit() 367 (ip_hdr(skb)->frag_off == htons(1 << 14))) && in cvm_oct_xmit() 368 ((ip_hdr(skb)->protocol == IPPROTO_TCP) || in cvm_oct_xmit() 369 (ip_hdr(skb)->protocol == IPPROTO_UDP))) { in cvm_oct_xmit() 584 (ip_hdr(skb)->protocol == IPPROTO_TCP) || in cvm_oct_xmit_pow() 585 (ip_hdr(skb)->protocol == IPPROTO_UDP); in cvm_oct_xmit_pow() 596 work->word2.s.is_frag = !((ip_hdr(skb)->frag_off == 0) || in cvm_oct_xmit_pow() 597 (ip_hdr(sk in cvm_oct_xmit_pow() [all...] |
/kernel/linux/linux-5.10/samples/bpf/ |
H A D | xdpsock_user.c | 745 struct iphdr *ip_hdr = (struct iphdr *)(pkt_data + in gen_eth_hdr_data() local 755 ip_hdr->version = IPVERSION; in gen_eth_hdr_data() 756 ip_hdr->ihl = 0x5; /* 20 byte header */ in gen_eth_hdr_data() 757 ip_hdr->tos = 0x0; in gen_eth_hdr_data() 758 ip_hdr->tot_len = htons(IP_PKT_SIZE); in gen_eth_hdr_data() 759 ip_hdr->id = 0; in gen_eth_hdr_data() 760 ip_hdr->frag_off = 0; in gen_eth_hdr_data() 761 ip_hdr->ttl = IPDEFTTL; in gen_eth_hdr_data() 762 ip_hdr->protocol = IPPROTO_UDP; in gen_eth_hdr_data() 763 ip_hdr in gen_eth_hdr_data() [all...] |