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.hso 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-devIf 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.
To install this, press Ctrl+Alt+T to go to a terminal and type:
apt-get install libsctp-dev