Lines Matching refs:icmp
77 struct icmp *icmp;
113 * create the ICMP request
115 icmp = (struct icmp *) sendbuf;
116 icmp->icmp_type = ICMP_ECHO;
117 icmp->icmp_code = 0;
118 icmp->icmp_id = htons(pid);
119 icmp->icmp_seq = htons(seq);
122 memcpy(icmp->icmp_data, &tv, sizeof(tv));
124 icmp->icmp_cksum = 0;
125 icmp->icmp_cksum = in_cksum((u_short *)icmp, plen);
140 NET_ThrowNew(env, errno, "Can't send ICMP packet");
154 icmp = (struct icmp *) (recvbuf + hlen1);
160 if (icmplen >= 8 && icmp->icmp_type == ICMP_ECHOREPLY
161 && (ntohs(icmp->icmp_id) == pid)) {
240 * Let's try to create a RAW socket to send ICMP packets