Home
last modified time | relevance | path

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

/linux/tools/testing/selftests/bpf/progs/
H A Dxdping_kern.c65 struct icmphdr *icmph; in icmp_check() local
82 icmph = data + sizeof(*eth) + sizeof(*iph); in icmp_check()
84 if (icmph->type != type) in icmp_check()
96 struct icmphdr *icmph; in xdping_client() local
110 icmph = data + sizeof(*eth) + sizeof(*iph); in xdping_client()
116 if (!pinginfo || pinginfo->seq != icmph->un.echo.sequence) in xdping_client()
141 icmph->type = ICMP_ECHO; in xdping_client()
142 seq = bpf_htons(bpf_ntohs(icmph->un.echo.sequence) + 1); in xdping_client()
143 icmph->un.echo.sequence = seq; in xdping_client()
144 icmph->checksum = 0; in xdping_client()
[all …]
/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()
727 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()
294 const struct icmphdr *icmph; in iptunnel_pmtud_check_icmp() local
300 icmph = (void *)iph + iph->ihl * 4; in iptunnel_pmtud_check_icmp()
301 if (icmp_is_err(icmph->type)) in iptunnel_pmtud_check_icmp()
H A Draw.c82 struct icmphdr icmph; member
446 fl4->fl4_icmp_type = rfv->hdr.icmph.type; in raw_probe_proto_opt()
447 fl4->fl4_icmp_code = rfv->hdr.icmph.code; in raw_probe_proto_opt()
H A Droute.c1916 const struct icmphdr *icmph; in ip_multipath_l3_keys() local
1926 icmph = skb_header_pointer(skb, outer_iph->ihl * 4, sizeof(_icmph), in ip_multipath_l3_keys()
1928 if (!icmph) in ip_multipath_l3_keys()
1931 if (!icmp_is_err(icmph->type)) in ip_multipath_l3_keys()
3210 struct icmphdr *icmph; in inet_rtm_getroute_build_skb() local
3212 icmph = skb_put_zero(skb, sizeof(struct icmphdr)); in inet_rtm_getroute_build_skb()
3213 icmph->type = ICMP_ECHO; in inet_rtm_getroute_build_skb()
3214 icmph->code = 0; in inet_rtm_getroute_build_skb()
/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/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.c244 if (m->icmph.icmp6_code != 0 || in br_is_nd_neigh_msg()
245 (m->icmph.icmp6_type != NDISC_NEIGHBOUR_SOLICITATION && in br_is_nd_neigh_msg()
246 m->icmph.icmp6_type != NDISC_NEIGHBOUR_ADVERTISEMENT)) in br_is_nd_neigh_msg()
330 na->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT; in br_nd_send()
331 na->icmph.icmp6_router = (n->flags & NTF_ROUTER) ? 1 : 0; in br_nd_send()
332 na->icmph.icmp6_override = 1; in br_nd_send()
333 na->icmph.icmp6_solicited = 1; in br_nd_send()
339 na->icmph.icmp6_cksum = csum_ipv6_magic(&pip6->saddr, in br_nd_send()
421 msg->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) in br_do_suppress_nd()
424 if (msg->icmph.icmp6_type == NDISC_NEIGHBOUR_ADVERTISEMENT && in br_do_suppress_nd()
[all …]
/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()
/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.c563 .icmph = { in ndisc_send_na()
632 .icmph = { in ndisc_ns_create()
713 .icmph = { in ndisc_send_rs()
1014 msg->icmph.icmp6_solicited) { in ndisc_recv_na()
1024 if (!msg->icmph.icmp6_solicited && idev && in ndisc_recv_na()
1079 new_state = msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE; in ndisc_recv_na()
1110 (msg->icmph.icmp6_override ? NEIGH_UPDATE_F_OVERRIDE : 0)| in ndisc_recv_na()
1112 (msg->icmph.icmp6_router ? NEIGH_UPDATE_F_ISROUTER : 0), in ndisc_recv_na()
1309 (ra_msg->icmph.icmp6_addrconf_managed ? in ndisc_router_discovery()
1311 (ra_msg->icmph.icmp6_addrconf_other ? in ndisc_router_discovery()
[all …]
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()
H A Droute.c2368 const struct icmp6hdr *icmph; in ip6_multipath_l3_keys() local
2375 icmph = skb_header_pointer(skb, skb_transport_offset(skb), in ip6_multipath_l3_keys()
2377 if (!icmph) in ip6_multipath_l3_keys()
2380 if (!icmpv6_is_err(icmph->icmp6_type)) in ip6_multipath_l3_keys()
2384 skb_transport_offset(skb) + sizeof(*icmph), in ip6_multipath_l3_keys()
/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
931 struct icmphdr *icmph = (struct icmphdr *)(skb_network_header(skb) + in ip_vs_nat_icmp() local
933 struct iphdr *ciph = (struct iphdr *)(icmph + 1); in ip_vs_nat_icmp()
959 icmph->checksum = 0; in ip_vs_nat_icmp()
960 icmph->checksum = ip_vs_checksum_complete(skb, icmp_offset); in ip_vs_nat_icmp()
979 struct icmp6hdr *icmph; in ip_vs_nat_icmp_v6() local
984 icmph = (struct icmp6hdr *)(skb_network_header(skb) + icmp_offset); in ip_vs_nat_icmp_v6()
1013 icmph->icmp6_cksum = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, in ip_vs_nat_icmp_v6()
/linux/drivers/net/
H A Dvrf.c1212 const struct icmp6hdr *icmph; in ipv6_ndisc_frame() local
1215 icmph = skb_header_pointer(skb, sizeof(*iph), in ipv6_ndisc_frame()
1217 if (!icmph) in ipv6_ndisc_frame()
1220 switch (icmph->icmp6_type) { in ipv6_ndisc_frame()
/linux/drivers/net/vxlan/
H A Dvxlan_core.c2005 na->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT; in vxlan_na_create()
2006 na->icmph.icmp6_router = isrouter; in vxlan_na_create()
2007 na->icmph.icmp6_override = 1; in vxlan_na_create()
2008 na->icmph.icmp6_solicited = 1; in vxlan_na_create()
2014 na->icmph.icmp6_cksum = csum_ipv6_magic(&pip6->saddr, in vxlan_na_create()
2762 if (m->icmph.icmp6_code == 0 && in vxlan_xmit()
2763 m->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) in vxlan_xmit()