98: re = so_select(sd+1, &fds, NULL, NULL, &tv);
99: DEBUG_PRINT(("recv_icmp_echo_reply: so_select = %d(%d, %d)\n", re, MERCD(re), SERCD(re)));
100: if ( re < 0 ) {
105: re = so_recv(sd, buf, sizeof buf, 0);
106: DEBUG_PRINT(("recv_icmp_echo_reply: so_recv = %d(%d, %d)\n", re, MERCD(re), SERCD(re)));
107:
111: if ( (type != ICMP_ECHOREPLY && type != ICMP_TIMXCEED) || (p->icmp.icmp_type == ICMP_ECHOREPLY && (p->icmp.icmp_id != state->xid || p->icmp.icmp_seq != state->seq ) ) ) {
112: DEBUG_PRINT(("recv_icmp_echo_reply: type=%d, id=%x:%x, seq=%d:%d\n", type, p->icmp.icmp_id, state->xid, p->icmp.icmp_seq, state->seq));
113: break;
164: re = so_sendto(sd, &p, sizeof p, 0, (struct sockaddr*)&sa, sizeof sa);
165: DEBUG_PRINT(("send_icmp_echo_request: so_sendto = %d(%d, %d)\n", re, MERCD(re), SERCD(re)));
166:
179: sender = so_socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
180: DEBUG_PRINT(("ping: so_socket = %d(%d, %d)\n", sender, MERCD(sender), SERCD(sender)));
181: receiver = so_socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
182: DEBUG_PRINT(("ping: so_socket = %d(%d, %d)\n", receiver, MERCD(receiver), SERCD(receiver)));
183:
184: re = so_setsockopt(sender, IPPROTO_IP, IP_HDRINCL, &on, sizeof on);
185: DEBUG_PRINT(("ping: so_setsockopt = %d(%d, %d)\n", re, MERCD(re), SERCD(re)));
186:
206: sender = so_socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
207: DEBUG_PRINT(("traceroute: so_socket = %d(%d, %d)\n", sender, MERCD(sender), SERCD(sender)));
208: receiver = so_socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
209: DEBUG_PRINT(("traceroute: so_socket = %d(%d, %d)\n", receiver, MERCD(receiver), SERCD(receiver)));
210:
211: re = so_setsockopt(sender, IPPROTO_IP, IP_HDRINCL, &on, sizeof on);
212: DEBUG_PRINT(("traceroute: so_setsockopt = %d(%d, %d)\n", re, MERCD(re), SERCD(re)));
213: