Lines Matching refs:icmp_param

287 	struct icmp_bxm *icmp_param = (struct icmp_bxm *)p;  in icmp_glue_bits()  local
291 if (icmp_pointers[icmp_param->data.icmph.type].error) in icmp_glue_bits()
292 nf_ct_attach(skb, icmp_param->skb); in icmp_glue_bits()
295 icmp_param->csum=skb_copy_and_csum_bits(icmp_param->skb, in icmp_glue_bits()
296 icmp_param->offset+(offset-icmp_param->head_len), in icmp_glue_bits()
297 to, fraglen,icmp_param->csum); in icmp_glue_bits()
306 csum = csum_partial_copy_nocheck((void *)&icmp_param->data, in icmp_glue_bits()
307 to, icmp_param->head_len, in icmp_glue_bits()
308 icmp_param->csum); in icmp_glue_bits()
309 csum=skb_copy_and_csum_bits(icmp_param->skb, in icmp_glue_bits()
310 icmp_param->offset, in icmp_glue_bits()
311 to+icmp_param->head_len, in icmp_glue_bits()
312 fraglen-icmp_param->head_len, in icmp_glue_bits()
323 static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb) in icmp_reply() argument
330 if (ip_options_echo(&icmp_param->replyopts, skb)) in icmp_reply()
336 icmp_param->data.icmph.checksum=0; in icmp_reply()
337 icmp_param->csum=0; in icmp_reply()
338 icmp_out_count(icmp_param->data.icmph.type); in icmp_reply()
344 if (icmp_param->replyopts.optlen) { in icmp_reply()
345 ipc.opt = &icmp_param->replyopts; in icmp_reply()
347 daddr = icmp_param->replyopts.faddr; in icmp_reply()
351 if (icmpv4_xrlim_allow(rt, icmp_param->data.icmph.type, in icmp_reply()
352 icmp_param->data.icmph.code)) { in icmp_reply()
353 ip_build_xmit(sk, icmp_glue_bits, icmp_param, in icmp_reply()
354 icmp_param->data_len+icmp_param->head_len, in icmp_reply()
377 struct icmp_bxm icmp_param; in icmp_send() local
469 if (ip_options_echo(&icmp_param.replyopts, skb_in)) in icmp_send()
477 icmp_param.data.icmph.type=type; in icmp_send()
478 icmp_param.data.icmph.code=code; in icmp_send()
479 icmp_param.data.icmph.un.gateway = info; in icmp_send()
480 icmp_param.data.icmph.checksum=0; in icmp_send()
481 icmp_param.csum=0; in icmp_send()
482 icmp_param.skb=skb_in; in icmp_send()
483 icmp_param.offset=skb_in->nh.raw - skb_in->data; in icmp_send()
484 icmp_out_count(icmp_param.data.icmph.type); in icmp_send()
488 ipc.opt = &icmp_param.replyopts; in icmp_send()
489 if (icmp_param.replyopts.srr) { in icmp_send()
491 if (ip_route_output(&rt, icmp_param.replyopts.faddr, saddr, RT_TOS(tos), 0)) in icmp_send()
503 room -= sizeof(struct iphdr) + icmp_param.replyopts.optlen; in icmp_send()
506 icmp_param.data_len=skb_in->len-icmp_param.offset; in icmp_send()
507 if (icmp_param.data_len > room) in icmp_send()
508 icmp_param.data_len = room; in icmp_send()
509 icmp_param.head_len = sizeof(struct icmphdr); in icmp_send()
511 ip_build_xmit(icmp_socket->sk, icmp_glue_bits, &icmp_param, in icmp_send()
512 icmp_param.data_len+sizeof(struct icmphdr), in icmp_send()
726 struct icmp_bxm icmp_param; in icmp_echo() local
728 icmp_param.data.icmph=*skb->h.icmph; in icmp_echo()
729 icmp_param.data.icmph.type=ICMP_ECHOREPLY; in icmp_echo()
730 icmp_param.skb=skb; in icmp_echo()
731 icmp_param.offset=0; in icmp_echo()
732 icmp_param.data_len=skb->len; in icmp_echo()
733 icmp_param.head_len=sizeof(struct icmphdr); in icmp_echo()
734 icmp_reply(&icmp_param, skb); in icmp_echo()
749 struct icmp_bxm icmp_param; in icmp_timestamp() local
764 icmp_param.data.times[1] = htonl((tv.tv_sec % 86400) * 1000 + tv.tv_usec / 1000); in icmp_timestamp()
765 icmp_param.data.times[2] = icmp_param.data.times[1]; in icmp_timestamp()
766 if (skb_copy_bits(skb, 0, &icmp_param.data.times[0], 4)) in icmp_timestamp()
768 icmp_param.data.icmph=*skb->h.icmph; in icmp_timestamp()
769 icmp_param.data.icmph.type=ICMP_TIMESTAMPREPLY; in icmp_timestamp()
770 icmp_param.data.icmph.code=0; in icmp_timestamp()
771 icmp_param.skb=skb; in icmp_timestamp()
772 icmp_param.offset=0; in icmp_timestamp()
773 icmp_param.data_len=0; in icmp_timestamp()
774 icmp_param.head_len=sizeof(struct icmphdr)+12; in icmp_timestamp()
775 icmp_reply(&icmp_param, skb); in icmp_timestamp()