Home
last modified time | relevance | path

Searched refs:icmph (Results 1 – 22 of 22) 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
391 (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()
729 icmp_param.data.icmph.type = type; in __icmp_send()
730 icmp_param.data.icmph.code = code; in __icmp_send()
[all …]
Dping.c496 struct icmphdr *icmph; in ping_err() local
509 icmph = (struct icmphdr *)(skb->data + offset); in ping_err()
514 icmph = (struct icmphdr *) (skb->data + offset); in ping_err()
521 if (!ping_supported(family, icmph->type, icmph->code)) in ping_err()
525 skb->protocol, type, code, ntohs(icmph->un.echo.id), in ping_err()
526 ntohs(icmph->un.echo.sequence)); in ping_err()
528 sk = ping_lookup(net, skb, ntohs(icmph->un.echo.id)); in ping_err()
594 info, (u8 *)icmph); in ping_err()
598 info, (u8 *)icmph); in ping_err()
658 pfh->wcheck = csum_partial((char *)&pfh->icmph, in ping_v4_push_pending_frames()
[all …]
Droute.c1913 const struct icmphdr *icmph; in ip_multipath_l3_keys() local
1923 icmph = skb_header_pointer(skb, outer_iph->ihl * 4, sizeof(_icmph), in ip_multipath_l3_keys()
1925 if (!icmph) in ip_multipath_l3_keys()
1928 if (icmph->type != ICMP_DEST_UNREACH && in ip_multipath_l3_keys()
1929 icmph->type != ICMP_REDIRECT && in ip_multipath_l3_keys()
1930 icmph->type != ICMP_TIME_EXCEEDED && in ip_multipath_l3_keys()
1931 icmph->type != ICMP_PARAMETERPROB) in ip_multipath_l3_keys()
3027 struct icmphdr *icmph; in inet_rtm_getroute_build_skb() local
3029 icmph = skb_put_zero(skb, sizeof(struct icmphdr)); in inet_rtm_getroute_build_skb()
3030 icmph->type = ICMP_ECHO; in inet_rtm_getroute_build_skb()
[all …]
Draw.c82 struct icmphdr icmph; member
461 fl4->fl4_icmp_type = rfv->hdr.icmph.type; in raw_probe_proto_opt()
462 fl4->fl4_icmp_code = rfv->hdr.icmph.code; in raw_probe_proto_opt()
/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 ((icmph->type != ICMP_DEST_UNREACH) && in tcf_nat_act()
207 (icmph->type != ICMP_TIME_EXCEEDED) && in tcf_nat_act()
208 (icmph->type != ICMP_PARAMETERPROB)) in tcf_nat_act()
211 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph) + in tcf_nat_act()
215 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
216 iph = (void *)(icmph + 1); in tcf_nat_act()
225 if (skb_try_make_writable(skb, ihl + sizeof(*icmph) + in tcf_nat_act()
[all …]
Dact_csum.c149 struct icmphdr *icmph; in tcf_csum_ipv4_icmp() local
151 icmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmph)); in tcf_csum_ipv4_icmp()
152 if (icmph == NULL) in tcf_csum_ipv4_icmp()
155 icmph->checksum = 0; in tcf_csum_ipv4_icmp()
156 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp()
157 icmph->checksum = csum_fold(skb->csum); in tcf_csum_ipv4_icmp()
/net/batman-adv/
Drouting.c224 struct batadv_icmp_header *icmph; in batadv_recv_my_icmp_packet() local
227 icmph = (struct batadv_icmp_header *)skb->data; in batadv_recv_my_icmp_packet()
229 switch (icmph->msg_type) { in batadv_recv_my_icmp_packet()
237 batadv_socket_receive_packet(icmph, skb->len); in batadv_recv_my_icmp_packet()
246 orig_node = batadv_orig_hash_find(bat_priv, icmph->orig); in batadv_recv_my_icmp_packet()
254 icmph = (struct batadv_icmp_header *)skb->data; in batadv_recv_my_icmp_packet()
256 ether_addr_copy(icmph->dst, icmph->orig); in batadv_recv_my_icmp_packet()
257 ether_addr_copy(icmph->orig, primary_if->net_dev->dev_addr); in batadv_recv_my_icmp_packet()
258 icmph->msg_type = BATADV_ECHO_REPLY; in batadv_recv_my_icmp_packet()
259 icmph->ttl = BATADV_TTL; in batadv_recv_my_icmp_packet()
[all …]
Dicmp_socket.c47 struct batadv_icmp_header *icmph,
332 struct batadv_icmp_header *icmph, in batadv_socket_add_packet() argument
349 memcpy(&socket_packet->icmp_packet, icmph, len); in batadv_socket_add_packet()
357 if (!batadv_socket_client_hash[icmph->uid]) { in batadv_socket_add_packet()
387 void batadv_socket_receive_packet(struct batadv_icmp_header *icmph, in batadv_socket_receive_packet() argument
392 hash = batadv_socket_client_hash[icmph->uid]; in batadv_socket_receive_packet()
394 batadv_socket_add_packet(hash, icmph, icmp_len); in batadv_socket_receive_packet()
Dicmp_socket.h22 void batadv_socket_receive_packet(struct batadv_icmp_header *icmph,
32 batadv_socket_receive_packet(struct batadv_icmp_header *icmph, size_t icmp_len) in batadv_socket_receive_packet() argument
/net/netfilter/
Dnf_conntrack_proto_icmp.c208 const struct icmphdr *icmph; in nf_conntrack_icmpv4_error() local
212 icmph = skb_header_pointer(skb, dataoff, sizeof(_ih), &_ih); in nf_conntrack_icmpv4_error()
213 if (icmph == NULL) { in nf_conntrack_icmpv4_error()
232 if (icmph->type > NR_ICMP_TYPES) { in nf_conntrack_icmpv4_error()
238 if (icmph->type != ICMP_DEST_UNREACH && in nf_conntrack_icmpv4_error()
239 icmph->type != ICMP_SOURCE_QUENCH && in nf_conntrack_icmpv4_error()
240 icmph->type != ICMP_TIME_EXCEEDED && in nf_conntrack_icmpv4_error()
241 icmph->type != ICMP_PARAMETERPROB && in nf_conntrack_icmpv4_error()
242 icmph->type != ICMP_REDIRECT) in nf_conntrack_icmpv4_error()
248 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 (icmph->type != ICMP_DEST_UNREACH && in get_inner_hdr()
243 icmph->type != ICMP_SOURCE_QUENCH && in get_inner_hdr()
244 icmph->type != ICMP_TIME_EXCEEDED && in get_inner_hdr()
245 icmph->type != ICMP_PARAMETERPROB && in get_inner_hdr()
246 icmph->type != ICMP_REDIRECT) in get_inner_hdr()
Dnf_conntrack_proto_icmpv6.c151 if (rd_msg->icmph.icmp6_code != 0) in nf_conntrack_icmpv6_redirect()
/net/bridge/
Dbr_arp_nd_proxy.c236 if (m->icmph.icmp6_code != 0 || in br_is_nd_neigh_msg()
237 (m->icmph.icmp6_type != NDISC_NEIGHBOUR_SOLICITATION && in br_is_nd_neigh_msg()
238 m->icmph.icmp6_type != NDISC_NEIGHBOUR_ADVERTISEMENT)) in br_is_nd_neigh_msg()
318 na->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT; in br_nd_send()
319 na->icmph.icmp6_router = (n->flags & NTF_ROUTER) ? 1 : 0; in br_nd_send()
320 na->icmph.icmp6_override = 1; in br_nd_send()
321 na->icmph.icmp6_solicited = 1; in br_nd_send()
327 na->icmph.icmp6_cksum = csum_ipv6_magic(&pip6->saddr, in br_nd_send()
403 if (msg->icmph.icmp6_type == NDISC_NEIGHBOUR_ADVERTISEMENT && in br_do_suppress_nd()
404 !msg->icmph.icmp6_solicited) { in br_do_suppress_nd()
[all …]
/net/ipv6/
Dping.c130 pfh.icmph.type = user_icmph.icmp6_type; in ping_v6_sendmsg()
131 pfh.icmph.code = user_icmph.icmp6_code; in ping_v6_sendmsg()
132 pfh.icmph.checksum = 0; in ping_v6_sendmsg()
133 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v6_sendmsg()
134 pfh.icmph.un.echo.sequence = user_icmph.icmp6_sequence; in ping_v6_sendmsg()
152 (struct icmp6hdr *)&pfh.icmph, len); in ping_v6_sendmsg()
Dndisc.c557 .icmph = { in ndisc_send_na()
631 .icmph = { in ndisc_send_ns()
691 .icmph = { in ndisc_send_rs()
978 msg->icmph.icmp6_solicited) { in ndisc_recv_na()
987 if (!msg->icmph.icmp6_solicited && idev && in ndisc_recv_na()
1048 msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE, in ndisc_recv_na()
1050 (msg->icmph.icmp6_override ? NEIGH_UPDATE_F_OVERRIDE : 0)| in ndisc_recv_na()
1052 (msg->icmph.icmp6_router ? NEIGH_UPDATE_F_ISROUTER : 0), in ndisc_recv_na()
1255 (ra_msg->icmph.icmp6_addrconf_managed ? in ndisc_router_discovery()
1257 (ra_msg->icmph.icmp6_addrconf_other ? in ndisc_router_discovery()
[all …]
Ddatagram.c291 struct icmp6hdr *icmph = icmp6_hdr(skb); in ipv6_icmp_error() local
306 serr->ee.ee_type = icmph->icmp6_type; in ipv6_icmp_error()
307 serr->ee.ee_code = icmph->icmp6_code; in ipv6_icmp_error()
311 serr->addr_offset = (u8 *)&(((struct ipv6hdr *)(icmph + 1))->daddr) - in ipv6_icmp_error()
Dicmp.c689 struct icmp6hdr *icmph = icmp6_hdr(skb); in icmpv6_echo_reply() local
712 memcpy(&tmp_hdr, icmph, sizeof(tmp_hdr)); in icmpv6_echo_reply()
Droute.c2324 const struct icmp6hdr *icmph; in ip6_multipath_l3_keys() local
2331 icmph = skb_header_pointer(skb, skb_transport_offset(skb), in ip6_multipath_l3_keys()
2333 if (!icmph) in ip6_multipath_l3_keys()
2336 if (icmph->icmp6_type != ICMPV6_DEST_UNREACH && in ip6_multipath_l3_keys()
2337 icmph->icmp6_type != ICMPV6_PKT_TOOBIG && in ip6_multipath_l3_keys()
2338 icmph->icmp6_type != ICMPV6_TIME_EXCEED && in ip6_multipath_l3_keys()
2339 icmph->icmp6_type != ICMPV6_PARAMPROB) in ip6_multipath_l3_keys()
2343 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/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 switch (icmph->type) { in extract_icmp4_fields()
/net/bridge/netfilter/
Dnft_reject_bridge.c110 struct icmphdr *icmph; in nft_reject_br_send_v4_unreach() local
148 icmph = skb_put_zero(nskb, sizeof(struct icmphdr)); in nft_reject_br_send_v4_unreach()
149 icmph->type = ICMP_DEST_UNREACH; in nft_reject_br_send_v4_unreach()
150 icmph->code = code; in nft_reject_br_send_v4_unreach()
154 csum = csum_partial((void *)icmph, len + sizeof(struct icmphdr), 0); in nft_reject_br_send_v4_unreach()
155 icmph->checksum = csum_fold(csum); in nft_reject_br_send_v4_unreach()
/net/netfilter/ipvs/
Dip_vs_core.c99 #define icmp_id(icmph) (((icmph)->un).echo.id) argument
100 #define icmpv6_id(icmph) (icmph->icmp6_dataun.u_echo.identifier) argument
771 struct icmphdr *icmph = (struct icmphdr *)(skb_network_header(skb) + in ip_vs_nat_icmp() local
773 struct iphdr *ciph = (struct iphdr *)(icmph + 1); in ip_vs_nat_icmp()
799 icmph->checksum = 0; in ip_vs_nat_icmp()
800 icmph->checksum = ip_vs_checksum_complete(skb, icmp_offset); in ip_vs_nat_icmp()
819 struct icmp6hdr *icmph; in ip_vs_nat_icmp_v6() local
824 icmph = (struct icmp6hdr *)(skb_network_header(skb) + icmp_offset); in ip_vs_nat_icmp_v6()
853 icmph->icmp6_cksum = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, in ip_vs_nat_icmp_v6()