Links

GitHub

Open HUB

Quick Links

Download

STREAMS

SIGTRAN

SS7

Hardware

SCTP

Related

Package

Manual

Manual Pages

References

Conformance

Performance

Documentation

Design

Status

FAQ

Manuals

sctp Manual

iperf Manual

SPG Manual

STREAMS Manual

strcompat Manual

strutil Manual

strbcm Manual

strtty Manual

strxns Manual

strxnet Manual

strsock Manual

strinet Manual

strsctp Manual

striso Manual

netperf Manual

strchan Manual

strx25 Manual

strisdn Manual

strss7 Manual

sigtran Manual

strvoip Manual

osr61 Manual

LiS Manual

Documentation

FAQ

SIGTRAN

Design

Conformance

Performance

References

Man Pages

Manuals

Papers

Home

Overview

Status

Documentation

Resources

About

News

sctp Manual

Description: OpenSS7 Online Manuals

A PDF version of this document is available here.

OpenSS7 Linux Native SCTP

OpenSS7 Linux Native SCTP Installation and Reference Manual

About This Manual

This is Edition 27, last updated 2008-10-31, of The OpenSS7 Linux Native SCTP Installation and Reference Manual, for Version 0.2 release 27 of the OpenSS7 Linux Native SCTP package.

Preface

Notice

This package is released and distributed under the GNU Affero General Public License (see GNU License). Please note, however, that there are different licensing terms for the manual pages and some of the documentation (derived from OpenGroup1 publications and other sources). Consult the permission notices contained in the documentation for more information.

This manual, is released under the GNU Free Documentation License (see GNU Free Documentation License) with no sections invariant.

Abstract

This manual provides a Installation and Reference Manual for OpenSS7 Linux Native SCTP.

Objective

The objective of this manual is to provide a guide for the STREAMS programmer when developing STREAMS modules, drivers and application programs for OpenSS7 Linux Native SCTP.

This guide provides information to developers on the use of the STREAMS mechanism at user and kernel levels.

STREAMS was incorporated in UNIX System V Release 3 to augment the character input/output (I/O) mechanism and to support development of communication services.

STREAMS provides developers with integral functions, a set of utility routines, and facilities that expedite software design and implementation.

Intent

The intent of this manual is to act as an introductory guide to the STREAMS programmer. It is intended to be read alone and is not intended to replace or supplement the OpenSS7 Linux Native SCTP manual pages. For a reference for writing code, the manual pages (see STREAMS(9)) provide a better reference to the programmer. Although this describes the features of the OpenSS7 Linux Native SCTP package, OpenSS7 Corporation is under no obligation to provide any software, system or feature listed herein.

Audience

This manual is intended for a highly technical audience. The reader should already be familiar with Linux kernel programming, the Linux file system, character devices, driver input and output, interrupts, software interrupt handling, scheduling, process contexts, multiprocessor locks, etc.

The guide is intended for network and systems programmers, who use the STREAMS mechanism at user and kernel levels for Linux and UNIX system communication services.

Readers of the guide are expected to possess prior knowledge of the Linux and UNIX system, programming, networking, and data communication.

Revisions

Take care that you are working with a current version of this manual: you will not be notified of updates. To ensure that you are working with a current version, contact the Author, or check The OpenSS7 Project website for a current version.

A current version of this manual is normally distributed with the OpenSS7 Linux Native SCTP package.

Version Control

     sctp.texi,v
     Revision 0.9.2.28  2008-09-20 11:04:25  brian
     - added package patchlevel
     
     Revision 0.9.2.27  2008-08-03 06:03:27  brian
     - protected agains texinfo commands in log entries
     
     Revision 0.9.2.26  2008/07/27 08:48:51  brian
     - no invariant sections, more libtool ignores
     
     Revision 0.9.2.25  2008-04-29 08:49:51  brian
     - updated headers for Affero release
     
     Revision 0.9.2.24  2008-04-25 11:50:44  brian
     - updates to AGPLv3
     
     Revision 0.9.2.23  2007/08/12 06:43:57  brian
     - updated licenses in manuals
     
     Revision 0.9.2.22  2007/02/28 06:30:29  brian
     - updates and corrections, #ifdef instead of #if
     
     Revision 0.9.2.21  2006/09/18 01:06:21  brian
     - updated manuals and release texi docs
     
     Revision 0.9.2.20  2006/08/28 10:46:54  brian
     - correction
     
     Revision 0.9.2.19  2006/08/28 10:32:45  brian
     - updated references
     
     Revision 0.9.2.18  2006/08/27 12:26:34  brian
     - finalizing auto release files
     
     Revision 0.9.2.17  2006/08/26 09:16:38  brian
     - better release file generation
     
     Revision 0.9.2.16  2006/08/23 11:00:26  brian
     - added preface, corrections and updates for release
     
     Revision 0.9.2.14  2006-03-29 04:27:45 -0700  brian
     - corrections for rerelease, see ChangeLog
     
     Revision 0.9.2.13  2006-03-22 03:01:59 -0700  brian
     - added makefile target index
     
     Revision 0.9.2.12  2006-03-04 22:51:50 -0700  brian
     - minor updates of some release info for next release
     
     Revision 0.9.2.11  2005-07-08 07:15:51 -0600  brian
     - updates to documentation
     
     Revision 0.9.2.10  2005-06-24 07:38:58 -0600  brian
     - added troubleshooting section to manuals
     
     Revision 0.9.2.9  2005-05-14 02:29:32 -0600  brian
     - copyright header correction
     
     Revision 0.9.2.8  2005-04-12 17:01:41 -0600  brian
     - correct docs
     
     Revision 0.9.2.7  2005-04-12 03:28:55 -0600  brian
     - corrections
     
     Revision 0.9.2.6  2005-03-14 17:56:58 -0700  brian
     - Updated version numbering in texinfo files.
     
     Revision 0.9.2.5  2005-03-14 17:51:55 -0700  brian
     - Updated version numbering in texinfo files.
     
     Revision 0.9.2.4  2005-02-17 13:00:07 -0700  brian
     - Fixes for texi documentation.
     
     Revision 0.9.2.3  2005-01-24 04:57:59 -0700  brian
     - Updated texinfo headers.
     
     Revision 0.9.2.2  2004-12-21 15:20:24 -0700  brian
     - Some corrections.
     
     Revision 0.9.2.1  2004-12-20 03:18:19 -0700  brian
     - Big start on autoconf release of Linux Native SCTP.
     
     Revision 0.9  1996-12-31 17:00:00 -0700  brian
     *** empty log message ***

ISO 9000 Compliance

Only the TeX, texinfo, or roff source for this manual is controlled. An opaque (printed, postscript or portable document format) version of this manual is an UNCONTROLLED VERSION.

Disclaimer

OpenSS7 Corporation disclaims all warranties with regard to this documentation including all implied warranties of merchantability, fitness for a particular purpose, non-infringement, or title; that the contents of the manual are suitable for any purpose, or that the implementation of such contents will not infringe on any third party patents, copyrights, trademarks or other rights. In no event shall OpenSS7 Corporation be liable for any direct, indirect, special or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with any use of this manual or the performance or implementation of the contents thereof.

OpenSS7 Corporation reserves the right to revise this software and documentation for any reason, including but not limited to, conformity with standards promulgated by various agencies, utilization of advances in the state of the technical arts, or the reflection of changes in the design of any techniques, or procedures embodied, described, or referred to herein. OpenSS7 Corporation is under no obligation to provide any feature listed herein.

U.S. Government Restricted Rights

If you are licensing this Software on behalf of the U.S. Government ("Government"), the following provisions apply to you. If the Software is supplied by the Department of Defense ("DoD"), it is classified as "Commercial Computer Software" under paragraph 252.227-7014 of the DoD Supplement to the Federal Acquisition Regulations ("DFARS") (or any successor regulations) and the Government is acquiring only the license rights granted herein (the license rights customarily provided to non-Government users). If the Software is supplied to any unit or agency of the Government other than DoD, it is classified as "Restricted Computer Software" and the Government's rights in the Software are defined in paragraph 52.227-19 of the Federal Acquisition Regulations ("FAR") (or any successor regulations) or, in the cases of NASA, in paragraph 18.52.227-86 of the NASA Supplement to the FAR (or any successor regulations).

Acknowledgements

As with most open source projects, this project would not have been possible without the valiant efforts and productive software of the Free Software Foundation and the Linux Kernel Community.

Sponsors

Funding for completion of the OpenSS7 OpenSS7 Linux Native SCTP package was provided in part by:

OpenSS7 Corporation

Additional funding for The OpenSS7 Project was provided by:

OpenSS7 Corporation
Lockheed Martin Co.
Motorola
HOB International
Comverse Ltd.
Sonus Networks Inc.
France Telecom
SS8 Networks Inc.
Nortel Networks
Verisign
eServGlobal (NZ) Pty Ltd.
NetCentrex S. A.
SysMaster Corporation
GeoLink SA
AirNet Communications
TECORE
Tumsan Oy
Vodare Ltd.
Excel Telecommunications

Contributors

The primary contributor to the OpenSS7 OpenSS7 Linux Native SCTP package is Brian F. G. Bidulock. The following is a list of significant contributors to The OpenSS7 Project:

− Per Berquist
− John Boyd
− Chuck Winters
− Peter Courtney
− Tom Chandler
− Gurol Ackman
− Kutluk Testicioglu
− John Wenker
− Others

Authors

The authors of the OpenSS7 OpenSS7 Linux Native SCTP package include:

Brian Bidulock

See Author Index, for a complete listing and cross-index of authors to sections of this manual.

Maintainer

The maintainer of the OpenSS7 OpenSS7 Linux Native SCTP package is:

Brian Bidulock

Please send bug reports to bugs@openss7.org using the send-pr script included in the package, only after reading the BUGS file in the release, or See Problem Reports.

Web Resources

The OpenSS7 Project provides a website dedicated to the software packages released by the OpenSS7 Project.

Bug Reports

Please send bug reports to bugs@openss7.org using the send-pr script included in the OpenSS7 Linux Native SCTP package, only after reading the BUGS file in the release, or See Problem Reports. You can access the OpenSS7 GNATS database directly via the web, however, the preferred method for sending new bug reports is via mail with the send-pr script.

Mailing Lists

The OpenSS7 Project provides a number of general discussion Mailing Lists for discussion concerning the OpenSS7 OpenSS7 Linux Native SCTP package as well as other packages released by The OpenSS7 Project.

These are mailman mailing lists and so have convenient web interfaces for subscribers to control their settings. See http://www.openss7.org/mailinglist.html.

The mailing lists are as follows:

openss7
The openss7 mailing list is for general enquiries, information exchange and announcements regarding the OpenSS7 Project. This is our original mailing list and takes the highest amount of traffic.
openss7-announce
The openss7-announce mailing list is for announcements related to the OpenSS7 Project. This list will accept announcements posted by subscribers. Subscribe to this list if you are interested in announcements from the OpenSS7 Project, subscribers and sponsors, related to the OpenSS7 Project or STREAMS, SS7, SIGTRAN or SCTP in general.
openss7-cvs
The openss7-cvs mailing list is for automatic CVS log reporting. You must get permission of the owner to subscribe to this list. Subscribers are not allowed to post to this list, this is merely for distributing notification of changes to the CVS repository.h
openss7-develop
The openss7-develop mailing list is for email exchange related to the development projects under the OpenSS7 Project. This includes development requests, proposals, requests for comment or proposal. Subscribe to this list if you are interested in ongoing development details regarding the OpenSS7 Project.
openss7-test
The openss7-test mailing list is for email exchange related to the testing of code under the OpenSS7 Project. This specifically relates to conformance testing, verification testing, interoperability testing and beta testing. Subscribe to this list if you are interested in participating in and receiving ongoing details of test activities under the OpenSS7 Project.
openss7-bugs
The openss7-bugs mailing list is specifically tailored to bug tracking. The mailing list takes a feed from the OpenSS7 GNATS bug tracking system and accepts posting of responses to bug reports, tracking and resolution. Subscribe to this list if you are interested in receiving detailed OpenSS7 release code bug tracking information. This list is not archived; for historical information on problem reports, see our GNATS databases.
openss7-updates
The openss7-updates mailing list provides updates on OpenSS7 Project code releases and ongoing activities. Subscribers are not allowed to post to this list; this list is for official OpenSS7 Project announcements only. Subscribe to this list if you are interested in receiving updates concerning official releases and activities of the OpenSS7 Project.
openss7-streams
The openss7-streams mailing list is for email exchange related to the STREAMS development projects under the OpenSS7 Project. This includes development requests, proposals, requests for comment or proposal. Subscribe to this list if you are interested in ongoing development details regarding the OpenSS7 Project STREAMS components.
linux-streams
The linux-streams mailing list is for mail exchange related to Linux Fast-STREAMS or Linux STREAMS. This includes patches, development requests, proposals, requests for comment or proposal. Subscribe to this list if you are interested in ongoing development details regarding the STREAMS for Linux components. This is the the new (September 2006) home of the linux-streams list formerly of <gsyc.escet.urjc.es>.
Spam

To avoid spam being sent to the members of the OpenSS7 mailing list(s), we have blocked mail from non-subscribers. Please subscribe to the mailing list before attempting to post to them. (Attempts to post when not subscribed get bounced.)

As an additional measure against spam, subscriber lists for all OpenSS7 mailing lists are not accessible to non-subscribers; for most lists subscriber lists are only accessible to the list administrator. This keeps your mailing address from being picked off our website by bulk mailers.

Acceptable Use Policy

It is acceptable to post professional and courteous messages regarding the OpenSS7 package or any general information or questions concerning STREAMS, SS7, SIGTRAN, SCTP or telecommunications applications in general.

Large Attachments

The mailing list is blocked from messages of greater than 40k. If you have attachments (patches, test programs, etc.) and you mail them to the list, it will bounce to the list administrator. If you are interested in making your patches, test programs, test results or other large attachments available to the members of the mailing list, state in the message that you would like them posted and the list administrator will place them in the mail archives.

Quick Start Guide

OpenSS7 Linux Native SCTP

Package sctp-0.2.27 was released under AGPLv3 2008-10-31.

The OpenSS7 Linux Native SCTP package is the OpenSS7 Linux Native (Sockets) Kernel implementation of Stream Control Transmission Protocol (SCTP).

sctp-0.2.27 is the 0.2.27 version of a Linux Kernel native implementation of RFC 2960 Stream Control Transmission Protocol. For information on using the implementation see the man/sctp.7 Linux manual page and look at the test programs in sctp-0.2.27/test/.

Warning: This is pre-release code. It is Beta but rather stable. Nevertheless, it is possible it will crash or lock your machine in some situations. Please remember that there is NO WARRANTY with this code and take appropriate precautions when attempting to run it.

This distribution is only currently applicable to Linux 2.4 kernels and was targeted at ix86, x86_64, ppc and ppc64 architectures, but should build and install for other architectures as well.

Release

This is the sctp-0.2.27 package, released 2008-10-31. This ‘0.2.27’ release, and the latest version, can be obtained from the download area of The OpenSS7 Project website using a command such as:

     $> wget http://www.openss7.org/tarballs/sctp-0.2.27.tar.bz2

