Hi,
I'm having problem when I create a raw socket from SCTP layer to IP. It's giving me segmentation fault at the line where I create the socket evenif I have root access.
The piece of code ( in linux platform) is like this:
------
// create a raw socket
if( (rawsd = socket( PF_INET, SOCK_RAW, 132 )) < 0)--- segmentation fault here
{
if(errno == EPERM)
{
printf("\n must have root access to create the raw socket\n");
exit(-1);
}
printf("\n Can't create the socket");
exit(-1);
}
printf("\n created the raw socket");
----------
It would be a great help if you can let me know where I'm doing wrong.
Thanks & regards,
Suchismita