This commit is contained in:
2025-05-13 09:50:16 -04:00
parent a705c42e4f
commit fad9f5068b

View File

@ -285,6 +285,8 @@ int main(int argc, char** argv) {
continue;
}
// if (icmp_reply->code) {}
int old_checksum = icmp_reply->checksum;
icmp_reply->checksum = 0;
@ -310,11 +312,11 @@ int main(int argc, char** argv) {
max = (((max) > (tmp)) ? (max) : (tmp));
avg += tmp;
stddev += tmp * tmp;
// if (icmp_reply->un.echo.sequence <= recvd) {
// rept++;
// } else {
recvd++;
// }
if (icmp_reply->un.echo.sequence < recvd) {
rept++;
} else {
recvd++;
}
}
} else if (ret == 0) {
printf("No reply received within the timeout period\n");