[Planetlab-users] A problem with running nmap. Thanks!
Xin Hu
huxin at umich.edu
Thu Nov 17 03:26:49 EST 2005
Hi,
I am a new user of planetlab. I am trying to use nmap to do some experiments
but encounter a problem. I hope I can get some help or advice from you here.
Thanks!
After nmap is running, it shows following error message:
sendto in send_ip_packet: sendto(4, packet, 60, 0, 192.6.10.2, 16) =>
Operation not permitted
I read the previous archive and found that this problem may caused by using
raw packets which is not supported by planetlab. And I also read the VNET
document, but still cannot solve the problem. Some people say that the
socket must be binded to specific local port to send raw packet. I tried
this, but it still doesn't work. The binding code of nmap is:
/* We set the socket lingering so we will RST connection instead of wasting
bandwidth with the four step close */
void init_socket(int sd) {
struct linger l;
int res;
static int bind_failed=0;
struct sockaddr_storage ss;
size_t sslen;
l.l_onoff = 1;
l.l_linger = 0;
if (setsockopt(sd, SOL_SOCKET, SO_LINGER, (const char *) &l,
sizeof(struct linger)))
{
fprintf(stderr, "Problem setting socket SO_LINGER, errno: %d\n",
socket_errno());
perror("setsockopt");
}
if (o.spoofsource && !bind_failed)
{
o.SourceSockAddr(&ss, &sslen);
res=bind(sd, (struct sockaddr*)&ss, sslen);
if (res<0)
{
fprintf(stderr, "init_socket: Problem binding source address
(%s), errno :%d\n", inet_socktop(&ss), socket_errno());
perror("bind");
bind_failed=1;
}
}
}
Can anybody give me some advice on how to solve this problem? Thank you very
much! Any suggestions would be greatly appreciated!
Sincerely yours,
Xin Hu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.planet-lab.org/pipermail/users/attachments/20051117/3d169306/attachment.html
More information about the Users
mailing list