tags:

views:

65

answers:

1

hello,
I try to make an ss7 application using openss7 and sctp.
I made some simple application using SCTP. the part of the source code is like below :

    sock_srvr = socket(PF_INET, SOCK_DGRAM, IPPROTO_SCTP);
    if ( sock_srvr == -1 ) {
        perror("socket");
        exit(0);    
    }

and it return

socket: Protocol not supported

do you have any suggestion ?.
Is there anyone who have experience with openss7 before ?

Thanks..

A: 

Which OS is this? SCTP is not natively supported on various OS. Only latest versions of Solaris support SCTP out of box. In linux, you might have to install a package.

In addition, your socket system call is wrong.

sock_srvr = socket(PF_INET, **SOCK_STREAM**, IPPROTO_SCTP);

SCTP is a stream based protocol just like TCP.

Aditya Sehgal