The release is available as an autoconf(1) tarball, src.rpm or dsc, as a set of binary rpms or debs, or as a yum(8) or apt(8) repository. See the download page for the autoconf(1) tarballs, src.rpms, dscs, or repository access instructions. See the sctp package page for tarballs, source and binary packages.

Please see the NEWS file for release notes and history of user visible changes for the current version, and the ChangeLog file for a more detailed history of implementation changes. The TODO file lists features not yet implemented and other outstanding items.

Please see the INSTALL, INSTALL-sctp and README-make, files (or see Installation) for installation instructions.

When working from cvs(1) or git(1), please see the README-cvs, file (or see Downloading from CVS). An abbreviated installation procedure that works for most applications appears below.

This release of the package is published strictly under Version 3 of the GNU Affero Public License which can be found in the file COPYING. Package specific licensing terms (if any) can be found in the file LICENSES. Please respect these licensing arrangements. If you are interested in different licensing terms, please contact the copyright holder, or OpenSS7 Corporation <sales@openss7.com>.

See README-alpha (if it exists) for alpha release information.

Prerequisites

The quickest and easiest way to ensure that all prerequisites are met is to download and install this package from within the OpenSS7 Master Package, openss7-0.9.2.G, instead of separately.

Prerequisites for the OpenSS7 Linux Native SCTP package are as follows:

  1. Linux distribution, somewhat Linux Standards Base compliant, with a 2.4 or 2.6 kernel and the appropriate tool chain for compiling out-of-tree kernel modules. Most recent Linux distributions are usable out of the box, but some development packages must be installed. For more information, see Compatibility.

    − A fairly LSB compliant GNU/Linux distribution.2
    − Linux 2.4 kernel (2.4.10 - 2.4.27).
    − glibc2 or better.
    − GNU groff (for man pages).3
    − GNU texinfo (for info files).

When configuring and building multiple OpenSS7 Project release packages, place all of the source packages (unpacked tarballs) at the same directory level and all build directories at the same directory level (e.g. all source packages under /usr/src).

When installing packages that install as kernel modules, it is necessary to have the correct kernel development package installed. For the following distributions, use the following commands:

     Ubuntu:  $> apt-get install linux-headers
     Debian:  $> apt-get install kernel-headers
     Fedora:  $> yum install kernel-devel

You also need the same version of gcc(1) compiler with which the kernel was built. If it is not the default, add ‘CC=kgcc’ on the line after ‘./configure’, for example:

     $> ../sctp-0.2.27/configure CC='gcc-3.4'

Installation

The following commands will download, configure, build, check, install, validate, uninstall and remove the package:

     $> wget http://www.openss7.org/tarballs/sctp-0.2.27.tar.bz2
     $> tar -xjvf sctp-0.2.27.tar.bz2
     $> mkdir build
     $> pushd build
     $> ../sctp-0.2.27/configure --enable-autotest
     $> make
     $> make check
     $> sudo make install
     $> sudo make installcheck
     $> sudo make uninstall
     $> popd
     $> sudo rm -rf build
     $> rm -rf sctp-0.2.27
     $> rm -f sctp-0.2.27.tar.bz2

If you have problems, try building with the logging targets instead. If the make of a logging target fails, an automatic problem report will be generated that can be mailed to The OpenSS7 Project.4 Installation steps using the logging targets proceed as follows:

     $> wget http://www.openss7.org/tarballs/sctp-0.2.27.tar.bz2
     $> tar -xjvf sctp-0.2.27.tar.bz2
     $> mkdir build
     $> pushd build
     $> ../sctp-0.2.27/configure --enable-autotest
     $> make compile.log
     $> make check.log
     $> sudo make install.log
     $> sudo make installcheck.log
     $> sudo make uninstall.log
     $> popd
     $> sudo rm -rf build
     $> rm -rf sctp-0.2.27
     $> rm -f sctp-0.2.27.tar.bz2

See README-make for additional specialized make targets.

For custom applications, see the INSTALL and INSTALL-sctp files or the see Installation, as listed below. If you encounter troubles, see Troubleshooting, before issuing a bug report.

Brief Installation Instructions

The OpenSS7 Linux Native SCTP package is available from the downloads area of The OpenSS7 Project website using a command such as:

     $> wget http://www.openss7.org/tarballs/sctp-0.2.27.tar.bz2

Unpack the tarball using a command such as:

     $> tar -xjvf sctp-0.2.27.tar.bz2

The tarball will unpack into the relative subdirectory named after the package name: sctp-0.2.27.

The package builds using the GNU autoconf utilities and the configure script. To build the package, we recommend using a separate build directory as follows:

     $> mkdir build
     $> cd build
     $> ../sctp-0.2.27/configure

In general, the package configures and builds without adding any special options to the configure script. For general options to the configure script, see the GNU INSTALL file in the distribution:

     $> less ../sctp-0.2.27/INSTALL

For specific options to the configure script, see the INSTALL-sctp file in the distribution, or simply execute the configure script with the --help option like so:

     $> ../sctp-0.2.27/configure --help

After configuring the package, the package can be compiled simply by issuing the ‘make’ command:

     $> make

Some specialized makefile targets exists, see the README-make file in the distribution or simply invoke the ‘help’ target like so:

     $> make help | less

After successfully building the package, the package can be checked by invoking the ‘check’ make target like so:

     $> make check

After successfully checking the package, the package can be installed by invoking the ‘install’ make target (as root) like so:

     $> sudo make install

The test suites that ship with the package can be invoked after the package has been installed by invoking the ‘installcheck’ target. This target can either be invoked as root, or as a normal user, like so:

     $> make installcheck

(Note: you must add the --enable-autotest flag to configure, above for the test suites to be invoked with ‘make installcheck’.)

The package can be cleanly removed by invoking the ‘uninstall’ target (as root):

     $> sudo make uninstall

Then the build directory and tarball can be simply removed:

     $> cd ..
     $> rm -rf build
     $> rm -rf sctp-0.2.27
     $> rm -f sctp-0.2.27.tar.bz2

Detailed Installation Instructions

More detailed installation instructions can be found in the Installation, contained in the distribution in ‘text’, ‘info’, ‘html’ and ‘pdf’ formats:

     $> cd ../sctp-0.2.27
     $> less doc/manual/sctp.txt
     $> lynx doc/manual/sctp.html
     $> info doc/manual/sctp.info
     $> xpdf doc/manual/sctp.pdf

The ‘text’ version of the manual is always available in the MANUAL file in the release.

The current manual is also always available online from The OpenSS7 Project website at:

     $> lynx http://www.openss7.org/sctp_manual.html

1 Introduction

This manual documents the design, implementation, installation, operation and future development schedule of the OpenSS7 Linux Native SCTP package.

1.1 Overview

This manual documents the design, implementation, installation, operation and future development of the OpenSS7 Linux Native SCTP package.

The OpenSS7 Linux Native SCTP package is an Open Linux SCTP package for Linux. It includes development tools, header files and manual pages for SCTP.

The OpenSS7 Linux Native SCTP package is essential to the development and support of SCTP networking modules and drivers and provides a fundamental set of header files and manual pages for such development.

1.2 Organization of this Manual

This manual is organized (loosely) into several sections as follows:

Introduction. This introduction
Objective. Objective of the package
Reference. Contents of the package
Conformance. Conformance of the package
Releases. Releases of the package
Installation. Installation of the package
Troubleshooting. Troubleshooting of the package

1.3 Conventions and Definitions

This manual uses texinfo typographic conventions.

2 Objective

3 Reference

3.1 Files

SCTP creates the following kernel modules files in the kernel modules directory, /lib/modules/2.4.20-28.7/:5

modules.sctp

SCTP installs the following kernel module files in the kernel modules directory, /lib/modules/2.4.20-28.7/kernel/net/ipv4/:6

sctp.o
This kernel module contains the SCTP protocol module.

SCTP installs the following header files in the system include directory, /usr/include/netinet/:

sctp.h
This file contains SCTP and socket option definitions.

SCTP installs the following test programs in the system libexec directory, /usr/libexec/sctp/:7

send-pr
send-pr.config
The send-pr stand-alone shell script can be used for the automatic generation of problem reports for the OpenSS7 Linux Native SCTP package. The send-pr.config file provides localized definitions used by the send-pr program. For more information on problem reports, See Problem Reports, and, in particular, See Stand Alone Problem Reports.
test-sctp-dc
This binary contains a test program for delay test client for SCTP.
test-sctp-ds
This binary contains a test program for delay test server for SCTP.
test-sctp-sc
This binary contains a test program for socket test client for SCTP.
test-sctp-ss
This binary contains a test program for socket test server for SCTP.
test-sctp-tc
This binary contains a test program for throughput test client for SCTP.
test-sctp-ts
This binary contains a test program for throughput test server for SCTP.
test-sctpc
This binary contains a test program for a general testing test client for SCTP.
test-sctps
This binary contains a test program for a general testing test server for SCTP.
test-tcp-dc
This binary contains a test program for delay test client for TCP.
test-tcp-ds
This binary contains a test program for delay test server for TCP.
test-tcp-tc
This binary contains a test program for throughput test client for TCP.
test-tcp-ts
This binary contains a test program for throughput test server for TCP.
test-tcpc
This binary contains a test program for a general testing test client for TCP.
test-tcps
This binary contains a test program for a general testing test server for TCP.
test-udpc
This binary contains a test program for a general testing test client for UDP.
test-udps
This binary contains a test program for a general testing test server for UDP.
testsuite
atlocal
The testsuite stand-alone shell script invokes test cases in the test programs above as compiled into a comprehensive regression, troubleshooting and validation test suite for the OpenSS7 Linux Native SCTP drivers. The atlocal file provides localized definitions used by the testsuite program. For more information on test suites, See Test Suites, and, in particular, See Running Test Suites.

SCTP installs the following init scripts in the system init directory, /etc/rc.d/init.d/ (non-Debian) or /etc/init.d/ (Debian):

sctp
This is the name of the system init script on non-Debian based systems.
sctp.sh
This is the name of the system init script on Debian based systems.

SCTP installs the following system configuration files in the configuration directory, /etc/:

sctp.conf
This file provided configuration information for any system controls affected by the ‘SCTP’ package.
modutils/sctp
This file provides module definitions and demand loading aliases for the sctp package. This file is really only applicable to older 2.4 kernels.

SCTP installs the following system configuration file in the system configuration directory, /etc/sysconfig/ (non-Debian) or /etc/default/ (Debian):

sctp
This file provides system configuration information used by init scripts for the ‘SCTP’ package. Some options of init script execution can be controlled by this file.

SCTP installs the following info files in the system info directory, /usr/share/info/:

sctp.info
sctp.info-1
sctp.info-2
These files contain this manual in GNU info format.

SCTP installs the following manual page macros and reference database files in the system man directory, /usr/share/man/:8

sctp.macros
This file contains manual page macro definitions included by the manual pages included in the package.
sctp.refs
This file contains a reference database referenced by the manual pages included in the package.

SCTP installs the following manual pages in the system man directory, /usr/share/man/man7/:

sctp.7
This is the SCTP manual page.

SCTP installs the following manual pages in the system man directory, /usr/share/man/man8/:

test-sctp-dc.8
test-sctp-ds.8
test-sctp-sc.8
test-sctp-ss.8
test-sctp-tc.8
test-sctp-ts.8
test-sctpc.8
test-sctps.8
test-tcp-dc.8
test-tcp-ds.8
test-tcp-tc.8
test-tcp-ts.8
test-tcpc.8
test-tcps.8
test-udpc.8
test-udps.8
These are the test program manual pages.

3.2 Kernel Modules

3.2.1 Stream Control Transmission Protocol (SCTP) Module (sctp)

Licensing

The sctp module was originally written by Brian F. G. Bidulock and is licensed under the GNU Affero General Public License Version 3 See GNU Affero General Public License.

3.3 Libraries

3.4 Utilities

3.4.1 test-sctp-dc

Note that test-sctp-dc is maintained as a manual page, test-sctp-dc(8).

3.4.2 test-sctp-ds

Note that test-sctp-ds is maintained as a manual page, test-sctp-ds(8).

3.4.3 test-sctp-sc

Note that test-sctp-sc is maintained as a manual page, test-sctp-sc(8).

3.4.4 test-sctp-ss

Note that test-sctp-ss is maintained as a manual page, test-sctp-ss(8).

3.4.5 test-sctp-tc

Note that test-sctp-tc is maintained as a manual page, test-sctp-tc(8).

3.4.6 test-sctp-ts

Note that test-sctp-ts is maintained as a manual page, test-sctp-ts(8).

3.4.7 test-sctpc

Note that test-sctpc is maintained as a manual page, test-sctpc(8).

3.4.8 test-sctps

Note that test-sctps is maintained as a manual page, test-sctps(8).

3.4.9 test-tcp-dc

Note that test-tcp-dc is maintained as a manual page, test-tcp-dc(8).

3.4.10 test-tcp-ds

Note that test-tcp-ds is maintained as a manual page, test-tcp-ds(8).

3.4.11 test-tcp-tc

Note that test-tcp-tc is maintained as a manual page, test-tcp-tc(8).

3.4.12 test-tcp-ts

Note that test-tcp-ts is maintained as a manual page, test-tcp-ts(8).

3.4.13 test-tcpc

Note that test-tcpc is maintained as a manual page, test-tcpc(8).

3.4.14 test-tcps

Note that test-tcps is maintained as a manual page, test-tcps(8).

3.4.15 test-udpc

Note that test-udpc is maintained as a manual page, test-udpc(8).

3.4.16 test-udps

Note that test-udps is maintained as a manual page, test-udps(8).

3.5 Development

OpenSS7 Linux Native SCTP does not currently install any libraries. The socket library normally available under Linux in libc are sufficient. OpenSS7 Linux Native SCTP does, however, install the /usr/include/netinet/sctp.h header file for development of applications programs that use the sctp kernel module.

3.6 SCTP Reference Page

NAME

sctp - Stream Control Transmission Protocol (SCTP).

SYNOPSIS

     #include <sys/socket.h>
     #include <netinet/in.h>
     #include <netinet/sctp.h>
     
     sctp_socket = socket(PF_INET, SOCK_SEQPACKET, 0);
     sctp_socket = socket(PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
     sctp_socket = socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP);
     sctp_socket = socket(PF_INET, SOCK_RDM, 0IPPROTO_SCTP

DESCRIPTION

SCTP is an implementation of the SCTP (Stream Control Transmission Protocol) defined in RFC 2960. SCTP provides reliable delivery of ordered or unordered packets over a full duplex connection between two ‘SOCK_SEQPACKET’ sockets on top of ip(7). SCTP can guarantee that the data arrives in order on a stream, if requested, and retransmits lost packets. It generates and checks a per packet checksum to catch transmission errors.

SCTP provides the following socket types:

SOCK_SEQPACKET
A standard ‘SOCK_SEQPACKET’ socket that preserves message boundaries, Nagles at the association level, and provides ordered and unordered reliable and partial reliable, acknowledged and unacknowledged delivery on multiple streams.
SOCK_STREAM
A tcp(7) compatible ‘SOCK_STREAM’ socket that does not preserve message boundaries, Nagles at the stream level, and provides ordered and out-of-band unacknowledged delivery on a single stream. This is an optional capability of SCTP which provides for maximum compatibility with applications written for tcp(7). This socket type is available when SCTP is compiled with the kernel configuration parameter ‘CONFIG_SCTP_TCP_COMPATIBLE’ set.
SOCK_RDM
An udp(7) compatible ‘SOCK_RDM’ socket that preserves message boundaries, does not Nagle, and provides only unordered but reliable or partially reliable delivery on multiple streams. This is an optional capability of SCTP which provides for maximum compatibility with applications written for udp(7). This socket type is available when SCTP is compiled with the kernel configuration parameter ‘CONFIG_SCTP_UDP_COMPATIBLE’ set.

Connection Establishment

A fresh SCTP socket has no remote or local address and is not fully specified. To create an outgoing SCTP association use connect(2) to establish an association with another SCTP endpoint. To receive incoming associations bind(2) the socket first to a number of local addresses and a port and then call listen(2) to put the socket into listening state. Then a new socket for each incoming association can be accepted using accept(2). A socket that has had accept(2) or connect(2) successfully called on it is fully specified and may transmit data. Data cannot be transmitted on listening or not yet connected sockets.

SCTP supports large windows to support links with high latency or bandwidth. Large SCTP windows can be used by increasing the send and receive buffer sizes. They can be set globally with the ‘net.core.wmem_default’ and ‘net.core.rmem_default’ system controls, or on individual sockets by using the ‘SO_SNDBUF’ and ‘SO_RCVBUF’ socket options. The maximum sizes for socket buffers are limited by the ‘net.core.wmem_max’ and ‘net.core.rmem_max’ system controls. See socket(7) for more information.

Sending Data

When sending data, the specific destination address within the association to which to send the data can be specified by providing a valid destination address as an argument to sendto(2) or sendmsg(2). Data sent with send(2) or write(2) will use SCTP's destination transport address selection policies for transmission and retransmission to single- and multi-homed hosts. The stream upon which to send the data can also be set with the ‘SCTP_SID’ socket option on a socket basis with setsockopt(2) or on a per-message basis with ‘SCTP_SID’ control message to sendmsg(2). In addition, the ip(7)IP_PKTINFO’ option can be used with sendmsg(2) to specify the interface, first-hop destination address and source address to be used in the outbound packet on ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’ sockets. IP options can also be specified for the outbound packet with the ip(7)IP_OPTIONS’ or ‘IP_RETOPTS’ control messages to sendmsg(2).

For ‘SOCK_SEQPACKET’ socket, send operations may also use the ‘MSG_MORE’ flag when sending with send(2), sendto(2) or sendmsg(2) to indicate that the next write operation will provide additional data belonging to the same packet. ‘SOCK_STREAM’ sockets do not support send options and do not return the ‘MSG_TRUNC’ flag on send operations.

If a ‘SOCK_SEQPACKET’ or ‘SOCK_STREAM’ socket does not have sufficient room to buffer the sent data, it buffers what it can and returns the amount of user data buffered. ‘SOCK_RDM’ sockets wait for sufficient room to buffer the entire sent packet before returning. ‘SOCK_SEQPACKET’ and ‘SOCK_STREAM’ sockets will segment large data writes in to smaller segments for delivery to the peer.

SCTP provides a mechanism for receiving positive and negative acknowledgements of sent data on ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’ sockets. When the socket option ‘SCTP_DISPOSITION’ is set to ‘SCTP_DISPOSITION_ACKED’, or when data is sent using the ‘MSG_CONFIRM’ flag to send(2), sendto(2) or sendmsg(2), message confirmation or delivery failures can be received by passing the ‘MSG_CONFIRM’ flag to recv(2), recvfrom(2) or recvmsg(2). This mechanism also provides for retrieval and disposition of undelivered messages after the association has aborted or shut down, but before a call to close(2).

Receiving Data

For ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’ sockets, all receive operations return only one packet, or a portion of one packet. When the packet is smaller than the passed buffer only that much data is returned, when it is larger the packet is truncated and the ‘MSG_TRUNC’ flag is set for ‘SOCK_RDM’ sockets. Subsequent recv or read(2), or a subsequent recvfrom(2) or recvmsg(2) for the same stream will return the remainder of the packet for ‘SOCK_SEQPACKET’ sockets. ‘SOCK_SEQPACKET’ sockets also return the ‘MSG_EOR’ flag when the end of the packet has been received successfully. For ‘SOCK_STREAM’ sockets, all receive operations return only the amount of data available on the current stream. ‘MSG_TRUNC’ and ‘MSG_EOR’ are never set for ‘SOCK_STREAM’ sockets.

IP options may be sent or received using the socket options described in ip(7). They are only processed by the kernel when the appropriate system control is enabled (but still passed to the user even when it is turned off). See ip(7).

When the ‘MSG_DONTROUTE’ flag is set on sending, the destination address must refer to a local interface address and the packet is only sent to that interface.

SCTP fragments a packet when its total length exceeds the association MTU (Maximum Transmission Unit). A more network friendly alternative is to use path MTU discovery as described in the ‘IP_PMTU_DISCOVER’ section of ip(7).

SCTP supports urgent data similar to tcp(7). Urgent data is used to signal the receiver that some important message is part of the data stream and that it should be processed as soon as possible. Urgent data is always sent out of order. To send urgent (or out of order) data specify the ‘MSG_OOB’ option to send(2), sendto(2), or sendmsg(2). When urgent data is received, the kernel sends a ‘SIGURG’ signal to the reading process or the process or process group that has been set for the socket using the ‘FIOCSPGRP’ or ‘FIOCSETOWN’ I/O controls. When the ‘SO_OOBINLINE’ socket option is enabled, urgent data is put into the normal data stream (and can be tested for by the ‘SIOCATMARK’ I/O control), otherwise it can only be received when the ‘MSG_OOB’ flag is set for recvmsg(2).

ADDRESS FORMATS

SCTP is built on top of IP (see ip(7)). The address formats defined by ip(7) apply to SCTP. SCTP uses the IPv4 sockaddr_in address format described in ip(7).

SCTP supports multiple-stream point-to-point communication within multi-homed associations; broadcasting and multi-casting are not supported.

In addition to normal IP addressing, SCTP provides extensions on the bind(2), accept(2), connect(2), getsockname(2), and getpeername(2) system calls. These functions normally take or return a single sockaddr_in as an address argument. When used in conjunction with an SCTP socket on or to a multi-homed host, these calls will accept or return an array of sockaddr_in structures. The number of addresses in the structure is indicated by the length of the structure and the protocol family of the socket. SCTP will only support one port number being specified in the address list, and each sockaddr_in structure in the list must contain the same sin_port. (Note: Linux uses ‘MAX_SOCK_ADDR’ as a maximum size of the socket address length. This is currently only 128 bytes or eight (8) sockaddr_in structures. Eight (8) addresses should be sufficient for most applications.)

Multiple addresses provided to the bind(2) system call will be interpreted as multiple local addresses to provide to the peer at connection time as well as the local address/port combinations upon which a listening socket will accept incoming associations. A call to accept(2) requesting the source address of the peer will return multiple transport addresses if the connecting peer is multi-homed. Multiple addresses provided to the connect(2) system call will be interpreted as multiple destination address/port combinations to which to attempt to form an association. The getpeername(2) system call returns the list of destination address/port combinations to which the socket is connected. The getsockname(2) system call returns the list of local address/port combinations to which the socket is bound.

getsockname(2)
A call to getsockname(2) can provide multiple bound transport addresses for a multi-homed host when the socket is bound to multiple addresses or ‘INADDR_ANY’ using bind(2). The first address in the list is the primary address to which the socket is bound. This is the first address that will be attempted to be used as a source address when sending an INIT chunk to the SCTP peer as a result of a call to connect(2). Otherwise, the order of the addresses has no significance. When the socket is not bound to any address, the call to getsockname(2) returns a socket address with address family ‘AF_UNSPEC’.

As a result of binding to ‘INADDR_ANY’ or the ADD-IP extension, subsequent calls to getsockname(2) may return different addresses depending on the state of the connection or resulting from the exchange of ASCONF control chunks. This list of transport addresses returned by getsockname(2) represents the current list of local transport addresses bound to the endpoint. When the connection is multi-homed or supports ADD-IP, this behaviour is different from tcp(7) and other connection-oriented protocols, whose bound address does not change during the lifespan of a connection.

getpeername(2)
A call to getpeername(2) can provide multiple peer transport addresses for a multi-homed peer when the socket is connecting or connected to multiple addresses using connect(2). The first address is always the current primary destination transport address. The current primary destination transport address is the address to which all messages will be sent in the absence of congestion or failure.

As a result of connecting to multiple transport addresses using connect(2) or the ADD-IP extension, the membership of the list of transport addresses returned by getpeername(2) may change due to the state of the socket or resulting from the exchange of ASCONF control chunks. When the SCTP connection is multi-homed or supports ADD-IP, this behaviour is different from tcp(7) and other connection-oriented protocol, whose peer address does not change during the lifespan of a connection.

SOCKET CALLS

Socket calls for ‘SOCK_STREAM’, ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’ sockets are different in some respects (addressing and options) than their tcp(7) or udp(7) counterparts. These differences are described here. For common behaviour, please see the indicated manual page in Section 2.

bind(2)
A call to bind(2) can provide multiple address if the host is multi-homed. Binds to ‘INADDR_ANY’ will result in a binding to all of the local transport addresses belonging to the host that do not cause a conflict at the time that a connection is formed. As with other sockets, the local port number is assigned at the time that bind(2) is called.

As with other sockets, binding to a socket address with address family ‘AF_UNSPEC’ will cause the socket to be unbound from all transport addresses.

Consistent with tcp(7), SCTP supports binding of multiple sockets to the same transport address providing that the socket option ‘SO_REUSEADDR’ (see socket(7)) is set on the sockets and that no sockets have executed listen(2) bound to the same transport address.

accept(2)
A call to accept(2) requesting the peer address of the connection will return multiple transport addresses if the connecting peer is multi-homed. The first transport address in the list is the primary transport address of the connecting peer. The primary transport address is the address upon which the INIT message was received. Otherwise, the accept(2) operation is unchanged.
connect(2)
A call to connect(2) can provide multiple destination transport addresses if the peer host is multi-homed. If an INIT chunk sent to the first destination transport address is not acknowledged, the next INIT chunk will be sent to the next address in the list. This will occur until an acknowledgement is received from one of the addresses or the connection attempt times out. Each address will be retried sctp_max_init_retries times before the connection process is considered to have timed out. Broadcast and multicast addresses are permitted for the call to connect(2) but will not form an endpoint address in the association. This feature permits fast and reliable initialization of associations.

As with other connection-oriented sockets, connecting to a socket address with address family ‘AF_UNSPEC’ will cause a socket engaged in active connections to be disconnected.

read(2)
recv(2)
recvfrom(2)
recvmsg(2)
SCTP preserves message boundaries on read for ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’ sockets. Message boundaries are never preserved for ‘SOCK_STREAM’ sockets.

The following message flags to, or returned from, recv(2), recvfrom(2) and recvmsg(2) have special interpretations for SCTP:

MSG_OOB
SCTP supports the return of the ‘MSG_OOB’ flag from recv(2), recvfrom(2) and recvmsg(2). Data read with the ‘MSG_OOB’ flag set indicates that the data was received on the specified SCTP stream with the Unordered bit set. Operation is similar to tcp(7).
MSG_EOR
For ‘SOCK_SEQPACKET’ sockets, the ‘MSG_EOR’ flag returned from recv(2), recvfrom(2) or recvmsg(2) indicates that the data read has been read to the end of a record. The ‘MSG_EOR’ flag is not used for ‘SOCK_STREAM’ or ‘SOCK_RDM’ sockets.
MSG_TRUNC
SCTP supports the use of the ‘MSG_TRUNC’ flag to recv(2), recvfrom(2) and recvmsg(2). Data read with the ‘MSG_TRUNC’ flag set will return the number of bytes available in the packet rather than the number of bytes read.

When the ‘MSG_TRUNC’ flag is returned from recv(2), recvfrom(2) and recvmsg(2), it indicates that the record was truncated. ‘MSG_TRUNC’ will only be returned on ‘SOCK_RDM’ sockets. ‘MSG_TRUNC’ is never set on return for ‘SOCK_STREAM’ and ‘SOCK_SEQPACKET’ sockets.

MSG_CONFIRM
SCTP supports the use of the ‘MSG_CONFIRM’ flag to recv(2), recvfrom(2) and recvmsg(2). Data read with the ‘MSG_CONFIRM’ flag set will return messages receipt acknowledgements as well as messages which have exceeded their life-times, messages which have been dropped by PR-SCTP, and messages held for retrieval after abort or shutdown.

When the ‘MSG_CONFIRM’ flag is returned from recv(2), recvfrom(2) and recvmsg(2), it indicates that the read data represents data that was confirmed as acknowledged by the peer. See also ‘SCTP_DISPOSITION’ under SOCKET OPTIONS.

Other message flags have the same interpretation as described in recv(2), recvfrom(2) and recvmsg(2).

write(2)
send(2)
sendto(2)
sendmsg(2)
SCTP preserves message boundaries on write for ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’ sockets. Message boundaries are never preserved for ‘SOCK_STREAM’ sockets.

The following message flags to send(2), sendto(2) and sendmsg(2) have special interpretations for SCTP:

MSG_OOB
SCTP supports the use of the ‘MSG_OOB’ flag to send(2), sendto(2) and sendmsg(2). Data written with the ‘MSG_OOB’ flag set indicates that the data is to be sent on the specified SCTP stream with the Unordered bit set.
MSG_MORE
SCTP supports the use of the ‘MSG_MORE’ flag to send(2), sendto(2) and sendmsg(2). Data written with the ‘MSG_MORE’ flag set indicates that the data of a subsequent send operation on the same stream contains additional data belonging to the same record. Use of the ‘MSG_MORE’ flag is only supported for ‘SOCK_SEQPACKET’ sockets. Data written with write(2) is assumed to contain an entire record.
MSG_PROBE
SCTP supports the use of the ‘MSG_PROBE’ flag to send(2), sendto(2) and sendmsg(2). Data written with the ‘MSG_PROBE’ flag set indicates that the data is to be used to fill out the heartbeat data in a HEARTBEAT chunk and request that SCTP send a HEARTBEAT to the peer. Use of the ‘MSG_PROBE’ flag is supported on all socket types.
MSG_EOF
SCTP supports the use of the ‘MSG_EOF’ flag to send(2), sendto(2) and sendmsg(2). Data written with the ‘MSG_EOF’ flag will be the last data sent on the association and then a shutdown initiated.
MSG_CONFIRM
SCTP supports the use of the ‘MSG_CONFIRM’ flag to send(2) sendto(2) and sendmsg(2) for ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’ sockets. Records or packets written with the ‘MSG_CONFIRM’ flag set are marked for acknowledgement. Acknowledgements can be received with the ‘MSG_CONFIRM’ flag to recv(2), recvfrom(2) and recvmsg(2) as described above. See also ‘SCTP_DISPOSITION’ under SOCKET OPTIONS.

Other message flags have the same interpretation as described in send(2), sendto(2) and sendmsg(2).

shutdown(2)
close(2)
SCTP supports orderly release using shutdown(2) and both orderly and abortive release using close(2) similar to tcp(7).

When the ‘SHUT_RD’ flag is given to shutdown(2), receive will be disabled locally and further receive operations on the socket will fail. When the ‘SHUT_WR’ or ‘SHUT_RDWR’ flag is given to shutdown(2), orderly release will be initiated and further send operations on the socket will fail.

Distinctions between orderly and abortive release when close(2) or exit(2) are called are similar to that of tcp(7).

FEATURES

SCTP provides the following basic features:

  • Compiled into kernel or as a loadable module.
  • Standards support for socket type ‘SOCK_SEQPACKET’.
  • Supports a partial packet delivery interface on all packets. ‘MSG_TRUNC’ set when receiving a packet does not discard the remainder of the packet but permits subsequent reads to read the remainder of the packet.
  • Silly Window Syndrome (SWS) avoidance per RFC 1122. Section 4.2.3.2 and 4.2.3.3 as recommended in the SCTP Implementor's Guide.
  • Nagle algorithm per RFC 896 and RFC 1122. Section 4.2.3 with delayed ACK modifications presented by Minshall in <draft-minshall-tsvwg-nagle-01.txt>.
  • Message disposition and retrieval on connection shutdown or abort, lifetime expiry, and receipt confirmation acknowledgement.
  • Support for hardware assisted checksum for drivers which support ‘NETIF_F_HW_CSUM’.
  • Support for hardware assisted scatter/gather and fragmentation for devices which support ‘NETIF_F_SG’ and ‘NETIF_F_FRAGLIST’.
  • For security of HMACs, SCTP includes a re-keying algorithm for secret keys that rotates secret keys after the key's first cookie lifetime to provide for maximum security for HMACs.
  • High performance routing algorithm alters multi-homed routes on a per-packet basis.
  • Wide range of settings for timers and protocol parameters permitting fast (average 5ms with 100Hz tick clock; 0.5ms with 1000Hz tick clock) fail-over between failed destination addresses on high-speed networks.
  • Deferral of checksum calculation until after socket lookup for protection from software checksum DoS attacks.
  • Support for the changes and modifications in the SCTP Implementers Guide <rfc4460.txt>. (See CAVEATS.).

SCTP provides the following added features:

  • A tcp(7)-compatible mode for sockets of type ‘SOCK_STREAM’ when SCTP is compiled with kernel configuration parameter ‘CONFIG_SCTP_TCP_COMPATIBLE’ set.
  • A udp(7)-compatible mode for sockets of type ‘SOCK_RDM’ when SCTP is compiled with kernel configuration parameter ‘CONFIG_SCTP_UDP_COMPATIBLE’ set.
  • Support for both Adler32 and CRC-32c checksums with automatic detection of checksum on receive when SCTP is compiled with kernel configuration parameters ‘CONFIG_SCTP_ADLER_32’ or ‘CONFIG_SCTP_CRC_32C’ set.
  • Support for multiple HMAC types when compiled with kernel configuration parameters ‘CONFIG_SCTP_HMAC_SHA_1’ or ‘CONFIG_SCTP_HMAC_MD5’.
  • Support for RFC 2960 Appendix A and RFC 3168 compatible Explicit Congestion Notification when compiled with kernel configuration parameter ‘CONFIG_SCTP_ECN’ set.
  • Support for <draft-ietf-tsvwg-addip-sctp-08.txt> Adaptation Layer Indication when compiled with kernel configuration parameter ‘CONFIG_SCTP_ADAPTATION_LAYER_INFO’ set.
  • Support for ADD-IP extensions from <draft-ietf-tsvwg-addip-sctp-08.txt> when compiled with kernel configuration parameter ‘CONFIG_SCTP_ADD_IP’ set.
  • Support for PR-SCTP extensions as described in RFC 3758 when compiled with kernel configuration parameter ‘CONFIG_SCTP_PARTIAL_RELIABILITY’ set.

SYSCTLS

SCTP provides and supports a number of system controls that can be accessed using the /proc/sys/net/ipv4/* files, with the sysctl(2) interface or using sysctl(8).

SCTP supports all socket(7) system controls rmem_default, rmem_max, wmem_default, wmem_max, msg_cost, msg_burst, netdev_max_backlog and optmem_max in the normal fashion. For more information, see socket(7).

SCTP supports ip(7) system controls ip_default_ttl, ip_dynaddr, ip_autoconfig, ip_local_port_range and ip_no_pmtu_disc in the normal fashion. ip(7) system controls ip_forward, ipfrag_high_thresh, ipfrag_low_thresh and ip_always_defrag are not applicable to SCTP. For more information, see ip(7).

The following SCTP specific system controls are provided by SCTP:

sctp_csum_type
Defines the default checksum algorithm that will be used when checksumming packets associated with a socket. Valid values are as follows:
SCTP_CSUM_ADLER_32
for the RFC 2960 Appendix B algorithm. To set this value, SCTP must have been compiled with ‘CONFIG_SCTP_ADLER_32’ or without ‘CONFIG_SCTP_CRC_32C’. When computed in software, Adler 32 checksum algorithm is more amenable to Van Jacobson partial checksum and copy from user approaches and exhibits higher performance than CRC-32c.
SCTP_CSUM_CRC_32C
for the RFC 3309 CRC-32c checksum algorithm. To set this value, SCTP must have been compiled with ‘CONFIG_SCTP_CRC_32C’. When computed in software, CRC-32c checksum is more processor intensive than Adler-32.

As RFC 3309 has been approved and replaces RFC 2960 checksum algorithm, the default value for this system control is now ‘SCTP_CSUM_CRC_32C’. This value may also be set for a given socket using the ‘SCTP_CKSUM_TYPE’ socket option as described in SOCKET OPTIONS. This system control will soon be deprecated, should always be set to ‘SCTP_CSUM_CRC_32C’ and should not be used by portable programs.

sctp_mac_type
Defines the default MAC (Message Authentication Code) type that will be used when signing cookies in INIT-ACK messages. Valid values are:
SCTP_HMAC_SHA_1
for the FIPS 180-1 Secure Hash Algorithm SHA-1 HMAC. SHA-1 performs well on big-endian machines. This option setting is only supported if SCTP was compiled with the kernel configuration parameter ‘CONFIG_SCTP_HMAC_SHA1’ set.
SCTP_HMAC_MD5
for the RFC 1321 Message Digest 5 HMAC. MD5 performs well on little-endian machines. This option setting is only supported if SCTP was compiled with the kernel configuration parameter ‘CONFIG_SCTP_HMAC_MD5’ set.
SCTP_HMAC_NONE
for no secure signature. Not signing the cookie performs well on all machines; however, this option should only be used if some other mechanism provides security (such as IPSec) or the system is closed and trusted. This option setting is always supported.

There is no required or recommended value in RFC 2960. The default value is (in priority of availability) ‘SCTP_HMAC_MD5’, ‘SCTP_HMAC_SHA_1’, then ‘SCTP_HMAC_NONE’. This system control defines the default for new sockets. The MAC for a given socket can be changed before the call to listen(2), or before receiving a passive connection attempt, with the socket option ‘SCTP_MAC_TYPE’ as described under SOCKET OPTIONS.

sctp_valid_cookie_life
Defines the default time interval (in milliseconds) in conjunction with sctp_cookie_inc beyond which a COOKIE-ECHO received with a cookie sent in a INIT-ACK will not longer be accepted. For SCTP, this also limits the default maximum time interval for which the HMAC secret key for the cookie will be valid. Valid values are zero (0) or greater (INT_MAX). Values of zero (0) will be converted to a Linux system clock tick (1000/HZ milliseconds). The default value is the value recommended in RFC 2960 (60,000 milliseconds). This system control defines the default for new sockets. The value for a given socket can be changed with the socket option ‘SCTP_COOKIE_LIFE’ before a call to listen(2), or before receiving passive connection attempt, as described under SOCKET OPTIONS.

Reducing this value will increase the chances that passive connection attempts will fail due to expired cookies. Increasing the value will reduce the overall security of the system by permitting attackers and increased interval to crack HMACs and guess verification tags. This value may be adjusted in conjunction with sctp_cookie_inc to meet most objectives for successful passive connection attempts with the best security afforded by smaller values of sctp_valid_cookie_life.

Unfortunately the ‘SCTP_COOKIE_LIFE’ and ‘SCTP_COOKIE_INC’ must be adjusted to accommodate the slowest peer on the slowest connection. The default setting is adequate for Internet applications.

sctp_cookie_inc
Defines the default time increment (in milliseconds) that will be added to the lifespan of the cookie in an INIT ACK if the received INIT requests cookie preservative to lengthen the lifespan of the cookie. Valid values are zero (0) or greater (INT_MAX). The default value is the value recommended in RFC 2960 5.2.6 (1,000 milliseconds). This system control defines the default for new sockets. The cookie lifetime increment for a given socket can be changed before a call to listen(2), or before receiving a passive connection attempt, with the socket option ‘SCTP_COOKIE_INC’ as described under SOCKET OPTIONS.

This value can be adjusted in conjunction with sctp_valid_cookie_life, above, to meet objectives of successful passive connection attempts and security. The default setting is adequate for Internet applications.

sctp_throttle_itvl
Defines the default time interval (in milliseconds) within which the receiver will not accept more than one INIT or COOKIE ECHO. Zero (don't throttle) is a valid value. The default value is 50 milliseconds. This system control defines the default for new sockets. The throttle interval for a given socket can be changed before the call to listen(2), or before a passive connection attempt, with the socket option ‘SCTP_THROTTLE_ITVL’ as described under SOCKET OPTIONS.

When the HMAC type is SHA-1 or MD5, and when CRC-32c software checksum is used, the implementation is particularly vulnerable to DoS flood attacks using bogus INIT or COOKIE ECHO messages. When SCTP is compiled with ‘CONFIG_SCTP_THROTTLE_PASSIVEOPENS’, this permits the throttling of INIT and COOKIE ECHO messages. Only one INIT and one COOKIE ECHO message will be accepted in the interval set by this control.

sctp_max_istreams
Defines the default maximum number of inbound streams that will be requested when forming or receiving connections on a socket. Valid values are in the range from 1 to 65,535 streams. This system control defines the default for new sockets. The actual value used by a socket for both outgoing and incoming connections can be changed with the socket option ‘SCTP_ISTREAMS’ before a call to connect(2) or accept(2) as described under SOCKET OPTIONS.

Usable default values for sctp_max_istreams are highly dependent upon the intended applications. SIGTRAN UAs, for example, seldom need more than 257 inbound or outbound streams. The default valid is set to thirty-three (33) streams for ‘SOCK_SEQPACKET’ sockets. This system control only affects ‘SOCK_SEQPACKET’ sockets: ‘SOCK_STREAM’ sockets always have both inbound and outbound streams set to one (1).

sctp_req_ostreams
Defines the default requested number of outbound streams that will be requested when forming or receiving connections on a socket. Valid values are in the range from 1 to 65,535 streams. This system control defines the default for new sockets. The actual value used by a socket for both outgoing and incoming connections can be changed with socket option ‘SCTP_OSTREAMS’ before a call to connect(2) or accept(2) as described under SOCKET OPTIONS.

Usable default values for sctp_max_istreams are highly dependent upon the intended applications. SIGTRAN UAs, for example, seldom need more than 257 inbound or outbound streams. The default valid is set to one (1) streams for ‘SOCK_SEQPACKET’ sockets. This system control only affects ‘SOCK_SEQPACKET’ sockets: ‘SOCK_STREAM’ sockets always have both inbound and outbound streams set to one (1).

sctp_ecn
Defines a default flag that allows disabling of Explicit Congestion Notification (ECN) operation for SCTP when cleared. This system control defines the default for new sockets. ECN can be overridden on a per-socket basis with the socket option ‘SCTP_ECN’, as described under SOCKET OPTIONS. For this system control to have any effect, the kernel must have been compiled with both kernel configuration parameters ‘CONFIG_INET_ECN’ and ‘CONFIG_SCTP_ECN’ set.
sctp_adaptation_layer_info
Defines the default adaptation layer information flags that will be sent in an INIT or INIT-ACK message. Valid values include any 32-bit unsigned integer. The default value for backward compatibility is zero (0) which indicates to not send the Adaptation Layer Information parameter in INIT and INIT-ACK. This system control defines the default for new sockets. The actual value for both outgoing and incoming connections can be changed with socket option ‘SCTP_ALI’ before a call to connect(2) or listen(2), or before a passive connection indication on a listening socket, as described under SOCKET OPTIONS. For this system control to have any effect, the kernel must have been compiled with kernel configuration parameter ‘CONFIG_SCTP_ADAPTATION_LEVEL_INFO’ set.
sctp_partial_reliability
Defines the default partial reliability preference that will be used for the socket. Valid values include zero (0) \- no partial reliability reported, one (1) partial reliability support preferred but not required, and two (2), partial reliability support required. The default value for backward compatibility is zero (0). This system control defines the default for new sockets. The actual value for both outgoing and incoming connections can be changed with socket option ‘SCTP_PR’ before a call to connect(2) or listen(2), or before a passive connection indication on a listening socket, as described under SOCKET OPTIONS. For this system control to have any effect, the kernel must have been compiled with kernel configuration parameter ‘CONFIG_SCTP_PARTIAL_RELIABILITY’ set.
sctp_wmem
Defines three values (lower, default, upper) for the socket write buffer. The value associated with a given socket can also be changed with the ‘SO_SNDBUF’ option, see socket(7).
sctp_rmem
Defines three values (lower, default, upper) for the socket read buffer. The value associated with a given socket can also be changed with the ‘SO_RCVBUF’ option, see socket(7).
sctp_max_init_retries
Defines the default number of times that an INIT or COOKIE-ECHO will be resent to a given destination before abandoning an active open attempt. Valid values are zero (0) or greater (INT_MAX). The default value is the value recommended in RFC 2960 (8 retries). This system control defines the default for new sockets. The value for a given socket can be changed with the socket option ‘SCTP_MAX_INIT_RETRIES’ as described under SOCKET OPTIONS.
sctp_max_burst
Defines the default maximum number of MTUs of new data chunks that will be sent in a burst in accordance with <rfc4460.txt>. Valid values are one (1) or greater (INT_MAX). The default value is the value recommended in <rfc4460.txt> (4 MTUs). This system control defines the default for new sockets. The value for a given socket can be changed with the socket option ‘SCTP_MAX_BURST’ as described under SOCKET OPTIONS.
sctp_assoc_max_retrans
Defines the number of times that the sending endpoint will attempt retransmitting a packet on any active destination transport address before it aborts the association. Valid values are zero (0) or greater (INT_MAX). The default value is the value recommended in RFC 2960 (10 retries). This system control defines the default for new sockets. The value for a given socket can be changed with the socket option ‘SCTP_ASSOC_MAX_RETRANS’ as described under SOCKET OPTIONS.

This value should be larger than the sum of the sctp_path_max_retrans values of each of the destinations. Setting this value to less that sum of the sctp_path_max_retrans values for all of the destinations has the interesting effect of permitting a connection to persist even when all destinations have been deemed inactive.

sctp_max_sack_delay
Defines the default interval of time (in milliseconds) that the sending endpoint is permitted to delay an acknowledgement of received data. Valid values are in the range from zero (0) to 500 milliseconds. (RFC 2960 forbids setting this value larger than 500 milliseconds.) The default value is the value recommended in RFC 2960 (200 milliseconds). This system control defines the default for new sockets. The value for a given socket can be changed with the socket option ‘SCTP_SACK_DELAY’ as described under SOCKET OPTIONS.
sctp_rto_min
Defines the default time interval (in milliseconds) that will be used as a RTO (Retransmission Time Out) value when sending packets to a destination transport address. Valid values are zero (0) or greater (INT_MAX) and must be less than or equal to both sctp_rto_initial and sctp_rto_max. The default value is the value recommended in RFC 2960 (1,000 milliseconds). The actual value used can be changed with the socket option ‘SCTP_RTO_MIN’ before a call to connect(2) or accept(2) or before a new destination transport address is added by the peer. After a socket is connected or a destination transport address has been added, the destination-specific value can be changed using the socket option ‘SCTP_RTO’ as described under SOCKET OPTIONS.

In general, sctp_rto_min should not be less than the peer's sctp_max_sack_delay. Otherwise, excessive retransmissions might occur while the peer is delaying acknowledgements.

sctp_rto_initial
Defines the default time interval (in milliseconds) that will be used as an initial RTO (Retransmission Time Out) value when sending packets to a destination for the first time, or after the destination has been idle for some time. Valid values are zero (0) or greater (INT_MAX) and must be in the range from sctp_rto_min to sctp_rto_max. The default value is the value recommended in RFC 2960 (3,000 milliseconds). This system control defines the default for new sockets. The actual value used can be changed with the socket option ‘SCTP_RTO_INITIAL’ before a call to connect(2) or accept(2) or before a new destination transport address is added by the peer. After a socket is connected or a destination transport address has been added, the destination-specific value can be changed using the socket option ‘SCTP_RTO’ as described under SOCKET OPTIONS.

In general, sctp_rto_initial should not be less than the peer's sctp_max_sack_delay. Otherwise, excessive retransmissions might occur while the peer is delaying acknowledgements.

sctp_rto_max
Defines the default time interval (in milliseconds) that will be used as a maximum RTO (Retransmission Time Out) value when sending packets to a destination. Valid values are zero (0) or greater (INT_MAX) and must be greater than or equal to both sctp_rto_min and sctp_rto_initial. The default value is the value recommended in RFC 2960 (60,000 milliseconds). This system control defines the default maximum for new sockets. The actual value used can be changed with the socket option ‘SCTP_RTO_MAX’ before a call to connect(2) or accept(2) or before a new destination transport address is added by the peer. After an socket is connected or a destination transport address has been added, the destination-specific value can be changed using the socket option ‘SCTP_RTO’ as described under SOCKET OPTIONS.

In general, sctp_rto_initial should not be less than the peer's sctp_max_sack_delay. Otherwise, excessive retransmissions might occur while the peer is delaying acknowledgements.

sctp_path_max_retrans
Defines the default number of times that SCTP will attempt retransmitting a packet on to a given destination transport address before it considers that destination transport address inactive. Valid values are zero (0) or greater (INT_MAX). The default value is the value recommended in RFC 2960 (5 retries). This system control defines the default maximum for new sockets. The actual value used can be changed with the socket option ‘SCTP_PATH_MAX_RETRANS’ before a call to connect(2) or accept(2) or before a new destination transport address is added by the peer. After a socket is connected or a destination transport address has been added, the destination-specific value can be changed using the socket option ‘SCTP_RTO’ as described under SOCKET OPTIONS.

Adjusting this value has an effect on the period of time taken to fail-over between destinations for multi-homed connections. Lower values (including zero) will yield faster fail-over response times. Lower values, however, may cause thrashing between destinations contributing to congestion in the network. Default values are applicable to Internet applications.

sctp_heartbeat_itvl
Defines the default interval (in seconds) between successive HEARTBEAT messages used to probe destination transport address for RTT calculation and activity. Valid values are 1 second or greater. The default value is the value recommended in RFC 2960 (30 seconds). This system control defines the default for new sockets. The actual value used can be changed with the socket option ‘SCTP_HEARTBEAT_ITVL’ before a call to connect(2) or accept(2) or before a new destination transport address is added by the peer. After a socket is connected or a destination transport address has been added, the destination-specific value can be changed using the socket option ‘SCTP_HB’ as described under SOCKET OPTIONS.

If the kernel configuration parameter ‘CONFIG_SCTP_THROTTLE_HEARTBEATS’ is set, then half this value is also used for throttling heartbeats. Then only two heartbeats per interval are permitted, any additional heartbeats are discarded.

SOCKET OPTIONS

To set or get a socket option, call getsockopt(2) to read or setsockopt(2) to write the option with the socket level argument set to ‘SOL_SCTP’. In addition, most ‘SOL_SOCKET’ and ‘SOL_IP’ socket options are valid on SCTP sockets. For more information see socket(7) and ip(7).

The following ‘SOL_SOCKETsocket(7) socket options are supported by SCTP:

SO_KEEPALIVE
Set or get a flag that controls heartbeats for the entire association. See socket(7) for additional information.

Normally SCTP is required to send HEARTBEAT chunks on a per-destination basis. Clearing this flag (setting ‘SO_KEEPALIVE’ to zero) disables exchanging heartbeats on an association level. Exchanging heartbeats is an essential part of the Stream Control Transmission Protocol (SCTP). It is required for clearing retransmission counts against destinations that otherwise will not be cleared if no data is sent and acknowledged to that destination. Disabling heartbeats is provided for in the SCTP specifications (RFC 2960); however, disabling heartbeats is not recommended. This is in contrast to tcp(7) that only rarely heartbeats and for which heartbeats are neither an essential nor necessary part of the protocol.

Heartbeats can also be enabled or disabled on a destination basis using the ‘SCTP_HB’ socket option. It is also possible to generate a HEARTBEAT under user control by sending heartbeat data with the ‘MSG_PROBE’ flag set using send(2), sendto(2) or sendmsg(2).

SO_OOBINLINE
If this option is enabled, out of order data that has been received on a stream will be placed between the ordered data for that stream. Otherwise, out of order data is only returned on a read call when the ‘MSG_OOB’ flag is set when receiving. This option is ignored for ‘SOCK_RDM’ sockets and only applies to ‘SOCK_STREAM’ and ‘SOCK_SEQPACKET’ sockets. See socket(7) for additional information.
SO_BINDTODEVICE
Binds the socket to a particular device. This is not yet supported for SCTP; however, support for it is planned for the future. See socket(7) for additional information.
SO_REUSEADDR
Supported by SCTP without modification; however, consideration is made for binding of multiple transport addresses. See socket(7) for additional information.
SO_RCVLOWAT
SO_SNDLOWAT
SO_RCVTIMEO
SO_SNDTIMEO
SO_DEBUG
SO_TYPE
SO_DONTROUTE
SO_SNDBUF
SO_RCVBUF
SO_LINGER
SO_PRIORITY
SO_ERROR
These socket options are supported by SCTP without modification. See socket(7) for additional information.

The following ‘SOL_IPip(7) socket options are supported by SCTP:

IP_OPTIONS
Set or get the IP options to be sent with every packet from this socket. See ip(7) for additional information.
IP_PKTINFO
Pass an ‘IP_PKINFO’ ancillary message that contains the pktinfo structure that supplies some information about the incoming or outgoing packet. This only works for ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’ sockets. It is ignored for ‘SOCK_STREAM’ sockets. For setsockopt(2) and getsockopt(2), the argument is a flag that tells the socket whether the ‘IP_PKTINFO’ message should be passed or not. The message itself can only be sent or retrieved as a control message with a packet using recvmsg(2) or sendmsg(2).
          struct in_pktinfo {
              unsigned int    ipi_ifindex;    /* Interface index      */
              struct in_addr  ipi_spec_dst;   /* Local address        */
              struct in_addr  ipi_addr;       /* Header Dest Address  */
          };
ipi_ifindex
is the unique index of the interface the packet was received on, or the index of the interface upon which the packet is to be sent;
ipi_spec_dst
is the local address of the received packet or sent packet, and
ipi_addr
is the destination address in the packet header.

If ‘IP_PKTINFO’ is passed to sendmsg(2) then the outgoing packet will be sent over the interface specified in ipi_ifindex with the destination address set to ipi_spec_dst.

This option is used to control the source (local) address of packets sent with sendmsg(2) and to retrieve the destination (local) address of packets received with recvmsg(2). See ip(7) for additional information.

Support for ‘IP_PKTINFO’ is similar to support for this socket option under udp(7). Under udp(7), ‘IP_PKTINFO’ is used for multi-homed UDP hosts to specify the local address to sendmsg(2) and return remote address from recvmsg(2). SCTP uses this in a similar fashion where the choice of addresses consists of the address space of the association.

IP_RECVTOS
Set or get the flag indicating whether the recvmsg(2) call will return the type of service field for the received packet in an ancillary message as a ‘IP_TOS’ control message for sockets of type ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’. This option is ignored for ‘SOCK_STREAM’ sockets. See ip(7) for additional information.
IP_RECVTTL
Set or get the flag indicating whether the recvmsg(2) call will return the time to live field for the received packet in an ancillary message as a ‘IP_TTL’ control message for sockets of type ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’. This option is ignored for ‘SOCK_STREAM’ sockets. See ip(7) for additional information.
IP_RECVOPTS
Set or get the flag indicating whether the recvmsg(2) call will return the IP options for the received packet in an ancillary message as an ‘IP_OPTIONS’ control message for sockets of type ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’. This option is ignored for ‘SOCK_STREAM’ sockets. See ip(7) for additional information.
IP_RETOPTS
Set or get the flag indicating whether the recvmsg(2) call will return the IP options for the received packet in an ancillary message as an ‘IP_RETOPTS’ control message for sockets of type ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’. This option is ignored for ‘SOCK_STREAM’ sockets. See ip(7) for additional information.

