SCTP Discussions

Text archives Help


[SCTP-Discussion] having problem in creating raw socket


Chronological Thread 
  • From: "Suchi Sahoo" <suchi_s AT hotmail.com>
  • To: discussion AT sctp.de
  • Subject: [SCTP-Discussion] having problem in creating raw socket
  • Date: Sat Jun 2 14:11:00 2001
  • List-id: SCTP Discussions <discussion.sctp.de>

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


Get your FREE download of MSN Explorer at http://explorer.msn.com


  • [SCTP-Discussion] having problem in creating raw socket, Suchi Sahoo, 06/02/2001

Archive powered by MHonArc 2.6.19+.

Top of page