LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Socket type not supported error for IPPROTO_SCTP (https://www.linuxquestions.org/questions/linux-newbie-8/socket-type-not-supported-error-for-ipproto_sctp-621263/)

praveendandin 02-15-2008 01:04 AM

Socket type not supported error for IPPROTO_SCTP
 
Hi all,
This is my first query to this group.

When I try with the following program :
int main(int argc, char **argv)
4 {
5 int sock_fd, msg_flags;
6 char readbuf [BUFFSIZE];
7 struct sockaddr_in servaddr, cliaddr;
8 struct sctp_sndrcvinfo sri;
9 struct sctp_event_subscribe evnts;
10 int stream_increment = 1;
11 socklen_t len;
12 size_t rd_sz;

13 if (argc == 2)
14 stream_increment = atoi (argv[1]);
15 sock_fd = Socket (AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);16 bzero (&servaddr, sizeof(servaddr));
17 servaddr.sin_family = AF_INET;

SCTP socket is not created and the error generated is "Socket type not supported".

I am using the following kernel version:

(sctpdemo)$ uname -a
Linux titan 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux

Please let me know the following:
1) Should I install any RPM so that SCTP socket type is supported?
2) If RPM is to be installed then please let me know the version of that RPM for the kernel I have and its link where can I get that RPM?
3) Any additional changes that I should make so that the socket is created successfully?

Kindly respond to this query as soon as possible as I am stuck up at first level of SCTP itself.

Thanks in advance,
Praveen Dandin

gaurav_katiyar 03-06-2008 08:21 AM

Try this command
$ modprobe sctp

bkapashi 06-09-2008 09:34 AM

Hi,
I am also getting the same error. I have installed the source forge open source for the SCTP. Even the "make v4test" from the sctp source directory is also giving the same error.


Regards,
bkapashi


All times are GMT -5. The time now is 09:19 AM.