In contrast to ‘IP_OPTIONS’, the ‘IP_RETOPTS’ ancillary message contains raw, unprocessed options, with the time stamp and route record options not filled in for this hop. It is also possible to pass an ‘IP_RETOPTS’ ancillary message to sendmsg(2).

IP_TOS
Set or get the default type of service to be used in IP packets associated with the connection. For ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’ sockets, this option can also be passed to sendmsg(2) in the ancillary data and will be used as the type of service field in the IP packet containing the data chunk associated with the user data provided in the call to sendmsg(2). For ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’ sockets, this option returns the type of service parameter associated with a packet in the ancillary data returned from a call to recvmsg(2) when the ‘IP_RECVTOS’ option has been set on the socket. This option is ignored for ‘SOCK_STREAM’ sockets. See ip(7) for additional information.
IP_TTL
Set or get the default time to live to be used in IP packets associated with the connection. This option can also be passed to sendmsg(2) in the ancillary data and will be used as the time to live field in the IP packet containing the data chunk associated with the user data provided in the call to sendmsg(2). See ip(7) for additional information.
IP_MTU
For SCTP sockets, this returns only the Path MTU for the association. This value is the minimum MTU of all the peer destinations. See SCTP socket options for a mechanism for obtaining MTU on a per-destination basis. When the peer is not multi-homed, this option returns the same value as would be obtained on a per-destination basis. See ip(7) for additional information.
IP_RECVERR
For SCTP sockets, this enables extended reliable error messages with the use of ‘SO_ERROR’ as for tcp(7). Error queues are not supported for SCTP (they are not supported for tcp(7) either). As for tcp(7), SCTP does not permit calling recvmsg(2) with the ‘MSG_ERRQUEUE’ flag for ‘SOCK_SEQPACKET’ and ‘SOCK_STREAM’ sockets.
IP_PMTU_DISCOVER
Supported for SCTP sockets without modification. See ip(7) for additional information.

The following ‘SOL_SCTP’ socket options are supported: (A number of the following socket options may also be passed as an ancillary message with level ‘SOL_SCTP’ when calling sendmsg(2) or returned as a control message from a call to recvmsg(2).)

SCTP_NODELAY
Turn the Nagle algorithm off. This means that packets are always sent as soon as possible and no unnecessary delays are introduced, at the cost of more packets in the network. Expects an integer boolean flag.

This parallels the ‘TCP_NODELAY’ socket option for compatibility with tcp(7). ‘SCTP_NODELAY’ and ‘TCP_NODELAY’ can be used interchangeably. For ‘SOCK_STREAM’ sockets, this setting applies to the default stream as set by the ‘SCTP_SID’ socket option. For regular ‘SOCK_SEQPACKET’ sockets, this setting applies to the entire association. For ‘SOCK_STREAM’ sockets, this setting has the same effect as tcp(7). This option has no effect on ‘SOCK_RDM’ sockets. See tcp(7) for additional information.

When Nagle is enabled, SCTP uses the Nagle algorithm (RFC 896) for bundling DATA chunks into a packet. This results in far fewer short packets in the network. The algorithm is that described in RFC 896 and RFC 1122 with the Minshall modifications to accommodate delayed SACK as described in <draft-minshall-tsvwg-nagle-01.txt>. (Note: later versions of tcp(7) also in include the Minshall modification).

SCTP_MAXSEG
Set or get the maximum segment size for outgoing packets. Values greater than the association MTU are ignored and have no effect.

This parallels the ‘TCP_MAXSEG’ socket option for compatibility with tcp(7). ‘SCTP_MAXSEG’ and ‘TCP_MAXSEG’ can be used interchangeably. This option is applicable to both ‘SOCK_SEQPACKET’ and ‘SOCK_STREAM’ sockets.

This value determines the maximum size (in bytes) above which SCTP will fragment larger DATA chunks into smaller DATA chunks, and beneath which SCTP will bundle DATA chunks into a single packet or combine smaller DATA chunks into larger DATA chunks. Normally this value is the association MTU value minus the size of the current IP and SCTP headers, minus the size of one DATA chunk header. If the user sets this to a lower value, the lower value will be used.

SCTP_CORK
If enabled don't send out partial frames. All queued partial frames are sent when the option is cleared again. This is useful for prefixing headers before calling sendfile(2), or for throughput optimization. This option cannot be combined with ‘SCTP_NODELAY’.

This parallels the ‘TCP_CORK’ socket option for compatibility with tcp(7). ‘SCTP_CORK’ and ‘TCP_CORK’ can be used interchangeably. For ‘SOCK_STREAM’ sockets, this setting applies to the default stream as set by the ‘SCTP_SIB’ socket option. For regular ‘SOCK_SEQPACKET’ sockets, this setting applies to the entire association. This option has no effect on ‘SOCK_RDM’ sockets.

