Subject: Simple question

From: imad <[email-masked]>
Date: Tue, 21 Sep 2004 07:30:49 +0500

i am new to sctp.
i have installed the rpms downloaded from the sctp website but still i
am unable to create a sctp socket.
can someone please write some simple steps required to create an sctp socket.

here is my program. it does compile successfully but the socket
function always return -1.
whats the problem.

#include <sys/socket.h>
#include <netinet/sctp.h>
#include <stdio.h>

int main() {

        int sd = socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP);

        printf("\n Socket: %d \n",sd);

        return 0;
}

-- 

Regards
Imad

---

From: Sridhar Samudrala <[email-masked]>
Date: Mon, 20 Sep 2004 20:13:32 -0700 (PDT)

> function always return -1.

I guess you are trying this on linux as you seem to be using the rpms from
lksctp website.

Do you have SCTP support built into the kernel or as a module? If it is
configured as a module, you need to load it using
modprobe sctp

-Sridhar