Support of SCTP on Ubuntu 14.04

I am developing an application that will make use of some of the SCTP (Stream Control Transmission Protocol) APIs like sctp_bindx, sctp_connectx etc.

My kernel version is 3.13.0-49-generic.

If I try to compile my code, I get

fatal error: netinet/sctp.h: no such file or directory.

If I install lksctp-tools package then my code gets compiled.

Can I use the APIs without installing any libsctp library ? Since I read that SCTP is supported by kenel versions > 2.1

2 Answers

At least for 14.04, apt-file says:

[romano:~] % apt-file search netinet/sctp.h
libsctp-dev: /usr/include/netinet/sctp.h

so to compile any code that #includes the file sctp.h you need to install the package libsctp-dev and its dependences via

sudo apt-get install libsctp-dev

If you want to do this at low level (kernel direct syscall access etc.) you should probably replicate all the boilerplate code of the library --- why would you do that? You don't do that with sys_open() and friend, you use libc to get these nicely wrapped up.

Get more info about this (and any) package with apt show libsctp-dev.

2

To install this, press Ctrl+Alt+T to go to a terminal and type:

apt-get install libsctp-dev

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like