SCTP_SID
Set or get the default stream identifier for all outgoing packets associated with the connection. If ‘SCTP_SID’ is passed to sendmsg(2) then the outgoing packet will be sent over the stream specified by the integer stream identifier contained in the ancillary message. If ‘SCTP_SID’ is received from a call to recvmsg(2) then the incoming packet was received over the stream specified by the integer stream identifier contained in the ancillary message. See also ‘SCTP_RECVSID’.
SCTP_PPI
Set or get the default payload protocol identifier for all outgoing packets. If ‘SCTP_PPI’ is passed to sendmsg(2) then the outgoing packet will be sent with the payload protocol identifier specified by the integer payload protocol identifier contains in the ancillary message. If ‘SCTP_PPI’ is received from a call to recvmsg(2) then the incoming packet was received with the payload protocol identifier specified the integer payload protocol identifier contained in the ancillary message. See also ‘SCTP_RECVPPI’.
SCTP_RECVSID
When this flag is set, pass a ‘SCTP_SID’ control message with the stream identifier for received packets as an integer in an ancillary message that may be received with recvmsg(2). Otherwise, no ‘SCTP_SID’ control message will be passed with normal data. ‘SCTP_SID’ is always passed for retrieved or negatively acknowledged data.
SCTP_RECVPPI
When this flag is set, pass a ‘SCTP_PPI’ control message with the payload protocol identifier for received packets as an integer in an ancillary message that may be received with recvmsg(2). Otherwise, no ‘SCTP_PPI’ control message will be passed with normal data. ‘SCTP_PPI’ is always passed for retrieved or negatively acknowledged data.
SCTP_HEARTBEAT_ITVL
Set or get the time interval (in seconds) between successive HEARTBEAT messages used to probe destination transport addresses for RTT calculation and activity. Valid values are zero (0) \- do not heartbeat, or a value of 1 second or greater. The default value is set by the system control sctp_heartbeat_itvl. This is the default value that will be assigned to new destinations. Active destinations can be controlled with the socket option ‘SCTP_HB’. This socket option must be set before the call to connect(2) or listen(2), or before a passive connection indication is received on a listening socket.
SCTP_HB
Set or get the heartbeat activation and interval associated with the specified destination address. The expected value is a sctp_hbitvl structure. This option will return an error if it is attempted on a socket in the unconnected state.
          struct sctp_hbitvl {
              struct sockaddr_in
                    dest;   /* destination address      */
              uint  active; /* activation flag          */
              uint  itvl;   /* interval in milliseconds */
          };

The sctp_hbitvl structure has the following fields:

dest
is a sockaddr_in structure that contains the destination address to which the heartbeat setting applies.
active
is an integer boolean activation flag indicating whether heartbeat is active on the destination.
itvl
is the integer heartbeat interval in milliseconds.

For use with setsockopt(2), dest must be one of the valid destination addresses associated with the connection: that is, it must be one of the addresses returned from a call to getpeername(2). Note that heartbeat activity and interval can also be set on an association basis with ‘SO_KEEPALIVE’ and ‘SCTP_HEARTBEAT_ITVL’.

SCTP_RTO_INITIAL
Set or get the time interval (in milliseconds) that will be used as an initial RTO (Retransmission Time Out) value when sending packets to a destination for the first time. Valid values are zero or greater and must be within the range from ‘SCTP_RTO_MIN’ to ‘SCTP_RTO_MAX’. The default value is the value set by sctp_rto_initial. This socket option must be set before the call to connect(2) or listen(2), or before a passive connection attempt, but the value may be controlled on active destination with the ‘SCTP_RTO’ socket option.
SCTP_RTO_MIN
Set or get the time interval (in milliseconds) that will be used as a minimum RTO (Retransmission Time Out) value when sending packets. Valid values are zero or greater and must be less than or equal to the value of ‘SCTP_RTO_MAX’. The default value is set by the system control sctp_rto_min. This socket option must be set before the call to connect(2) or listen(2), or before a passive connection attempt, but the value associated with active destinations can be controlled using the ‘SCTP_RTO’ socket option.
SCTP_RTO_MAX
Set or get the time interval (in milliseconds) that will be used as a maximum RTO (Retransmission Time Out) value when sending packets. Valid values are zero or greater and must be greater than or equal to the value of ‘SCTP_RTO_MIN’. The default value is set by the system control sctp_rto_max. This socket option must be set before the call to connect(2) or listen(2), or before a passive connection attempt, but the value associated with active destinations can be controlled using the ‘SCTP_RTO’ socket option.
SCTP_PATH_MAX_RETRANS
Set or get the number of times that the sending endpoint will attempt retransmitting a packet to a given destination transport address before it considers that destination transport address inactive. Valid values include zero. The default values is set by the system control sctp_path_max_retrans. This is the default value assigned to destinations before the call to connect(2) or listen(2), or before a passive connection attempt. Active destinations can be controlled with the ‘SCTP_RTO’ socket option.
SCTP_RTO
Set or get the retransmission timeout parameters associated with the specified destination address. The expected value is a sctp_rtoval structure. This option will return an error if it is attempted on a socket in the unconnected state.
          struct sctp_rtoval {
              struct sockaddr_in
                    dest;        /* destination address        */
              uint  rto_initial; /* RTO.Initial (milliseconds) */
              uint  rto_min;     /* RTO.Min     (milliseconds) */
              uint  rto_max;     /* RTO.Max     (milliseconds) */
              uint  max_retrans; /* Path.Max.Retrans (retries) */
          };

The sctp_rtoval structure has the following fields:

dest
is a sockaddr_in structure that contains the destination address to which the RTO parameter setting applies.
rto_initial
is the integer initial retransmission timeout value in milliseconds. For expected values see ‘SCTP_RTO_INITIAL’.
rto_min
is the integer minimum retransmission timeout value in milliseconds. For expected values see ‘SCTP_RTO_MIN’.
rto_max
is the integer maximum retransmission timeout value in milliseconds. For expected values see ‘SCTP_RTO_MAX’.
max_retrans
is the integer maximum number of retransmissions. For expected values see ‘SCTP_PATH_MAX_RETRANS’.

For use with setsockopt(2), dest must be one of the valid destination addresses associated with the connection: that is, it must be one of the addresses returned from a call to getpeername(2).

SCTP_CKSUM_TYPE
Set or get the checksum algorithm associated with socket. Valid values are ‘SCTP_CSUM_ADLER_32’ and ‘SCTP_CSUM_CRC_32C’. The default value is set by the system control sctp_csum_type. This socket option must be set before the call to connect(2) or listen(2), or before a passive connection attempt on a listening socket.
SCTP_MAC_TYPE
Set or get the MAC (Message Authentication Code) type that will be used when signing cookies in INIT ACK messages. Valid values are ‘SCTP_HMAC_SHA_1’, ‘SCTP_HMAC_MD5’, and ‘SCTP_HMAC_NONE’. The default value is set by the system control sctp_mac_type. This socket option must be set before the call to listen(2), or before a passive connection attempt on a listening socket.
SCTP_COOKIE_LIFE
Set or get the cookie lifetime associated with a socket. This is the amount of time that cookies sent to a peer endpoint in an INIT-ACK message will be valid. For SCTP this also limits the maximum for which the HMAC secret key for the cookie will be valid. The value is a integer time interval in milliseconds. Valid values are zero (0) or greater (INT_MAX). The default value is set by the system control sctp_cookie_life. This socket option must be set before the call to listen(2), or before receiving a passive connection attempt. When changing this value, the new value will apply to all passive connection attempts (INIT messages) received on a listening socket after the change is made.

Reducing this value will increase the chances that passive connection attempts will fail due to expired cookies. Increasing the value will reduce the overall security of the system by permitting attackers and increased interval to crack HMACs and guess verification tags. This value may be adjusted in conjunction with ‘SCTP_COOKIE_INC’ to meet most objectives for successful passive connection attempts with the best security afforded by smaller values of ‘SCTP_COOKIE_LIFE’.

Unfortunately the ‘SCTP_COOKIE_LIFE’ and ‘SCTP_COOKIE_INC’ must be adjusted to accommodate the slowest peer on the slowest connection. The default setting is adequate for Internet applications.

