Home
last modified time | relevance | path

Searched refs:icmph (Results 1 – 25 of 26) sorted by relevance

12

/linux/tools/testing/selftests/bpf/progs/
H A Dxdping_kern.c
H A Dicmp_send.c77 struct icmphdr *icmph; in recursion() local
98 icmph = (void *)iph + iph->ihl * 4; in recursion()
99 if ((void *)(icmph + 1) > data_end || in recursion()
100 icmph->type != unreach_type || icmph->code != unreach_code) in recursion()
/linux/net/ipv4/
H A Dicmp.c112 struct icmphdr icmph; member
375 if (icmp_param->data.icmph.type <= NR_ICMP_TYPES && in icmp_glue_bits()
376 icmp_pointers[array_index_nospec(icmp_param->data.icmph.type, in icmp_glue_bits()
396 struct icmphdr *icmph = icmp_hdr(skb); in icmp_push_reply() local
401 (char *)icmph, in icmp_push_reply()
406 icmph->checksum = csum_fold(csum); in icmp_push_reply()
426 int type = icmp_param->data.icmph.type; in icmp_reply()
427 int code = icmp_param->data.icmph.code; in icmp_reply()
443 icmp_param->data.icmph.checksum = 0; in icmp_reply()
742 icmp_ext_append(struct net *net, struct sk_buff *skb_in, struct icmphdr *icmph, in icmp_ext_append() argument
[all …]
H A Dip_tunnel_core.c216 struct icmphdr *icmph; in iptunnel_pmtud_build_icmp() local
230 err = pskb_trim(skb, 576 - sizeof(*niph) - sizeof(*icmph)); in iptunnel_pmtud_build_icmp()
234 len = skb->len + sizeof(*icmph); in iptunnel_pmtud_build_icmp()
235 err = skb_cow(skb, sizeof(*niph) + sizeof(*icmph) + ETH_HLEN); in iptunnel_pmtud_build_icmp()
239 icmph = skb_push(skb, sizeof(*icmph)); in iptunnel_pmtud_build_icmp()
240 *icmph = (struct icmphdr) { in iptunnel_pmtud_build_icmp()
247 icmph->checksum = csum_fold(skb_checksum(skb, 0, len, 0)); in iptunnel_pmtud_build_icmp()
297 const struct icmphdr *icmph; in iptunnel_pmtud_check_icmp() local
303 icmph = (void *)iph + iph->ihl * 4; in iptunnel_pmtud_check_icmp()
304 if (icmp_is_err(icmph->type)) in iptunnel_pmtud_check_icmp()
H A Draw.c82 struct icmphdr icmph; member
452 fl4->fl4_icmp_type = rfv->hdr.icmph.type; in raw_probe_proto_opt()
453 fl4->fl4_icmp_code = rfv->hdr.icmph.code; in raw_probe_proto_opt()
H A Droute.c1947 const struct icmphdr *icmph; in ip_multipath_l3_keys()
1957 icmph = skb_header_pointer(skb, outer_iph->ihl * 4, sizeof(_icmph), in ip_multipath_l3_keys()
1959 if (!icmph) in ip_multipath_l3_keys()
1962 if (!icmp_is_err(icmph->type)) in ip_multipath_l3_keys()
3244 struct icmphdr *icmph; in inet_rtm_getroute_build_skb()
3246 icmph = skb_put_zero(skb, sizeof(struct icmphdr)); in inet_rtm_getroute_build_skb()
3247 icmph->type = ICMP_ECHO; in inet_rtm_getroute_build_skb()
3248 icmph->code = 0; in inet_rtm_getroute_build_skb()
1945 const struct icmphdr *icmph; ip_multipath_l3_keys() local
3239 struct icmphdr *icmph; inet_rtm_getroute_build_skb() local
/linux/net/sched/
H A Dact_nat.c211 struct icmphdr *icmph; in tcf_nat_act() local
213 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + noff)) in tcf_nat_act()
216 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
218 if (!icmp_is_err(icmph->type)) in tcf_nat_act()
221 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph) + in tcf_nat_act()
225 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
226 iph = (void *)(icmph + 1); in tcf_nat_act()
235 if (skb_try_make_writable(skb, ihl + sizeof(*icmph) + in tcf_nat_act()
239 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
240 iph = (void *)(icmph + 1); in tcf_nat_act()
[all …]
H A Dact_csum.c151 struct icmphdr *icmph; in tcf_csum_ipv4_icmp() local
153 icmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmph)); in tcf_csum_ipv4_icmp()
154 if (icmph == NULL) in tcf_csum_ipv4_icmp()
157 icmph->checksum = 0; in tcf_csum_ipv4_icmp()
158 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp()
159 icmph->checksum = csum_fold(skb->csum); in tcf_csum_ipv4_icmp()
/linux/net/batman-adv/
H A Drouting.c278 struct batadv_icmp_header *icmph; in batadv_recv_my_icmp_packet() local
282 icmph = (struct batadv_icmp_header *)skb->data; in batadv_recv_my_icmp_packet()
284 switch (icmph->msg_type) { in batadv_recv_my_icmp_packet()
292 orig_node = batadv_orig_hash_find(bat_priv, icmph->orig); in batadv_recv_my_icmp_packet()
300 icmph = (struct batadv_icmp_header *)skb->data; in batadv_recv_my_icmp_packet()
302 ether_addr_copy(icmph->dst, icmph->orig); in batadv_recv_my_icmp_packet()
303 ether_addr_copy(icmph->orig, primary_if->net_dev->dev_addr); in batadv_recv_my_icmp_packet()
304 icmph->msg_type = BATADV_ECHO_REPLY; in batadv_recv_my_icmp_packet()
305 icmph->ttl = BATADV_TTL; in batadv_recv_my_icmp_packet()
414 struct batadv_icmp_header *icmph; in batadv_recv_icmp_packet() local
[all …]
/linux/tools/testing/selftests/net/tcp_ao/
H A Dicmps-accept.c185 struct icmphdr icmph; in icmp_interfere4() member
202 packet.icmph.type = type; in icmp_interfere4()
203 packet.icmph.code = code; in icmp_interfere4()
205 randomize_buffer(&packet.icmph.un.frag.mtu, in icmp_interfere4()
206 sizeof(packet.icmph.un.frag.mtu)); in icmp_interfere4()
217 packet.icmph.checksum = checksum4_fold((void *)&packet.icmph, in icmp_interfere4()
300 struct icmp6hdr icmph; in icmp6_interfere() member
318 packet.icmph.icmp6_type = type; in icmp6_interfere()
319 packet.icmph in icmp6_interfere()
[all...]
H A Dicmps-discard.c185 struct icmphdr icmph; in icmp_interfere4() member
202 packet.icmph.type = type; in icmp_interfere4()
203 packet.icmph.code = code; in icmp_interfere4()
205 randomize_buffer(&packet.icmph.un.frag.mtu, in icmp_interfere4()
206 sizeof(packet.icmph.un.frag.mtu)); in icmp_interfere4()
217 packet.icmph.checksum = checksum4_fold((void *)&packet.icmph, in icmp_interfere4()
300 struct icmp6hdr icmph; in icmp6_interfere() member
318 packet.icmph.icmp6_type = type; in icmp6_interfere()
319 packet.icmph.icmp6_code = code; in icmp6_interfere()
330 packet.icmph.icmp6_cksum = icmp6_checksum(src, dst, in icmp6_interfere()
[all …]
/linux/net/bridge/
H A Dbr_arp_nd_proxy.c339 na->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT; in br_nd_send()
340 na->icmph.icmp6_router = (n->flags & NTF_ROUTER) ? 1 : 0; in br_nd_send()
341 na->icmph.icmp6_override = 1; in br_nd_send()
342 na->icmph.icmp6_solicited = dad ? 0 : 1; in br_nd_send()
348 na->icmph.icmp6_cksum = csum_ipv6_magic(&pip6->saddr, in br_nd_send()
431 msg->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) in br_do_suppress_nd()
434 if (msg->icmph.icmp6_type == NDISC_NEIGHBOUR_ADVERTISEMENT && in br_do_suppress_nd()
435 !msg->icmph.icmp6_solicited) { in br_do_suppress_nd()
442 if (msg->icmph.icmp6_type != NDISC_NEIGHBOUR_SOLICITATION) in br_do_suppress_nd()
/linux/net/ipv6/netfilter/
H A Dnf_socket_ipv6.c31 struct icmp6hdr *icmph, _icmph; in extract_icmp6_fields() local
37 icmph = skb_header_pointer(skb, outside_hdrlen, in extract_icmp6_fields()
39 if (icmph == NULL) in extract_icmp6_fields()
42 if (icmph->icmp6_type & ICMPV6_INFOMSG_MASK) in extract_icmp6_fields()
/linux/net/ipv4/netfilter/
H A Dnf_socket_ipv4.c26 struct icmphdr *icmph, _icmph; in extract_icmp4_fields() local
29 icmph = skb_header_pointer(skb, outside_hdrlen, in extract_icmp4_fields()
31 if (icmph == NULL) in extract_icmp4_fields()
34 if (!icmp_is_err(icmph->type)) in extract_icmp4_fields()
H A Dnf_reject_ipv4.c112 struct icmphdr *icmph; in nf_reject_skb_v4_unreach() local
158 icmph = skb_put_zero(nskb, sizeof(struct icmphdr)); in nf_reject_skb_v4_unreach()
159 icmph->type = ICMP_DEST_UNREACH; in nf_reject_skb_v4_unreach()
160 icmph->code = code; in nf_reject_skb_v4_unreach()
164 csum = csum_partial((void *)icmph, len + sizeof(struct icmphdr), 0); in nf_reject_skb_v4_unreach()
165 icmph->checksum = csum_fold(csum); in nf_reject_skb_v4_unreach()
/linux/net/netfilter/
H A Dxt_HMARK.c233 const struct icmphdr *icmph; in get_inner_hdr() local
237 icmph = skb_header_pointer(skb, *nhoff + iphsz, sizeof(_ih), &_ih); in get_inner_hdr()
238 if (icmph == NULL || icmph->type > NR_ICMP_TYPES) in get_inner_hdr()
242 if (!icmp_is_err(icmph->type)) in get_inner_hdr()
/linux/net/ipv6/
H A Dndisc.c564 .icmph = { in ndisc_send_na()
633 .icmph = { in ndisc_ns_create()
714 .icmph = { in ndisc_send_rs()
1013 msg->icmph.icmp6_solicited) { in ndisc_recv_na()
1023 if (!msg->icmph.icmp6_solicited && idev && in ndisc_recv_na()
1078 new_state = msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE; in ndisc_recv_na()
1109 (msg->icmph.icmp6_override ? NEIGH_UPDATE_F_OVERRIDE : 0)| in ndisc_recv_na()
1111 (msg->icmph.icmp6_router ? NEIGH_UPDATE_F_ISROUTER : 0), in ndisc_recv_na()
1308 (ra_msg->icmph.icmp6_addrconf_managed ? in ndisc_router_discovery()
1310 (ra_msg->icmph.icmp6_addrconf_other ? in ndisc_router_discovery()
[all …]
H A Dndisc_snoop.c127 switch (msg->icmph.icmp6_type) { in ndisc_check_nd_msg()
146 msg->icmph.icmp6_solicited) in ndisc_check_nd_msg()
H A Ddatagram.c310 struct icmp6hdr *icmph = icmp6_hdr(skb); in ipv6_icmp_error() local
325 serr->ee.ee_type = icmph->icmp6_type; in ipv6_icmp_error()
326 serr->ee.ee_code = icmph->icmp6_code; in ipv6_icmp_error()
330 serr->addr_offset = (u8 *)&(((struct ipv6hdr *)(icmph + 1))->daddr) - in ipv6_icmp_error()
H A Dicmp.c928 struct icmp6hdr *icmph = icmp6_hdr(skb); in icmpv6_echo_reply() local
954 if (icmph->icmp6_type == ICMPV6_EXT_ECHO_REQUEST) in icmpv6_echo_reply()
959 memcpy(&tmp_hdr, icmph, sizeof(tmp_hdr)); in icmpv6_echo_reply()
1013 if (icmph->icmp6_type == ICMPV6_EXT_ECHO_REQUEST) in icmpv6_echo_reply()
/linux/include/net/
H A Dndisc.h71 struct icmp6hdr icmph; member
77 struct icmp6hdr icmph; member
82 struct icmp6hdr icmph; member
88 struct icmp6hdr icmph; member
/linux/net/netfilter/ipvs/
H A Dip_vs_core.c86 #define icmp_id(icmph) (((icmph)->un).echo.id) argument
87 #define icmpv6_id(icmph) (icmph->icmp6_dataun.u_echo.identifier) argument
930 struct icmphdr *icmph = (struct icmphdr *)(skb->data + toff); in ip_vs_nat_icmp() local
931 struct iphdr *cih = (struct iphdr *)(icmph + 1); in ip_vs_nat_icmp()
961 icmph->checksum = 0; in ip_vs_nat_icmp()
962 icmph->checksum = ip_vs_checksum_complete(skb, toff); in ip_vs_nat_icmp()
980 struct icmp6hdr *icmph; in ip_vs_nat_icmp_v6() local
983 icmph = (struct icmp6hdr *)(skb->data + toff); in ip_vs_nat_icmp_v6()
1008 icmph->icmp6_cksum = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, in ip_vs_nat_icmp_v6()
/linux/drivers/net/usb/
H A Dcdc_mbim.c361 msg->icmph.icmp6_code == 0 && in is_neigh_solicit()
362 msg->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION); in is_neigh_solicit()
/linux/drivers/net/
H A Dvrf.c1210 const struct icmp6hdr *icmph; in ipv6_ndisc_frame() local
1213 icmph = skb_header_pointer(skb, sizeof(*iph), in ipv6_ndisc_frame()
1215 if (!icmph) in ipv6_ndisc_frame()
1218 switch (icmph->icmp6_type) { in ipv6_ndisc_frame()
/linux/drivers/net/vxlan/
H A Dvxlan_core.c2025 na->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT; in vxlan_na_create()
2026 na->icmph.icmp6_router = isrouter; in vxlan_na_create()
2027 na->icmph.icmp6_override = 1; in vxlan_na_create()
2028 na->icmph.icmp6_solicited = 1; in vxlan_na_create()
2034 na->icmph.icmp6_cksum = csum_ipv6_magic(&pip6->saddr, in vxlan_na_create()
2790 if (m->icmph.icmp6_code == 0 && in vxlan_xmit()
2791 m->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) in vxlan_xmit()

12