Skip to content

Automatically exported from code.google.com/p/sctp-refimpl

License

Notifications You must be signed in to change notification settings

ossy-szeged/sctp-refimpl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README for SCTP stack for KAME

Description
-----------
This SCTP stack is a kernel implementation which fully supports RFC 2960
as well as updates and enhancements from the following Internet Drafts:
   draft-ietf-tsvwg-sctpcsum-05.txt
   draft-ietf-tsvwg-sctpimpguide-05.txt
   draft-ietf-tsvwg-sctpsocket-04.txt
   draft-ietf-tsvwg-addip-sctp-05.txt
   draft-stewart-prsctp-00.txt
   draft-stewart-tsvwg-sctpipv6-00.txt
   draft-iyengar-sctp-cacc-00.txt

A small user-space library addition to 'libc' is used to provide the new
system calls that SCTP provides (see draft-ietf-tsvwg-sctpsocket-03.txt
for details).

Both IPv4 and IPv6 are supported-- e.g. it is a dual-stack implementation.
Provisions are given for passing either IPv4-mapped or native IPv4 addresses
over PF_INET6 sockets.

The SCTP stack has been integrated and tested with KAME releases of
FreeBSD 4.5 and NetBSD 1.5.2. This release has been compiled with
the KAME release for OpenBSD on a Ultra-sparc however it could
not be tested due to alignment problems in the base IPv6 code with
the 64 bit processor. We hope to test OpenBSD on x86 soon.


Configuring and Building the Kernel
-----------------------------------
Get the KAME source for your target platform (eg. freebsd4, netbsd152, 
openbsd3) and "prepare" the source (see 'INSTALL' at the top of the 
KAME source tree)

Run 'prepare.sh' at the top of the sctpBsd source tree if
you have a seperate SCTP/KAME installation. Newer
versions of KAME include the SCTP stack so you do not
need to get the seperate tar image and run prepare.sh

[FIX ME - remove this since the source will be part of KAME now...]

The following kernel options have been added for SCTP:
options	      SCTP		       # adds SCTP stack to kernel
options	      SCTP_DEBUG	       # adds debugging support for SCTP
options	      SCTP_TCP_MODEL_SUPPORT   # adds TCP model support
options	      SCTP_USE_ADLER32	       # use obsolete Adler32 checksum,
				       # instead of CRC-32c
				       # this may be removed in the future

Add 'SCTP' at a minimum to your kernel configuration file, and build as
directed for the appropriate target platform (e.g. see 'freebsd4/INSTALL')

After configuring the kernel above, goto {$TARGET}/sys/kern in the KAME
distribution and do make init_sysent.c'.  This will generate the following
files:
   {$TARGET}/sys/kern/syscalls.c
   {$TARGET}/sys/kern/init_sysent.c
   {$TARGET}/sys/sys/sysproto.h
   {$TARGET}/sys/sys/syscall.h
   {$TARGET}/sys/sys/syscall.mk
   {$TARGET}/sys/sys/syscall-hide.h

You will need to copy the .h files when building libc to
/usr/src/sys/sys.

and you should also copy them to /usr/include/sys
as well.



Configuring and Building the user library portion
-------------------------------------------------
0. Kernel must be configured and built before proceeding.

1. Copy files from usr.lib to /usr/src/lib/libc/net:
      sctp_sys_calls.c

2. Copy files from the KAME distribution into /usr/src/lib/libc/net:
      kame/kame/libinet6/getaddrinfo.3
      kame/kame/libinet6/getaddrinfo.c
      kame/kame/libinet6/rthdr.c
      kame/kame/libinet6/resolv/res_send.c

3. Add sctp_sys_calls.c to SRCS in /usr/src/lib/libc/net/Makefile.inc

4. Copy the syscall related header files created during kernel configuration
   and build into the non-KAME kernel build tree (eg. from KAME's
   {$TARGET}/sys/sys/ to /usr/src/sys/sys/)

4.a For netbsd you will also need to /usr/src/lib/libc/sys/Makefile.inc
    by adding sctp_peeloff.o to the ASM line (near select.o).

5. Rebuild the library from /usr/src/lib/libc and install


Multi-homing considerations
---------------------------
The SCTP stack provides full support of multi-homed platforms by adding
support for multiple default gateway routes and alternate route selection
to the routing subsystem.

This feature is added to the routing subsystem when SCTP is compiled in
and is currently required.


Application development considerations
--------------------------------------
The following are the only header files that are normally required by
the application to add SCTP support:
   <netinet/sctp.h>
   <netinet/sctp_uio.h>

See Internet Draft draft-ietf-tsvwg-sctpsocket-04.txt for details.

>>> Undocumented Socket Options <<<
IPv4-mapped addresses vs. the default IPv4 addresses on PF_INET6 sockets
  Note: KAME kernel tunable must also be appropriately set to enable mapped
  addresses support

>>> PR-SCTP "timeout" types <<<
time
available buffer space

Test application
----------------
The sctp_test_app can be built from the top of the 
current SCTP tree. [we will need to move this
into the kame tree somewhere]. It builds two libraries
under the directories baselib and user. The app directory
holds the actual sctp_test_app. Note the libc.a must be
rebuilt with the sctp_peeloff and other library functions.



About

Automatically exported from code.google.com/p/sctp-refimpl

Resources

License

Stars

Watchers

Forks

Packages

No packages published