deddihp
deddihp

Reputation: 663

build sctp protocol ss7 openss7

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..

Upvotes: 0

Views: 1373

Answers (2)

Iwan Aucamp
Iwan Aucamp

Reputation: 1705

Assuming you are using linux:

  1. Ensure CONFIG_IP_SCTP=m or CONFIG_IP_SCTP=y in kernel config
  2. It is a good idea to install http://lksctp.sourceforge.net/

Upvotes: 0

Aditya Sehgal
Aditya Sehgal

Reputation: 2893

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.

Upvotes: -1

Related Questions