SCTP_COOKIE_INC
Set or get the time increment (in milliseconds) that will be added to the lifespan of the cookie in an INIT ACK if the sender of the INIT requested cookie preservation to lengthen the lifespan of the cookie. Valid values include zero. The default value is set by the system control sctp_cookie_inc. This socket option must be set before the call to listen(2), or before a passive connection attempt on the listening socket, but can be read at any time.
SCTP_THROTTLE_ITVL
Set or get the interval (in milliseconds) within which the receiver will not accept more than one INIT or COOKIE ECHO. Zero (don't throttle) is a valid value. The default is set by the system control sctp_throttle_itvl. This socket option must be set before the call to listen(2), or before a passive connection attempt on the listening socket.
SCTP_ISTREAMS
Set the maximum number of inbound streams or get the actual number of inbound streams associated with a connection. Valid values are from 1 to 16,736. The default value is set by the system control sctp_max_istreams. This socket option must be set before the call to connect(2) or listen(2), or before a passive connection attempt, but can be read at any time. For tcp(7)-compatible ‘SOCK_STREAM’ sockets, the number of inbound streams is fixed at one (1) and this socket option has no effect.
SCTP_OSTREAMS
Set the number of requested outbound streams or get the actual number of outbound streams associated with a connection. Valid values are from 1 to 16,736. The default value is set by the system control sctp_req_ostreams. This socket option must be set before the call to connect(2) or listen(2), or before a passive connection attempt on a listening socket, but can be read at any time. For tcp(7)-compatible ‘SOCK_STREAM’ sockets, the number of outbound streams is fixed at one (1) and this socket option has no effect.
SCTP_ECN
When set to zero (0), disables the local transport Explicit Congestion Notification (ECN) capability, or get the transport ECN capability of the peer on a connected socket.

This socket option supports the ECN capability of RFC 3168 and Appendix A of RFC 2960 and is only available if SCTP was compiled with the kernel configuration parameters ‘CONFIG_INET_ECN’ and ‘CONFIG_SCTP_ECN’ set.

SCTP_ALI
Set the adaptation layer information to be used in the INIT or INIT-ACK on all passive or active connection attempts on the socket, or get the adaptation layer information provided by the peer on a connected socket.

When set to zero (0), no adaptation layer information will be included in the INIT or INIT-ACK; when non-zero, it contains the flag bits that will be sent in the adaptation layer information in the INIT or INIT-ACK when set before the call to connect(2) or listen(2), or before a passive connection information is received on a listening socket.

If the socket is in a disconnected state (and has never been connected), getting this option returns zero (0). If the socket has been in a connected state, getting this option returns zero (0) if no adaptation layer information was present during connection, or returns the adaptation layer information bits if provided by the peer.

This socket option supports the adaptation layer information feature described in <draft-ietf-tsvwg-addip-sctp-08.txt> and is only supported if SCTP was compiled with kernel configuration parameter ‘CONFIG_SCTP_ADAPTATION_LAYER_INFO’ set.

SCTP_PR
Set whether Partial Reliability (RFC 3758) will be supported or required on connection establishment, or get the indication of support for PR-SCTP provided by the peer on a connected socket. Valid values are as follows:
SCTP_PR_NONE
Do not place or respond with Forward TSN parameter in an INIT or INIT-ACK indicating that this socket does not support PR-SCTP.
SCTP_PR_PREFERRED
Place and respond with a Forward TSN parameter in an INIT or INIT-ACK indicating to the peer that we support PR-SCTP for this connection, but do not require the peer to support PR-SCTP.
SCTP_PR_REQUIRED
Place and respond with a Forward TSN parameter in an INIT or INIT-ACK indicating to the peer that we support PR-SCTP and require the peer to do the same.

The default setting is provided by the sctp_pr system control.

For a connected socket, when this flag is true, it indicates that the peer supports PR-SCTP. When this flag is false, it indicates that the peer does not support PR-SCTP.

This socket options supports the partial reliability feature (RFC 3758) and is only available if SCTP was compiled with the kernel configuration parameter ‘CONFIG_SCTP_PARTIAL_RELIABILITY’ set.

SCTP_MAX_INIT_RETRIES
Set or get the number of times that an INIT or COOKIE ECHO will be resent before abandoning the association initialization. Valid values include zero. The default value is set by the system control sctp_max_init_retries. This socket option must be set before the call to connect(2) or listen(2), or before a passive connection attempt on a listening socket.
SCTP_MAX_BURST
Set or get the number of MTUs of data that will be sent in a single burst as defined by <rfc4460.txt>. Valid values are one (1) or greater. The default value is set by the system control sctp_max_burst. This socket option may be changed at any time during the life of the socket.
SCTP_ASSOC_MAX_RETRANS
Set or get the number of times that the sending endpoint will attempt retransmitting a packet on a given association before it aborts the association. Valid values include zero. The default value is set by the system control sctp_assoc_max_retrans. This value should be larger than the sum of all the ‘SCTP_PATH_MAX_RETRANS’ values of each of the destinations. This socket option may be changed at any time during the life of the socket.
SCTP_SACK_DELAY
Set or get the maximum SACK delay as the interval of time (in milliseconds) that the sending endpoint will delay an acknowledgement of a received data chunk. Valid values are in the range from 0 to INT_MAX, however, the value of the maximum SACK delay should not exceed 500 milliseconds (setting this value to greater than 500 milliseconds is forbidden by RFC 2960) for Internet Applications. The default value is set by the system control sctp_sack_delay. This socket option may be changed at any time during the life of the socket.
SCTP_DISPOSITION
Gets or sets a flag that determines whether SCTP will retain and deliver messages that were not successfully acknowledged by the peer for retrieval, or will deliver confirmation of acknowledgement for messages successfully acknowledged by the peer. If ‘SCTP_DISPOSITION’ is return in a control message from a call to recvmsg(2) with the ‘MSG_CONFIRM’ flag set, then the read packet represents a packet that was held for retrieval, exceeded its life-time, was dropped by PR-SCTP or had message confirmation set and was successfully acknowledged. In addition, if the message was successfully acknowledged, the ‘MSG_CONFIRM’ flag will be returned in a call to recv(2), recvfrom(2) or recvmsg(2). Valid values are:
SCTP_DISPOSITION_NONE
When this option is set to ‘SCTP_DISPOSITION_NONE’, messages will not be retained for retrieval and acknowledgements will not be provided for messages unless overridden with the ‘MSG_CONFIRM’ flag to send(2), sendto(2) or sendmsg(2).
SCTP_DISPOSITION_UNSENT
When set to ‘SCTP_DISPOSITION_UNSENT’, SCTP will retain and provide for retrieval only messages that were unsent. When set to ‘SCTP_DISPOSITION_UNSENT’ in an ancillary message returned by recvmsg(2) called with the ‘MSG_CONFIRM’ flag set, the read data represents a packet that was unsent at the time that the connection shut down or aborted. When ‘SCTP_PR’ is enabled on the connection, unsent data that was dropped by PR-SCTP will be delivered before shut down or abort.
SCTP_DISPOSITION_SENT
When set to ‘SCTP_DISPOSITION_SENT’, SCTP will retain and provide for retrieval all messages that were sent and unacknowledged, or that were unsent at the time that the connection shut down or aborted. When set to ‘SCTP_DISPOSITION_SENT’ in an ancillary message returned by recvmsg(2) called with the ‘MSG_CONFIRM’ flag set, then the read data was a packet that was sent but not acknowledged (with a cumulative ack) before the connection was shut down or aborted. When ‘SCTP_PR’ is enabled on the connection, sent data that was dropped by PR-SCTP will be delivered before shut down or abort.
SCTP_DISPOSITION_GAP_ACKED
When set to ‘SCTP_DISPOSITION_GAP_ACKED’, SCTP will retain and provide for retrieval all messages that were sent and gap acknowledged, sent and unacknowledged, or unsent at the time that the connection shut down or aborted. When set to ‘SCTP_DISPOSITION_GAP_ACKED’ in an ancillary message returned by recvmsg(2) called with the ‘MSG_CONFIRM’ flag set, then the read data was a packet that was sent but not acknowledged (with a cumulative ack) before the connection was shut down or aborted. When ‘SCTP_PR’ is enabled on the connection, gap acknowledged data that was dropped by PR-SCTP will be delivered before shut down or abort.
SCTP_DISPOSITION_ACKED
When set to ‘SCTP_DISPOSITION_ACKED’, SCTP will retain and provide for retrieval acknowledgements for all messages that were confirmed delivered (by cumulative ack). When set to ‘SCTP_DISPOSITION_ACKED’ in the ancillary message return by recvmsg(2) called with the ‘MSG_CONFIRM’ flag set, then the read data was a packet that was sent and acknowledged (with a cumulative ack) before the connection was shut down gracefully or at any time before shut down or abort.

This option permits messages that are unsent, sent but not acknowledged or sent and gap acknowledged, to be retrieved from the socket before close. This is accomplished by setting the ‘SCTP_DISPOSITION’ socket option prior to shut down or abort, and then calling recvmsg(2) after ‘POLLHUP’, ‘SIGPIPE’ or ‘EPIPE’ indicating shutdown or abort of the connection. Messages then read with the ‘MSG_CONFIRM’ flag set on call to recv(2), recvfrom(2) or recvmsg(2) will have the ‘SCTP_DISPOSITION’ ancillary message attached and will indicate whether they were ‘SCTP_DISPOSITION_UNSENT’, ‘SCTP_DISPOSITION_SENT’ or ‘SCTP_DISPOSITION_GAP_ACKED’.

If the socket option ‘SCTP_PR’ is set on the socket and the peer supports PR-SCTP, messages which have failed partial reliable delivery (were dropped) will also be retrieved by recvmsg(2) called with the ‘MSG_CONFIRM’ flag set, with the ‘SCTP_DISPOSITION’ ancillary data message before shutdown. SCTP must have been compiled with ‘CONFIG_SCTP_PARTIAL_RELIABILITY’ for this feature to be available.

Alternatively, if the socket option ‘SCTP_DISPOSITION’ is set to ‘SCTP_DISPOSITION_ACKED’ or messages were sent with the ‘MSG_CONFIRM’ flag set to send(2), sendto(2) or sendmsg(2), then a call to recv(2), recvfrom(2) or recvmsg(2) with the ‘MSG_CONFIRM’ flag set will return acknowledgements with a ‘SCTP_DISPOSITION’ control message set to ‘SCTP_DISPOSITION_ACKED’ for all acknowledged messages a the time of the call. Care should be taken when using this receipt confirmation service as the message will be held in the transmit buffers until confirmation has been received by the user. Receipt confirmation also has an impact on the performance of SCTP.

SCTP_LIFETIME
Get or set the SCTP lifetime or PR-SCTP timed reliability lifetime associated with messages which are sent on this socket. When this option is included as an control message to sendmsg(2), the specified lifetime is associated with the written message.

Ordered messages waiting for acknowledgement beyond this lifetime will cause subsequent writes to the same stream to fail until all failed messages have been retrieved with recvmsg(2) with the ‘MSG_CONFIRM’ flag set. Subsequent unordered writes to the stream will succeed, although unordered data can also be collected by setting both ‘MSG_OOB’ and ‘MSG_CONFIRM’ in a call to recvmsg(2).

SCTP_ADD
Sets a flag that indicates whether SCTP will support the ADD-IP extensions (ADD IP and DEL IP) on this socket, or gets a flags that indicates whether the peer supports the ADD-IP extensions on a connected socket. When the flag is set, requests that SCTP respond to ASCONF chunks with ADD IP or DEL IP requests. When the flag is unset, SCTP will refuse these requests. The default setting for this flag is unset for new sockets. This option is only available when the kernel is compiled with kernel configuration parameter ‘CONFIG_SCTP_ADD_IP’ set.
SCTP_ADD_IP
When set, requests that the provided IP address (addr), provided in a sockaddr_in structure be added to the local IP addresses associated with the connection. If the socket is in a connected or connecting state, this invokes the ASCONF procedure to add the IP address to the association. If the socket is in a disconnected state, setting this option will fail. This option is only available when the kernel is compiled with kernel configuration parameter ‘CONFIG_SCTP_ADD_IP’ set.

If a connected socket was initially bound to ‘INADDR_ANY’, additional IP addresses may be automatically added to the socket if new network interfaces are added to the system, or if existing network interfaces are configured with ifconfig(8) or equivalent commands.

SCTP_DEL_IP
When set, requests that the provided IP address (addr), provided in a sockaddr_in structure be deleted from the local IP addresses associated with the connection. If the socket is in a connected or connecting state, this invokes the ASCONF procedure to remove the IP address from the association. If the socket is in a disconnected state, setting this option will fail. This option is only available when the kernel is compiled with kernel configuration parameter ‘CONFIG_SCTP_ADD_IP’ set.

If the socket was initially bound to ‘INADDR_ANY’, IP addresses may be automatically unbound from the socket if network interfaces are removed from the system, or if network interfaces are reconfigured with ifconfig(8) or equivalent commands.

SCTP_SET
Sets a flag that indicates whether SCTP will support the ADD-IP extensions (SET PRIMARY) on this socket, or gets a flags that indicates whether the peer supports the ADD-IP extensions on a connected socket. When the flag is set, requests that SCTP respond to ASCONF chunks with SET PRIMARY requests. When the flag is unset, SCTP will refuse these requests. The default setting for this flag is unset for new sockets. This option is only available when the kernel is compiled with kernel configuration parameter ‘CONFIG_SCTP_ADD_IP’ set.
SCTP_STATUS
Gets the association status and the status associated with each of the destination transport addresses forming the association. The returned value is a sctp_astat structure following by assoc_nrep sctp_dstat structures (one for each destination transport address as returned by getpeername(2)).
          struct sctp_astat {
              uint assoc_rwnd;  /* receive window           */
              uint assoc_rbuf;  /* receive buffer           */
              uint assoc_nrep;  /* destinations reported    */
          };
          
          struct sctp_dstat {
              struct sockaddr_in
                    dest;       /* destination address      */
              uint dst_cwnd;    /* congestion window        */
              uint dst_unack;   /* unacknowledged chunks    */
              uint dst_srtt;    /* smoothed round trip time */
              uint dst_rvar;    /* rtt variance             */
              uint dst_rto;     /* current rto              */
              uint dst_sst;     /* slow start threshold     */
          };

The sctp_astat structure has the following fields:

assoc_rwnd
is the current advertised receive window in bytes.
assoc_rbuf
is the current receive buffer size in bytes.
assoc_nrep
is the number of sctp_dstat structures that follow this structure.

The sctp_dstat structure has the following fields:

dest
is the address associated with this sctp_dstat structure.
dst_cwnd
is the congestion window for the given destination transport address in bytes.
dst_unack
is the number of unacknowledged DATA chunks outstanding to the given destination transport address in chunks.
dst_srtt
is the current smoothed round trip time for the destination transport address in milliseconds.
dst_rvar
is the RTT variance for the destination transport address in milliseconds.
dst_rto
is the current value of the RTO for the destination transport address in milliseconds.
dst_sst
is the current value of the slow start threshold in bytes.

SCTP_DEBUG_OPTIONS
Not Documented. (This socket option provides for special debugging functions intended for developers of SCTP.)

IOCTLS

These I/O controls can be accessed using ioctl(2). The correct syntax is:

     int value;
     error = ioctl(sctp_socket, ioctl_type, &value);

All socket(7) I/O controls are supported by SCTP without modification: ‘SIOCGSTAMP’, ‘SIOCSPGRP’, ‘FIOASYNC’ and ‘SIOCGPGRP’. All socket(7) fcntls are supported by SCTP: ‘FIOCGETOWN’ and ‘FIOCSETOWN’.

The following tcp(7) I/O controls are supported by SCTP:

SIOCINQ
Returns the amount of queued unread data in the receive buffer. Argument is a pointer to an integer.
SIOCATMARK
Returns true when all urgent data has already been received by the user program. This is used together with ‘SO_OOBINLINE’. Argument is a pointer to an integer for the test result.
SIOCOUTQ
Returns the amount of unsent data in the socket send queue in the passed integer value pointer.

ERROR HANDLING

When a network error occurs, SCTP tries to resend the packet. If it doesn't succeed after some time, either ‘ETIMEDOUT’ or the last received error on this connection is reported.

Some applications require a quicker error notification. This can be enabled with the ‘SOL_IP’ level ‘IP_RECVERR’ socket option. When this option is enabled, all incoming errors are immediately passed to the user program. Use this option with care: it makes SCTP less tolerant to routing changes and other normal network conditions.

NOTES

When an error occurs doing a connection setup occurring in a socket write ‘SIGPIPE’ is only raised when the ‘SO_KEEPOPEN’ socket option is set.

SCTP has no real out-of-band or urgent data; it has out-of-order data. In Linux this means if the other end sends newer out-of-band data the older urgent data may arrive later.

If the socket option ‘SO_KEEPALIVE’ is not set (see socket(7)), SCTP will not generate heartbeats to any destination. For regular ‘SOCK_SEQPACKET’ and ‘SOCK_RDM’ sockets, ‘SO_KEEPALIVE’ defaults to set. For tcp(7)-compatible ‘SOCK_STREAM’ sockets, ‘SO_KEEPALIVE’ defaults to unset.

ERRORS

EPIPE
The other end closed the socket unexpectedly or a read is executed on a shut down socket.
ETIMEDOUT
The other end didn't acknowledge retransmitted data after some time.
EAFNOTSUPPORT
Passed socket address type in sin_family was not ‘AF_INET’ or ‘AF_UNSPEC’.

Any errors defined for ip(7) or the generic socket(7) layer may also be returned for SCTP.

NETWORK STATISTICS

Protocol Information

SCTP keeps a number of statistics provided for in the the IP MIB. IP protocol statistics are available in ‘/proc/net/snmp’ as well as with the -s or –statistics flag to netstat(8). For additional information see proc(5) and netstat(8). ICMP Protocol statistics that are applicable to SCTP are as follows:

InErrors
The number of ICMP messages received in error. This represents the value for all protocols including SCTP.

SCTP provides the following information in the Linux MIB. Linux MIB statistics are available in ‘/proc/net/netstat’. For additional information see proc(5). Linux protocol statistics that are applicable also to SCTP are as follows:

LockDroppedIcmps
The number of ICMP errors that were dropped because the socket was locked.
ListenOverflows
The number of COOKIE-ECHO chunks dropped due to listen queue overflows.

SCTP provides for SNMP Protocol Information following the SCTP MIB <rfc3873.txt>. Protocol information is available in ‘/proc/net/snmp’ as well as with the -s flag to the netstat(8) command. SCTP Protocol Statistics that are applicable to SCTP are as follows:

RtoAlgorithm
The algorithm used to determine the timeout value (T3-rtx) used for retransmitting unacknowledged chunks.
RtoMin
The minimum value for the transmission timeout value. This value can be obtained by reading the system control sctp_rto_min. A retransmission time value of zero means immediate retransmission. The value of this object has to be less than or equal to RtoMax's value.
RtoMax
The maximum value for the retransmission timeout value. This value can be obtained by reading the system control sctp_rto_max. A retransmission timeout value of zero means immediate retransmission. The value of this object has to be greater than or equal to RtoMin's value.
RtoInitial
The initial value for the retransmission timer. This value can be obtained by reading the system control sctp_rto_initial. A retransmission time value of zero means immediate retransmission.
MaxAssoc
The maximum number of associations. For SCTP there is no controllable upper limit on the maximum number of associations. The maximum number of associations is constrained by the system maximum number of file descriptors, the process maximum number of file descriptors, and the amount of memory in the system. Therefore, this value will always be -1.
ValCookieLife
The valid cookie life for COOKIEs in the initialization procedure. This value can be obtained by reading the system control sctp_valid_cookie_life.
MaxInitRetr
The maximum number of times that an INIT or COOKIE-ECHO chunk will be retransmitted during the startup of an association. This value can be obtained by reading the system control sctp_max_init_retries.
CurrEstab
The number of SCTP sockets in the established state.
ActiveEstabs
The number of times that a connect(2) call succeeded on an SCTP socket.
PassiveEstabs
The number of times that a accept(2) call succeeded on an SCTP socket.
Aborteds
The number of times that an established SCTP socket completed an abortive release.
Shutdowns
The number of times that an established SCTP socket completed an orderly release.
OutOfBlues
The number of out of the blue packets received. Out of the blue packets are packets for which no corresponding SCTP socket could be found.
ChecksumErrors
The number of received packets that discovered a checksum error and were discarded.
OutCtrlChunks
The number of SCTP Control Chunks that were sent, excluding retransmissions.
OutOrderChunks
The number of SCTP Data Chunks that were sent with the Unordered Bit clear, excluding retransmissions.
OutUnorderChunks
The number of SCTP Data Chunks that were sent with the Unordered Bit set, excluding retransmissions.
InCtrlChunks
The number of SCTP Control Chunks that were received and processed, excluding duplicates.
InOrderChunks
The number of SCTP Data Chunks that were received with the Unordered Bit clear, excluding duplicates.
InUnorderChunks
The number of SCTP Data Chunks that were received with the Unordered Bit set, excluding duplicates.
FragUsrMsgs
The number of times that SCTP further fragmented a user message.
ReasmUserMsgs
The number of times that SCTP reassembled fragmented chunks into a user messages.
OutSCTPPacks
The number of packets delivered for transmission to the IP layer.
InSCTPPacks
The number of packets received for processing from the IP layer.
DiscontinuityTime
The last time at which SCTP statistics suffered a discontinuity.

Connection Information

SCTP provides for SNMP Connection Information following the SCTP MIB <rfc3873.txt>. Connection information is available in ‘/proc/net/sctp’ but is not yet available with a -sctp flag to the netstat(8) command. (Extensions to the netstat(8) command are required to access this information.)

Socket Usage Information

SCTP provides for socket usage information available in ‘/proc/net/sockstat’.

CAVEATS

SCTP does not subscribe to the RFC 2960 restriction to assign sequential TSNs (Transmit Sequence Numbers) to each fragmented DATA chunk of a large record for ‘SOCK_SEQPACKET’ sockets. Multiple calls to write(2), send(2), sendto(2) or sendmsg(2) for portions of different records may result in fragments from multiple records being assigned interleaving TSNs. Portable programs should refrain from writing record fragments to more than one stream at a time.

SCTP ignores the source address list in INIT and INIT-ACK chunks when searching for Transmission Control Blocks in opposition to <rfc4460.txt> section 2.18. This is because the procedure described there introduces severe vulnerability to DoS and Spoofing attacks. SCTP does not have this vulnerability.

SCTP ignores the source address list in INIT chunks when searching for Transmission Control Block matches in opposition to <rfc4460.txt> section 2.6. This is because the procedure described there introduces severe vulnerability to DoS attacks by revealing detailed information about existing associations. SCTP does not have this vulnerability.

SCTP does not implement the UDP-like interface of <draft-ietf-tsvwg-sctpsocket-07.txt>. This is because the socket interface presented in that draft provides unorthodox interface to a ‘SOCK_SEQPACKET’ socket which is against both the traditional and standard usage of ‘SOCK_SEQPACKET’ sockets in BSD, XNS 5.2, and POSIX. In BSD, XNS 5.2 and POSIX, ‘SOCK_SEQPACKET’ sockets are strictly connection-oriented, whereas in this draft they are connectionless. A connectionless use of ‘SOCK_SEQPACKET’ would conflict with common standard socket code used by X.25, AX.25, DECNET, and other users of ‘SOCK_SEQPACKET’ sockets.

Although similar, SCTP does not implement the TCP-like interface of <draft-ietf-tsvwg-sctpsocket-07.txt>. This is because the ‘SOCK_STREAM’ socket interface presented in that draft only provides limited compatibility with tcp(7). The tcp(7) compatible socket interface provided by SCTP more closely follows the tcp(7) interface making it suitable to use SCTP as a drop-in replacement for tcp(7) with minimal (‘IPPROTO_SCTP’) adjustment to applications programs written to tcp(7).

SCTP has way too many options. This is mostly because SCTP is an new protocol and experimentation with the protocol is high. These options provide close control of the interesting features of the protocol. Unfortunately, when all options are compiled, the performance of SCTP is necessarily impacted. Many of these options will become deprecated in future releases. Portable programs should minimize their use of SCTP-specific socket options.

Although SCTP permits the user maximum control over the various SCTP protocol parameters, it is also possible to set protocol parameters in violation of the requirements of RFC 2960 and subsequent SCTP drafts and RFCs. Internet applications should take extreme care with protocol parameter settings, by either using the default values for all protocol parameters (as recommended in RFC 2960 and others) or by taking care not to adjust protocol parameters outside the ranges recommended in RFC 2960 and subsequent RFCs.

SCTP does not currently support IPv6.

SCTP host name addresses are not supported.

SCTP does not implement MOBILE-SCTP extensions due to Intellectual Property Rights claims made against the technologies in MOBILE-SCTP.

SCTP does not currently support tcp(7) undocumented Linux sendpage(2) socket call.

Transparent proxy options and other enhanced IP capabilities available with the kernel configuration parameter ‘CONFIG_SCTP_EXTENDED_IP_SUPPORT’ are not described, or not implemented.

Providing destination addresses to send(2), sendto(2) and sendmsg(2) does not work as described (it is largely ignored).

SOCK_RDM’ sockets are not fully supported as described.

The use of ‘SO_BINDTODEVICE’, ‘IP_OPTIONS’, ‘IP_PKTINFO’, ‘IP_RECVOPTS’, ‘IP_RETOPTS’ and ‘SCTP_STATUS’ socket options are not fully implemented and will probably not work as described.

AUTHOR

Brian F. G. Bidulock.
The OpenSS7 Project.

4 Conformance

5 Releases

This is the OpenSS7 Release of the OpenSS7 Linux Native SCTP tools, drivers and modules used with Linux.

The following sections provide information on OpenSS7 Linux Native SCTP releases as well as compatibility information of OpenSS7 release to mainstream UNIX releases of the core, modules and drivers, as well as Linux kernel compatibility.

5.1 Prerequisites

The quickest and easiest way to ensure that all prerequisites are met is to download and install this package from within the OpenSS7 Master Package, openss7-0.9.2.G, instead of separately.

Prerequisites for the OpenSS7 Linux Native SCTP package are as follows:

  1. Linux distribution, somewhat Linux Standards Base compliant, with a 2.4 or 2.6 kernel and the appropriate tool chain for compiling out-of-tree kernel modules. Most recent Linux distributions are usable out of the box, but some development packages must be installed. For more information, see Compatibility.

    − A fairly LSB compliant GNU/Linux distribution.9
    − Linux 2.4 kernel (2.4.10 - 2.4.27).
    − glibc2 or better.
    − GNU groff (for man pages).10
    − GNU texinfo (for info files).

If you need to rebuild the package from sources with modifications, you will need a larger GNU tool chain as described in See Downloading from CVS.

5.2 Compatibility

This section discusses compatibility with major prerequisites.

5.2.1 GNU/Linux Distributions

OpenSS7 Linux Native SCTP is compatible with the following Linux distributions:11

  • CentOS Enterprise Linux 3.4 (centos34) TBD
  • CentOS Enterprise Linux 4.0 (centos4) TBD
  • CentOS Enterprise Linux 4.92 (centos49) TBD
  • CentOS Enterprise Linux 5.0 (centos5)
  • CentOS Enterprise Linux 5.1 (centos51)
  • CentOS Enterprise Linux 5.2 (centos52)
  • Debian 3.0r2 Woody (deb3.0) TBD
  • Debian 3.1r0a Sarge (deb3.1) TBD
  • Debian 4.0r1 Etch (deb4.0)
  • Debian 4.0r2 Etch (deb4.0)
  • Debian 4.0r3 Etch (deb4.0)
  • Fedora Core 1 (FC1) TBD
  • Fedora Core 2 (FC2) TBD
  • Fedora Core 3 (FC3) TBD
  • Fedora Core 4 (FC4) TBD
  • Fedora Core 5 (FC5) TBD
  • Fedora Core 6 (FC6) TBD
  • Fedora 7 (FC7)
  • Fedora 8 (FC8)
  • Fedora 9 (FC9)
  • Gentoo 2006.1 (untested) TBD
  • Gentoo 2007.1 (untested) TBD
  • Lineox 4.026 (LEL4) TBD
  • Lineox 4.053 (LEL4) TBD
  • Mandrakelinux 9.2 (MDK92) TBD
  • Mandrakelinux 10.0 (MDK100) TBD
  • Mandrakelinux 10.1 (MDK101) TBD
  • Mandriva Linux LE2005 (MDK102) TBD
  • Mandriva Linux LE2006 (MDK103) TBD
  • Mandriva One (untested)
  • RedHat Linux 7.2 (RH7)
  • RedHat Linux 7.3 (RH7)
  • RedHat Linux 8.0 (RH8) TBD
  • RedHat Linux 9 (RH9) TBD
  • RedHat Enterprise Linux 3.0 (EL3) TBD
  • RedHat Enterprise Linux 4 (EL4)
  • RedHat Enterprise Linux 5 (EL5)
  • SuSE 8.0 Professional (SuSE8.0) TBD
  • SuSE 9.1 Personal (SuSE9.1) TBD
  • SuSE 9.2 Professional (SuSE9.2) TBD
  • SuSE OpenSuSE (SuSEOSS) TBD
  • SuSE 10.0 (SuSE10.0) TBD
  • SuSE 10.1 (SuSE10.1) TBD
  • SuSE 10.2 (SuSE10.2) TBD
  • SuSE 10.3 (SuSE10.3) TBD
  • SuSE 11.0 (SuSE11.0)
  • SLES 9 (SLES9) TBD
  • SLES 9 SP2 (SLES9) TBD
  • SLES 9 SP3 (SLES9) TBD
  • SLES 10 (SLES10)
  • Ubuntu 5.10 (ubu5.10) TBD
  • Ubuntu 6.03 LTS (ubu6.03) TBD
  • Ubuntu 6.10 (ubu6.10) TBD
  • Ubuntu 7.04 (ubu7.04) TBD
  • Ubuntu 7.10 (ubu7.10)
  • Ubuntu 8.04 (ubu8.04)
  • WhiteBox Enterprise Linux 3.0 (WBEL3) TBD
  • WhiteBox Enterprise Linux 4 (WBEL4) TBD

When installing from the tarball (see Installing the Tar Ball), this distribution is probably compatible with a much broader array of distributions than those listed above. These are the distributions against which the current maintainer creates and tests builds.

5.2.2 Kernel

The OpenSS7 Linux Native SCTP package compiles as a Linux kernel module. It is not necessary to patch the Linux kernel to build or use the package.12 Nor do you have to recompile your kernel to build or use the package. OpenSS7 packages use autoconf scripts to adapt the package source to your existing kernel. The package builds and runs nicely against production kernels from the distributions listed above. Rather than relying on kernel versions, the autoconf scripts interrogate the kernel for specific features and variants to better adapt to distribution production kernels that have had patches applied over the official kernel.org sources.

The OpenSS7 Linux Native SCTP package is compatible with 2.4 kernel series after 2.4.10 and has been tested up to and including 2.4.27. It has been tested from 2.6.3 up to and including 2.6.26 (with Fedora 9, openSUSE 11.0 and Ubuntu 8.04 patchsets). Please note that your mileage may vary if you use a kernel more recent than 2.6.26.4: it is difficult to anticipate changes that kernel developers will make in the future. Many kernels in the 2.6 series now vary widely by release version and if you encounter problems, try a kernel within the supported series.

UP validation testing for kernels is performed on all supported architectures. SMP validation testing was initially performed on UP machines, as well as on an Intel 3.0GHz Pentium IV 630 with HyperThreading enabled (2x). Because HyperThreading is not as independent as multiple CPUs, SMP validation testing was limited. Current releases have been tested on dual 1.8GHz Xeon HP servers (2x) as well as dual quad-core SunFire (8x) servers.

It should be noted that, while the packages will configure, build and install against XEN kernels, that problems running validation test suites against XEN kernels has been reported. XEN kernels are explicitly not supported. This may change at some point in the future if someone really requires running OpenSS7 under a XEN kernel.

5.2.3 Architectures

The OpenSS7 Linux Native SCTP package compiles and installs on a wide range of architectures. Although it is believed that the package will work on all architectures supported by the Linux kernel being used, validation testing has only been performed with the following architectures:

  • ix86
  • x86_64
  • ppc (MPC 860)
  • ppc64

32-bit compatibility validation testing is performed on all 64-bit architectures supporting 32-bit compatibility. If you would like to validate an OpenSS7 package on a specific machine architecture, you are welcome to sponsor the project with a test machine.

5.3 Release Notes

The sections that follow provide information on OpenSS7 releases of the OpenSS7 Linux Native SCTP package.

Major changes for release sctp-0.2.27

This is the twenty-seventh release of the Linux Native (Sockets) SCTP from the OpenSS7 Project. This release, as with other releases, on builds and installs on 2.4 kernels. This package is not as important to the OpenSS7 Project as the STREAMS version of SCTP, which provides the basis for all of the SIGTRAN components for the OpenSS7 stacks. Also, the STREAMS version runs on both 2.4 and 2.6 kernels.

This is a stable production release: it deprecates previous releases. Please upgrade to the current release before reporting bugs.

This is primarily a maintenance release correcting reported bugs, but also includes the latest packaging improvements.

Major features since the last public release are as follows:

  • Minor documentation corrections.
  • Kernel module license made explicit "GPL v2". And then changed back to "GPL".
  • License upgrade to AGPL Version 3.
  • Ability to strap out major documentation build and installation primarily for embedded targets.
  • Improvements to common build process for embedded and cross-compile targets.
  • Updated tool chain to m4-1.4.12, autoconf-2.63 and texinfo-4.13.
  • Conversion of RPM spec files to common approach for major subpackages.
  • Updated references database for manual pages and roff documents.
  • Build system now builds yum(8) repositories for RPMs and apt-get(8) repositories for DEBs. Installation documentation has been updated to include details of repository install sourcesref.
  • Added MODULE_VERSION to all modules and drivers.

This is a public stable production grade release of the package: it deprecates previous releases. Please upgrade to the current release before reporting bugs.

As with other OpenSS7 releases, this release configures, compiles, installs and builds RPMs and DEBs for a wide range of Linux 2.4 and 2.6 RPM- and DPKG-based distributions, and can be used on production kernels without patching or recompiling the kernel.

This package is publicly released under the GNU Affero General Public License Version 3. The release is available as an autoconf tarball, SRPM, DSC, and set of binary RPMs and DEBs. See the downloads page for the autoconf tarballs, SRPMs and DSCs. For tarballs, SRPMs, DSCs and binary RPMs and DEBs, see the sctp package page.

See http://www.openss7.org/codefiles/sctp-0.2.27/ChangeLog and http://www.openss7.org/codefiles/sctp-0.2.27/NEWS in the release for more information. Also, see the sctp.pdf manual in the release (also in html http://www.openss7.org/sctp_manual.html).

For the news release, see http://www.openss7.org/rel20081029_2.html.

Major changes for release sctp-0.2.26

This is the twenty-sixth release of the Linux Native (Sockets) SCTP from the OpenSS7 Project. This release, as with other releases, on builds and installs on 2.4 kernels. This package is not as important to the OpenSS7 Project as the STREAMS version of SCTP, which provides the basis for all of the SIGTRAN components for the OpenSS7 stacks. Also, the STREAMS version runs on both 2.4 and 2.6 kernels.

This is a stable production release: it deprecates previous releases. Please upgrade to the current release before reporting bugs.

This is primarily a maintenance release correcting reported bugs, but also includes the latest packaging improvements.

Major features since the last public release are as follows:

  • Support build on openSUSE 10.2.
  • Support build on Fedora 7 with 2.6.21 kernel.
  • Support build on CentOS 5.0 (RHEL5).
  • Support build on Ubuntu 7.04.
  • Updated to gettext 0.16.1.
  • Changes to support build on 2.6.20-1.2307.fc5 and 2.6.20-1.2933.fc6 kernel.
  • Supports build on Fedora Core 6.
  • Support for recent distributions and tool chains.

Major changes for release sctp-0.2.25

This is the twenty-fifth release of the Linux Native (Sockets) SCTP from the OpenSS7 Project. This release, as with other releases, on builds and installs on 2.4 kernels. This package is not as important to the OpenSS7 Project as the STREAMS version of SCTP, which provides the basis for all of the SIGTRAN components for the OpenSS7 stacks. Also, the STREAMS version runs on both 2.4 and 2.6 kernels.

This is a stable production release: it deprecates previous releases. Please upgrade to the current release before reporting bugs.

This is primarily a maintenance release correcting reported bugs, but also includes the latest packaging improvements.

Major features since the last public release are as follows:

  • Support for autoconf 2.61, automake 1.10 and gettext 0.16.
  • Support for Ubuntu 6.10 distribution and bug fixes for i386 kernels.

Major changes for release sctp-0.2.24

This is the twenty-fourth release of the Linux Native (Sockets) SCTP from the OpenSS7 Project. This release, as with other releases, on builds and installs on 2.4 kernels. This package is not as important to the OpenSS7 Project as the STREAMS version of SCTP, which provides the basis for all of the SIGTRAN components for the OpenSS7 stacks. Also, the STREAMS version runs on both 2.4 and 2.6 kernels.

This is a stable production release: it deprecates previous releases. Please upgrade to the current release before reporting bugs.

This is primarily a maintenance release correcting reported bugs, but also includes the latest packaging improvements.

Following are highlights of some of the changes since the last release:

  • Support for (configure but not build on) most recent 2.6.18 kernels (including Fedora Core 5 with inode diet patch set).