Home
last modified time | relevance | path

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

/linux-4.4.14/net/ipv4/
Dicmp.c111 struct icmphdr icmph; member
349 if (icmp_pointers[icmp_param->data.icmph.type].error) in icmp_glue_bits()
369 struct icmphdr *icmph = icmp_hdr(skb); in icmp_push_reply() local
377 (char *)icmph, in icmp_push_reply()
379 icmph->checksum = csum_fold(csum); in icmp_push_reply()
408 icmp_param->data.icmph.checksum = 0; in icmp_reply()
435 if (icmpv4_xrlim_allow(net, rt, &fl4, icmp_param->data.icmph.type, in icmp_reply()
436 icmp_param->data.icmph.code)) in icmp_reply()
690 icmp_param->data.icmph.type = type; in icmp_send()
691 icmp_param->data.icmph.code = code; in icmp_send()
[all …]
Dping.c488 struct icmphdr *icmph; in ping_err() local
501 icmph = (struct icmphdr *)(skb->data + offset); in ping_err()
506 icmph = (struct icmphdr *) (skb->data + offset); in ping_err()
513 if (!ping_supported(family, icmph->type, icmph->code)) in ping_err()
517 skb->protocol, type, code, ntohs(icmph->un.echo.id), in ping_err()
518 ntohs(icmph->un.echo.sequence)); in ping_err()
520 sk = ping_lookup(net, skb, ntohs(icmph->un.echo.id)); in ping_err()
586 info, (u8 *)icmph); in ping_err()
590 info, (u8 *)icmph); in ping_err()
648 pfh->wcheck = csum_partial((char *)&pfh->icmph, in ping_v4_push_pending_frames()
[all …]
Draw.c86 struct icmphdr icmph; member
449 fl4->fl4_icmp_type = rfv->hdr.icmph.type; in raw_probe_proto_opt()
450 fl4->fl4_icmp_code = rfv->hdr.icmph.code; in raw_probe_proto_opt()
Droute.c1703 const struct icmphdr *icmph; in ip_multipath_icmp_hash() local
1710 icmph = skb_header_pointer(skb, outer_iph->ihl * 4, sizeof(_icmph), in ip_multipath_icmp_hash()
1712 if (!icmph) in ip_multipath_icmp_hash()
1715 if (icmph->type != ICMP_DEST_UNREACH && in ip_multipath_icmp_hash()
1716 icmph->type != ICMP_REDIRECT && in ip_multipath_icmp_hash()
1717 icmph->type != ICMP_TIME_EXCEEDED && in ip_multipath_icmp_hash()
1718 icmph->type != ICMP_PARAMETERPROB) { in ip_multipath_icmp_hash()
/linux-4.4.14/net/sched/
Dact_nat.c190 struct icmphdr *icmph; in tcf_nat() local
192 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + noff)) in tcf_nat()
195 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat()
197 if ((icmph->type != ICMP_DEST_UNREACH) && in tcf_nat()
198 (icmph->type != ICMP_TIME_EXCEEDED) && in tcf_nat()
199 (icmph->type != ICMP_PARAMETERPROB)) in tcf_nat()
202 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph) + in tcf_nat()
206 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat()
207 iph = (void *)(icmph + 1); in tcf_nat()
217 !skb_clone_writable(skb, ihl + sizeof(*icmph) + in tcf_nat()
[all …]
Dact_csum.c119 struct icmphdr *icmph; in tcf_csum_ipv4_icmp() local
121 icmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmph)); in tcf_csum_ipv4_icmp()
122 if (icmph == NULL) in tcf_csum_ipv4_icmp()
125 icmph->checksum = 0; in tcf_csum_ipv4_icmp()
126 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp()
127 icmph->checksum = csum_fold(skb->csum); in tcf_csum_ipv4_icmp()
/linux-4.4.14/net/batman-adv/
Drouting.c218 struct batadv_icmp_header *icmph; in batadv_recv_my_icmp_packet() local
221 icmph = (struct batadv_icmp_header *)skb->data; in batadv_recv_my_icmp_packet()
223 switch (icmph->msg_type) { in batadv_recv_my_icmp_packet()
231 batadv_socket_receive_packet(icmph, skb->len); in batadv_recv_my_icmp_packet()
240 orig_node = batadv_orig_hash_find(bat_priv, icmph->orig); in batadv_recv_my_icmp_packet()
248 icmph = (struct batadv_icmp_header *)skb->data; in batadv_recv_my_icmp_packet()
250 ether_addr_copy(icmph->dst, icmph->orig); in batadv_recv_my_icmp_packet()
251 ether_addr_copy(icmph->orig, primary_if->net_dev->dev_addr); in batadv_recv_my_icmp_packet()
252 icmph->msg_type = BATADV_ECHO_REPLY; in batadv_recv_my_icmp_packet()
253 icmph->ttl = BATADV_TTL; in batadv_recv_my_icmp_packet()
[all …]
Dicmp_socket.c55 struct batadv_icmp_header *icmph,
347 struct batadv_icmp_header *icmph, in batadv_socket_add_packet() argument
364 memcpy(&socket_packet->icmp_packet, icmph, len); in batadv_socket_add_packet()
372 if (!batadv_socket_client_hash[icmph->uid]) { in batadv_socket_add_packet()
402 void batadv_socket_receive_packet(struct batadv_icmp_header *icmph, in batadv_socket_receive_packet() argument
407 hash = batadv_socket_client_hash[icmph->uid]; in batadv_socket_receive_packet()
409 batadv_socket_add_packet(hash, icmph, icmp_len); in batadv_socket_receive_packet()
Dicmp_socket.h31 void batadv_socket_receive_packet(struct batadv_icmp_header *icmph,
/linux-4.4.14/net/netfilter/
Dxt_HMARK.c234 const struct icmphdr *icmph; in get_inner_hdr() local
238 icmph = skb_header_pointer(skb, *nhoff + iphsz, sizeof(_ih), &_ih); in get_inner_hdr()
239 if (icmph == NULL || icmph->type > NR_ICMP_TYPES) in get_inner_hdr()
243 if (icmph->type != ICMP_DEST_UNREACH && in get_inner_hdr()
244 icmph->type != ICMP_SOURCE_QUENCH && in get_inner_hdr()
245 icmph->type != ICMP_TIME_EXCEEDED && in get_inner_hdr()
246 icmph->type != ICMP_PARAMETERPROB && in get_inner_hdr()
247 icmph->type != ICMP_REDIRECT) in get_inner_hdr()
Dxt_socket.c48 struct icmphdr *icmph, _icmph; in extract_icmp4_fields() local
51 icmph = skb_header_pointer(skb, outside_hdrlen, in extract_icmp4_fields()
53 if (icmph == NULL) in extract_icmp4_fields()
56 switch (icmph->type) { in extract_icmp4_fields()
274 struct icmp6hdr *icmph, _icmph; in extract_icmp6_fields() local
280 icmph = skb_header_pointer(skb, outside_hdrlen, in extract_icmp6_fields()
282 if (icmph == NULL) in extract_icmp6_fields()
285 if (icmph->icmp6_type & ICMPV6_INFOMSG_MASK) in extract_icmp6_fields()
/linux-4.4.14/net/ipv4/netfilter/
Dnf_conntrack_proto_icmp.c186 const struct icmphdr *icmph; in icmp_error() local
190 icmph = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_ih), &_ih); in icmp_error()
191 if (icmph == NULL) { in icmp_error()
213 if (icmph->type > NR_ICMP_TYPES) { in icmp_error()
221 if (icmph->type != ICMP_DEST_UNREACH && in icmp_error()
222 icmph->type != ICMP_SOURCE_QUENCH && in icmp_error()
223 icmph->type != ICMP_TIME_EXCEEDED && in icmp_error()
224 icmph->type != ICMP_PARAMETERPROB && in icmp_error()
225 icmph->type != ICMP_REDIRECT) in icmp_error()
/linux-4.4.14/net/ipv6/
Dping.c161 pfh.icmph.type = user_icmph.icmp6_type; in ping_v6_sendmsg()
162 pfh.icmph.code = user_icmph.icmp6_code; in ping_v6_sendmsg()
163 pfh.icmph.checksum = 0; in ping_v6_sendmsg()
164 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v6_sendmsg()
165 pfh.icmph.un.echo.sequence = user_icmph.icmp6_sequence; in ping_v6_sendmsg()
184 (struct icmp6hdr *) &pfh.icmph, in ping_v6_sendmsg()
Dndisc.c520 .icmph = { in ndisc_send_na()
585 .icmph = { in ndisc_send_ns()
637 .icmph = { in ndisc_send_rs()
900 msg->icmph.icmp6_solicited) { in ndisc_recv_na()
962 msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE, in ndisc_recv_na()
964 (msg->icmph.icmp6_override ? NEIGH_UPDATE_F_OVERRIDE : 0)| in ndisc_recv_na()
966 (msg->icmph.icmp6_router ? NEIGH_UPDATE_F_ISROUTER : 0)); in ndisc_recv_na()
1166 (ra_msg->icmph.icmp6_addrconf_managed ? in ndisc_router_discovery()
1168 (ra_msg->icmph.icmp6_addrconf_other ? in ndisc_router_discovery()
1193 lifetime = ntohs(ra_msg->icmph.icmp6_rt_lifetime); in ndisc_router_discovery()
[all …]
Ddatagram.c238 struct icmp6hdr *icmph = icmp6_hdr(skb); in ipv6_icmp_error() local
253 serr->ee.ee_type = icmph->icmp6_type; in ipv6_icmp_error()
254 serr->ee.ee_code = icmph->icmp6_code; in ipv6_icmp_error()
258 serr->addr_offset = (u8 *)&(((struct ipv6hdr *)(icmph + 1))->daddr) - in ipv6_icmp_error()
Dicmp.c560 struct icmp6hdr *icmph = icmp6_hdr(skb); in icmpv6_echo_reply() local
577 memcpy(&tmp_hdr, icmph, sizeof(tmp_hdr)); in icmpv6_echo_reply()
/linux-4.4.14/net/bridge/netfilter/
Dnft_reject_bridge.c83 struct icmphdr *icmph; in nft_reject_br_send_v4_unreach() local
125 icmph = (struct icmphdr *)skb_put(nskb, sizeof(struct icmphdr)); in nft_reject_br_send_v4_unreach()
126 memset(icmph, 0, sizeof(*icmph)); in nft_reject_br_send_v4_unreach()
127 icmph->type = ICMP_DEST_UNREACH; in nft_reject_br_send_v4_unreach()
128 icmph->code = code; in nft_reject_br_send_v4_unreach()
133 csum = csum_partial((void *)icmph, len + sizeof(struct icmphdr), 0); in nft_reject_br_send_v4_unreach()
134 icmph->checksum = csum_fold(csum); in nft_reject_br_send_v4_unreach()
/linux-4.4.14/include/net/
Dndisc.h65 struct icmp6hdr icmph; member
71 struct icmp6hdr icmph; member
76 struct icmp6hdr icmph; member
82 struct icmp6hdr icmph; member
Dping.h61 struct icmphdr icmph; member
/linux-4.4.14/net/netfilter/ipvs/
Dip_vs_core.c77 #define icmp_id(icmph) (((icmph)->un).echo.id) argument
78 #define icmpv6_id(icmph) (icmph->icmp6_dataun.u_echo.identifier) argument
736 struct icmphdr *icmph = (struct icmphdr *)(skb_network_header(skb) + in ip_vs_nat_icmp() local
738 struct iphdr *ciph = (struct iphdr *)(icmph + 1); in ip_vs_nat_icmp()
764 icmph->checksum = 0; in ip_vs_nat_icmp()
765 icmph->checksum = ip_vs_checksum_complete(skb, icmp_offset); in ip_vs_nat_icmp()
784 struct icmp6hdr *icmph; in ip_vs_nat_icmp_v6() local
789 icmph = (struct icmp6hdr *)(skb_network_header(skb) + icmp_offset); in ip_vs_nat_icmp_v6()
818 icmph->icmp6_cksum = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, in ip_vs_nat_icmp_v6()
/linux-4.4.14/drivers/net/
Dvrf.c126 const struct icmp6hdr *icmph; in check_ipv6_frame() local
129 icmph = skb_header_pointer(skb, sizeof(_ipv6h), in check_ipv6_frame()
131 if (!icmph) in check_ipv6_frame()
134 switch (icmph->icmp6_type) { in check_ipv6_frame()
Dvxlan.c1499 na->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT; in vxlan_na_create()
1500 na->icmph.icmp6_router = isrouter; in vxlan_na_create()
1501 na->icmph.icmp6_override = 1; in vxlan_na_create()
1502 na->icmph.icmp6_solicited = 1; in vxlan_na_create()
1508 na->icmph.icmp6_cksum = csum_ipv6_magic(&pip6->saddr, in vxlan_na_create()
1539 if (msg->icmph.icmp6_code != 0 || in neigh_reduce()
1540 msg->icmph.icmp6_type != NDISC_NEIGHBOUR_SOLICITATION) in neigh_reduce()
2163 if (msg->icmph.icmp6_code == 0 && in vxlan_xmit()
2164 msg->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) in vxlan_xmit()
/linux-4.4.14/drivers/net/usb/
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-4.4.14/drivers/net/ipvlan/
Dipvlan_core.c315 if (ndmh->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) { in ipvlan_addr_lookup()