Home
last modified time | relevance | path

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

/net/ipv4/
Dicmp.c106 struct icmphdr icmph; member
363 if (icmp_pointers[icmp_param->data.icmph.type].error) in icmp_glue_bits()
383 struct icmphdr *icmph = icmp_hdr(skb); in icmp_push_reply() local
388 (char *)icmph, in icmp_push_reply()
393 icmph->checksum = csum_fold(csum); in icmp_push_reply()
413 int type = icmp_param->data.icmph.type; in icmp_reply()
414 int code = icmp_param->data.icmph.code; in icmp_reply()
431 icmp_param->data.icmph.checksum = 0; in icmp_reply()
730 icmp_param.data.icmph.type = type; in __icmp_send()
731 icmp_param.data.icmph.code = code; in __icmp_send()
[all …]
Dping.c487 struct icmphdr *icmph; in ping_err() local
500 icmph = (struct icmphdr *)(skb->data + offset); in ping_err()
505 icmph = (struct icmphdr *) (skb->data + offset); in ping_err()
512 if (!ping_supported(family, icmph->type, icmph->code)) in ping_err()
516 skb->protocol, type, code, ntohs(icmph->un.echo.id), in ping_err()
517 ntohs(icmph->un.echo.sequence)); in ping_err()
519 sk = ping_lookup(net, skb, ntohs(icmph->un.echo.id)); in ping_err()
585 info, (u8 *)icmph); in ping_err()
589 info, (u8 *)icmph); in ping_err()
649 pfh->wcheck = csum_partial((char *)&pfh->icmph, in ping_v4_push_pending_frames()
[all …]
Dip_tunnel_core.c198 struct icmphdr *icmph; in iptunnel_pmtud_build_icmp() local
210 err = pskb_trim(skb, 576 - sizeof(*niph) - sizeof(*icmph)); in iptunnel_pmtud_build_icmp()
214 len = skb->len + sizeof(*icmph); in iptunnel_pmtud_build_icmp()
215 err = skb_cow(skb, sizeof(*niph) + sizeof(*icmph) + ETH_HLEN); in iptunnel_pmtud_build_icmp()
219 icmph = skb_push(skb, sizeof(*icmph)); in iptunnel_pmtud_build_icmp()
220 *icmph = (struct icmphdr) { in iptunnel_pmtud_build_icmp()
227 icmph->checksum = csum_fold(skb_checksum(skb, 0, len, 0)); in iptunnel_pmtud_build_icmp()
263 const struct icmphdr *icmph = icmp_hdr(skb); in iptunnel_pmtud_check_icmp() local
274 if (iph->protocol == IPPROTO_ICMP && icmp_is_err(icmph->type)) in iptunnel_pmtud_check_icmp()
Draw.c82 struct icmphdr icmph; member
462 fl4->fl4_icmp_type = rfv->hdr.icmph.type; in raw_probe_proto_opt()
463 fl4->fl4_icmp_code = rfv->hdr.icmph.code; in raw_probe_proto_opt()
Droute.c1900 const struct icmphdr *icmph; in ip_multipath_l3_keys() local
1910 icmph = skb_header_pointer(skb, outer_iph->ihl * 4, sizeof(_icmph), in ip_multipath_l3_keys()
1912 if (!icmph) in ip_multipath_l3_keys()
1915 if (!icmp_is_err(icmph->type)) in ip_multipath_l3_keys()
3212 struct icmphdr *icmph; in inet_rtm_getroute_build_skb() local
3214 icmph = skb_put_zero(skb, sizeof(struct icmphdr)); in inet_rtm_getroute_build_skb()
3215 icmph->type = ICMP_ECHO; in inet_rtm_getroute_build_skb()
3216 icmph->code = 0; in inet_rtm_getroute_build_skb()
/net/batman-adv/
Drouting.c221 struct batadv_icmp_header *icmph; in batadv_recv_my_icmp_packet() local
224 icmph = (struct batadv_icmp_header *)skb->data; in batadv_recv_my_icmp_packet()
226 switch (icmph->msg_type) { in batadv_recv_my_icmp_packet()
234 orig_node = batadv_orig_hash_find(bat_priv, icmph->orig); in batadv_recv_my_icmp_packet()
242 icmph = (struct batadv_icmp_header *)skb->data; in batadv_recv_my_icmp_packet()
244 ether_addr_copy(icmph->dst, icmph->orig); in batadv_recv_my_icmp_packet()
245 ether_addr_copy(icmph->orig, primary_if->net_dev->dev_addr); in batadv_recv_my_icmp_packet()
246 icmph->msg_type = BATADV_ECHO_REPLY; in batadv_recv_my_icmp_packet()
247 icmph->ttl = BATADV_TTL; in batadv_recv_my_icmp_packet()
342 struct batadv_icmp_header *icmph; in batadv_recv_icmp_packet() local
[all …]
/net/sched/
Dact_nat.c199 struct icmphdr *icmph; in tcf_nat_act() local
201 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + noff)) in tcf_nat_act()
204 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
206 if (!icmp_is_err(icmph->type)) in tcf_nat_act()
209 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph) + in tcf_nat_act()
213 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
214 iph = (void *)(icmph + 1); in tcf_nat_act()
223 if (skb_try_make_writable(skb, ihl + sizeof(*icmph) + in tcf_nat_act()
227 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
228 iph = (void *)(icmph + 1); in tcf_nat_act()
[all …]
Dact_csum.c150 struct icmphdr *icmph; in tcf_csum_ipv4_icmp() local
152 icmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmph)); in tcf_csum_ipv4_icmp()
153 if (icmph == NULL) in tcf_csum_ipv4_icmp()
156 icmph->checksum = 0; in tcf_csum_ipv4_icmp()
157 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp()
158 icmph->checksum = csum_fold(skb->csum); in tcf_csum_ipv4_icmp()
/net/bridge/
Dbr_arp_nd_proxy.c241 if (m->icmph.icmp6_code != 0 || in br_is_nd_neigh_msg()
242 (m->icmph.icmp6_type != NDISC_NEIGHBOUR_SOLICITATION && in br_is_nd_neigh_msg()
243 m->icmph.icmp6_type != NDISC_NEIGHBOUR_ADVERTISEMENT)) in br_is_nd_neigh_msg()
323 na->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT; in br_nd_send()
324 na->icmph.icmp6_router = (n->flags & NTF_ROUTER) ? 1 : 0; in br_nd_send()
325 na->icmph.icmp6_override = 1; in br_nd_send()
326 na->icmph.icmp6_solicited = 1; in br_nd_send()
332 na->icmph.icmp6_cksum = csum_ipv6_magic(&pip6->saddr, in br_nd_send()
413 if (msg->icmph.icmp6_type == NDISC_NEIGHBOUR_ADVERTISEMENT && in br_do_suppress_nd()
414 !msg->icmph.icmp6_solicited) { in br_do_suppress_nd()
[all …]
/net/ipv6/
Dping.c131 pfh.icmph.type = user_icmph.icmp6_type; in ping_v6_sendmsg()
132 pfh.icmph.code = user_icmph.icmp6_code; in ping_v6_sendmsg()
133 pfh.icmph.checksum = 0; in ping_v6_sendmsg()
134 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v6_sendmsg()
135 pfh.icmph.un.echo.sequence = user_icmph.icmp6_sequence; in ping_v6_sendmsg()
153 (struct icmp6hdr *)&pfh.icmph, len); in ping_v6_sendmsg()
Dndisc.c559 .icmph = { in ndisc_send_na()
633 .icmph = { in ndisc_send_ns()
693 .icmph = { in ndisc_send_rs()
980 msg->icmph.icmp6_solicited) { in ndisc_recv_na()
989 if (!msg->icmph.icmp6_solicited && idev && in ndisc_recv_na()
1050 msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE, in ndisc_recv_na()
1052 (msg->icmph.icmp6_override ? NEIGH_UPDATE_F_OVERRIDE : 0)| in ndisc_recv_na()
1054 (msg->icmph.icmp6_router ? NEIGH_UPDATE_F_ISROUTER : 0), in ndisc_recv_na()
1258 (ra_msg->icmph.icmp6_addrconf_managed ? in ndisc_router_discovery()
1260 (ra_msg->icmph.icmp6_addrconf_other ? in ndisc_router_discovery()
[all …]
Dicmp.c724 struct icmp6hdr *icmph = icmp6_hdr(skb); in icmpv6_echo_reply() local
748 if (icmph->icmp6_type == ICMPV6_EXT_ECHO_REQUEST) in icmpv6_echo_reply()
753 memcpy(&tmp_hdr, icmph, sizeof(tmp_hdr)); in icmpv6_echo_reply()
803 if (icmph->icmp6_type == ICMPV6_EXT_ECHO_REQUEST) in icmpv6_echo_reply()
Ddatagram.c303 struct icmp6hdr *icmph = icmp6_hdr(skb); in ipv6_icmp_error() local
318 serr->ee.ee_type = icmph->icmp6_type; in ipv6_icmp_error()
319 serr->ee.ee_code = icmph->icmp6_code; in ipv6_icmp_error()
323 serr->addr_offset = (u8 *)&(((struct ipv6hdr *)(icmph + 1))->daddr) - in ipv6_icmp_error()
Droute.c2303 const struct icmp6hdr *icmph; in ip6_multipath_l3_keys() local
2310 icmph = skb_header_pointer(skb, skb_transport_offset(skb), in ip6_multipath_l3_keys()
2312 if (!icmph) in ip6_multipath_l3_keys()
2315 if (!icmpv6_is_err(icmph->icmp6_type)) in ip6_multipath_l3_keys()
2319 skb_transport_offset(skb) + sizeof(*icmph), in ip6_multipath_l3_keys()
/net/ipv6/netfilter/
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()
/net/netfilter/
Dnf_conntrack_proto_icmp.c209 const struct icmphdr *icmph; in nf_conntrack_icmpv4_error() local
213 icmph = skb_header_pointer(skb, dataoff, sizeof(_ih), &_ih); in nf_conntrack_icmpv4_error()
214 if (icmph == NULL) { in nf_conntrack_icmpv4_error()
233 if (icmph->type > NR_ICMP_TYPES) { in nf_conntrack_icmpv4_error()
239 if (!icmp_is_err(icmph->type)) in nf_conntrack_icmpv4_error()
245 dataoff += sizeof(*icmph); in nf_conntrack_icmpv4_error()
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()
Dnf_conntrack_proto_icmpv6.c152 if (rd_msg->icmph.icmp6_code != 0) in nf_conntrack_icmpv6_redirect()
/net/ipv4/netfilter/
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()
Dnf_reject_ipv4.c81 struct icmphdr *icmph; in nf_reject_skb_v4_unreach() local
121 icmph = skb_put_zero(nskb, sizeof(struct icmphdr)); in nf_reject_skb_v4_unreach()
122 icmph->type = ICMP_DEST_UNREACH; in nf_reject_skb_v4_unreach()
123 icmph->code = code; in nf_reject_skb_v4_unreach()
127 csum = csum_partial((void *)icmph, len + sizeof(struct icmphdr), 0); in nf_reject_skb_v4_unreach()
128 icmph->checksum = csum_fold(csum); in nf_reject_skb_v4_unreach()
/net/netfilter/ipvs/
Dip_vs_core.c87 #define icmp_id(icmph) (((icmph)->un).echo.id) argument
88 #define icmpv6_id(icmph) (icmph->icmp6_dataun.u_echo.identifier) argument
753 struct icmphdr *icmph = (struct icmphdr *)(skb_network_header(skb) + in ip_vs_nat_icmp() local
755 struct iphdr *ciph = (struct iphdr *)(icmph + 1); in ip_vs_nat_icmp()
781 icmph->checksum = 0; in ip_vs_nat_icmp()
782 icmph->checksum = ip_vs_checksum_complete(skb, icmp_offset); in ip_vs_nat_icmp()
801 struct icmp6hdr *icmph; in ip_vs_nat_icmp_v6() local
806 icmph = (struct icmp6hdr *)(skb_network_header(skb) + icmp_offset); in ip_vs_nat_icmp_v6()
835 icmph->icmp6_cksum = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, in ip_vs_nat_icmp_v6()