1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-22 15:39:03 +00:00

Add a comment explaining why we can unconditionally set the id and seq

fields in build_icmp_raw, even though not all ICMP types have them. All
the types handled by the function do have them, and in the same place.
This commit is contained in:
david
2010-12-02 22:46:56 +00:00
parent c1daed771c
commit bc55d41b9a

View File

@@ -635,7 +635,8 @@ u8 *build_icmp_raw(const struct in_addr *source,
memset(datastart, 0, MIN(dlen, datalen)); memset(datastart, 0, MIN(dlen, datalen));
} }
/* Fill out the ping packet */ /* Fill out the ping packet. All the ICMP types handled by this function have
the id and seq fields. */
pingpkt.id = htons(id); pingpkt.id = htons(id);
pingpkt.seq = htons(seq); pingpkt.seq = htons(seq);
pingpkt.checksum = 0; pingpkt.checksum = 0;