Durkheim
January 27th, 2006, 11:31 AM
Hello,
The thing I want to do is: declare myself an ip header, a icmp header (to redo a ping style command), and send them trough a socket.
To do so, I've tried to compile something like this:
if (socket(PF_INET,SOCK_RAW,0) == -1)
{
cout<<"error"<<endl;
perror ("socket");
}
else
{
cout<<"cool"<<endl;
}
The answer at run time :
error
socket: Socket type not supported
I'm using breezy badger. I'm wondering if this is a os related problem, or if I have to specifiy a protcol at the end (if this is the case, wich ones are supported?)... I'm really lost here.
I've been eading man pages for a few days but can't find the answer... Ay help appreciated. Thanks in advance!
David
The thing I want to do is: declare myself an ip header, a icmp header (to redo a ping style command), and send them trough a socket.
To do so, I've tried to compile something like this:
if (socket(PF_INET,SOCK_RAW,0) == -1)
{
cout<<"error"<<endl;
perror ("socket");
}
else
{
cout<<"cool"<<endl;
}
The answer at run time :
error
socket: Socket type not supported
I'm using breezy badger. I'm wondering if this is a os related problem, or if I have to specifiy a protcol at the end (if this is the case, wich ones are supported?)... I'm really lost here.
I've been eading man pages for a few days but can't find the answer... Ay help appreciated. Thanks in advance!
David