hping2 on Intel error
hping2 on Intel error
- Subject: hping2 on Intel error
- From: James Reynolds <email@hidden>
- Date: Fri, 23 Jun 2006 16:07:33 -0600
I've compiled hping2 rc3 (http://www.hping.org/) on an Intel box
(10.4.6, Xcode 2.3) and I get this error when running it:
[send_ip] sendto: Invalid argument
If I run it with ktrace, I get this:
1704 hping2 CALL sendto(0x4,0x5004d0,0x28,0,0x152d0,0x10)
1704 hping2 RET sendto -1 errno 22 Invalid argument
1704 hping2 CALL writev(0x2,0xbffff2b0,0x4)
1704 hping2 GIO fd 2 wrote 35 bytes
"[send_ip] sendto: Invalid argument
"
When taking the exact same code and compiling it on PPC (10.4.6,
Xcode 2.3), it works, and here is the ktrace:
3433 hping2 CALL sendto(0x3,0x500470,0x28,0,0x17500,0x10)
3433 hping2 GIO fd 3 wrote 40 bytes
"E\0\0(=\M-I\0\0@\^F\0\0\M^[a\^P+G'I\M^A\by\0Q)\M-^\0P-\M-f\M^Y\M-)P\^B\^B\0w&\0\0"
3433 hping2 RET sendto 40/0x28
Here is the sendto code in hping (in the file sendip.c):
result = sendto(sockraw, packet, packetsize, 0,
(struct sockaddr*)&remote, sizeof(remote));
I also found a confirmation of this here (search for hping):
http://www.opendarwin.org/pipermail/darwinports-bugs/2006-May.txt
This looks like an Intel OS X bug to me.
Is there a way around it? The darwin sources for Apple's
network_cmds seems to show similar sendto usage:
i = sendto(s, (char *)packet, cc, 0, (struct sockaddr *)&whereto,
sizeof(whereto));
And the Apple ping works on Intel... so I'm not sure what Apple is
doing different from hping. Anyway, OS bug or not, I'm hoping I can
at least find a workaround. Anyone have any ideas?
--
Thanks,
James Reynolds - University of Utah - Student Computing Labs - 801-585-9811
james(a)scl.utah.edu - james(a)magnusviri.com - http://james.magnusviri.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden