aboutsummaryrefslogtreecommitdiff
path: root/networking/ping.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-06-16 13:37:59 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-06-16 13:37:59 +0000
commit7b72fc12000c878e11d5f0b245f83c0d71b29f58 (patch)
treeae60975a107756cb3b7b6dd17e8f0d41427daed6 /networking/ping.c
parent53a0e971960a520bd859b8aac6dbebec2045115f (diff)
downloadbusybox-7b72fc12000c878e11d5f0b245f83c0d71b29f58.tar.gz
pscan: new applet (portscanner). ~1350 bytes. By Tito <farmatito@tiscali.it>
wget: lift 256 chars limitation on terminal width
Diffstat (limited to 'networking/ping.c')
-rw-r--r--networking/ping.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/networking/ping.c b/networking/ping.c
index 6b5045eb3..e94b7914f 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -341,7 +341,12 @@ static void sendping4(int junk ATTRIBUTE_UNUSED)
pkt->icmp_cksum = 0;
pkt->icmp_seq = htons(ntransmitted); /* don't ++ here, it can be a macro */
pkt->icmp_id = myid;
+
+// I can't fucking believe someone thought it's okay to do it like this...
+// where's hton? Where is a provision for different word size, structure padding, etc??
+// FIXME!
gettimeofday((struct timeval *) &pkt->icmp_dun, NULL);
+
pkt->icmp_cksum = in_cksum((unsigned short *) pkt, datalen + ICMP_MINLEN);
sendping_tail(sendping4, pkt, datalen + ICMP_MINLEN);
@@ -356,6 +361,8 @@ static void sendping6(int junk ATTRIBUTE_UNUSED)
pkt->icmp6_cksum = 0;
pkt->icmp6_seq = htons(ntransmitted); /* don't ++ here, it can be a macro */
pkt->icmp6_id = myid;
+
+// FIXME!
gettimeofday((struct timeval *) &pkt->icmp6_data8[4], NULL);
sendping_tail(sendping6, pkt, datalen + sizeof(struct icmp6_hdr));