summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgthaker <gthaker@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-06 14:53:42 +0000
committergthaker <gthaker@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-06 14:53:42 +0000
commit22ab0528d020345d742bf3a1839367df594eaa4b (patch)
treeb654cbde6b81f77f2352d9db70a079d90bc46b7d
parent5556b70c487a66ca5e04ad9fa931de552a480202 (diff)
downloadATCD-22ab0528d020345d742bf3a1839367df594eaa4b.tar.gz
ChangeLogTag: Wed Aug 6 14:50:00 UTC 2003 Gautam Thaker <gthaker@atl.lmco.com>
-rw-r--r--ChangeLog35
-rw-r--r--ace/SOCK_SEQPACK_Acceptor.cpp59
-rw-r--r--ace/SOCK_SEQPACK_Acceptor.h12
-rw-r--r--ace/SOCK_SEQPACK_Association.cpp139
-rw-r--r--ace/SOCK_SEQPACK_Connector.cpp80
-rw-r--r--ace/SOCK_SEQPACK_Connector.h8
-rw-r--r--ace/os_include/sys/os_socket.h7
-rw-r--r--include/makeinclude/platform_linux.GNU7
-rw-r--r--performance-tests/SCTP/Options_Manager.cpp6
-rw-r--r--performance-tests/SCTP/README2
-rw-r--r--performance-tests/SCTP/README.LKSCTP43
-rw-r--r--performance-tests/SCTP/README.SCTP8
-rw-r--r--performance-tests/SCTP/README.SCTP_in_ACE66
13 files changed, 430 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index cb36f4bfa2d..d5530538c7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+Wed Aug 6 14:50:00 UTC 2003 Gautam Thaker <gthaker@atl.lmco.com>
+
+ Please send all comments/questions about this commit to
+ Jason Cohen, jcohen@atl.lmco.com
+
+ LKSCTP Support added for Linux 2.5/2.6 kernels with LKSCTP patch.
+
+ * ace/SOCK_SEQPACK_Acceptor.h:
+ * ace/SOCK_SEQPACK_Connector.h:
+ Changed default protocol from 0 to 132 (IPPROTO_SCTP).
+ This forces all current usage of SOCK_SEQPACK_* to use
+ SCTP. This was done because LKSCTP support was added to
+ the SOCK_SEQPACK code, but overrides with SOCK_STREAM.
+ Currently, OpenSS7 and LKSCTP have different views on this.
+
+ * ace/SOCK_SEQPACK_Acceptor.cpp:
+ * ace/SOCK_SEQPACK_Association.cpp:
+ * ace/SOCK_SEQPACK_Connector.cpp:
+ Added #ifdef ACE_HAS_LKSCTP sections to SOCK_SEQPACK_* files
+ to support socket interface differences between LKSCTP and OpenSS7.
+
+ * ace/os_include/sys/os_socket.h:
+ * include/makeinclude/platform_linux.GNU:
+ To enable LKSCTP support on a patched Linux 2.5/2.6 kernel,
+ you must supply 'sctp=lksctp' to your make command line.
+
+ * performance-tests/SCTP/Options_Manager.cpp
+ Now allows automatic server selection of port.
+
+ * performance-tests/SCTP/README
+ * performance-tests/SCTP/README.LKSCTP:
+ * performance-tests/SCTP/README.SCTP:
+ * performance-tests/SCTP/README.SCTP_in_ACE:
+ Made additions for LKSCTP to the documentation.
+
Wed Aug 6 14:13:25 UTC 2003 Don Hinton <dhinton@dresystems.com>
* ace/Null_Condition.h (vait):
diff --git a/ace/SOCK_SEQPACK_Acceptor.cpp b/ace/SOCK_SEQPACK_Acceptor.cpp
index c1cd487605e..c2b43ab579e 100644
--- a/ace/SOCK_SEQPACK_Acceptor.cpp
+++ b/ace/SOCK_SEQPACK_Acceptor.cpp
@@ -322,12 +322,58 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Multihomed_INET_Addr &local_sa
local_sap.get_addresses(local_inet_addrs,
num_addresses);
+#if defined (ACE_HAS_LKSCTP)
+
+ sockaddr_storage *local_sockaddr = 0;
+
+ // bind the primary first
+ if (ACE_OS::bind (this->get_handle (),
+ ACE_reinterpret_cast(sockaddr *,
+ &(local_inet_addrs[0])),
+ sizeof(sockaddr)) == -1)
+ {
+ error = 1;
+ }
+
+ // do we need to bind multiple addresses?
+ if (num_addresses > 1)
+ {
+ ACE_NEW_NORETURN(local_sockaddr,
+ sockaddr_storage[num_addresses - 1]);
+
+ // all of the secondary addresses need the local port set
+ for (size_t i = 1; i < num_addresses; i++)
+ {
+ local_inet_addrs[i].sin_port = local_inet_addrs[0].sin_port;
+ }
+
+ // copy the sockaddr_in's to sockaddr_storage
+ for (size_t i = 0; i < num_addresses - 1; i++)
+ {
+ ACE_OS::memcpy(&(local_sockaddr[i]),
+ &(local_inet_addrs[i + 1]),
+ sizeof(sockaddr_in));
+ }
+
+ // now call bindx
+ if (!error && sctp_bindx(this->get_handle (),
+ local_sockaddr,
+ num_addresses - 1,
+ SCTP_BINDX_ADD_ADDR))
+ {
+ error = 1;
+ }
+
+ delete [] local_sockaddr;
+ }
+#else
// Call bind
if (ACE_OS::bind (this->get_handle (),
ACE_reinterpret_cast (sockaddr *,
local_inet_addrs),
(sizeof local_inet_addr)*num_addresses) == -1)
error = 1;
+#endif /* ACE_HAS_LKSCTP */
}
delete [] local_inet_addrs;
@@ -364,8 +410,11 @@ ACE_SOCK_SEQPACK_Acceptor::open (const ACE_Addr &local_sap,
if (protocol_family == PF_UNSPEC)
protocol_family = local_sap.get_type ();
-
+#if defined (ACE_HAS_LKSCTP)
+ if (ACE_SOCK::open (SOCK_STREAM,
+#else
if (ACE_SOCK::open (SOCK_SEQPACKET,
+#endif
protocol_family,
protocol,
protocolinfo,
@@ -424,7 +473,11 @@ ACE_SOCK_SEQPACK_Acceptor::open (const ACE_Addr &local_sap,
#endif /* ACE_HAS_IPV6 */
}
+#if defined (ACE_HAS_LKSCTP)
+ if (ACE_SOCK::open (SOCK_STREAM,
+#else
if (ACE_SOCK::open (SOCK_SEQPACKET,
+#endif
protocol_family,
protocol,
reuse_addr) == -1)
@@ -457,7 +510,11 @@ ACE_SOCK_SEQPACK_Acceptor::open (const ACE_Multihomed_INET_Addr &local_sap,
#endif /* ACE_HAS_IPV6 */
}
+#if defined (ACE_HAS_LKSCTP)
+ if (ACE_SOCK::open (SOCK_STREAM,
+#else
if (ACE_SOCK::open (SOCK_SEQPACKET,
+#endif
protocol_family,
protocol,
reuse_addr) == -1)
diff --git a/ace/SOCK_SEQPACK_Acceptor.h b/ace/SOCK_SEQPACK_Acceptor.h
index 84880b2d8df..4fee17d9575 100644
--- a/ace/SOCK_SEQPACK_Acceptor.h
+++ b/ace/SOCK_SEQPACK_Acceptor.h
@@ -57,7 +57,7 @@ public:
int reuse_addr = 0,
int protocol_family = PF_UNSPEC,
int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
+ int protocol = 132);
/// Multihomed version of same
@@ -65,7 +65,7 @@ public:
int reuse_addr = 0,
int protocol_family = PF_UNSPEC,
int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
+ int protocol = 132);
/// Initialize a passive-mode QoS-enabled acceptor socket. Returns 0
/// on success and -1 on failure.
@@ -76,7 +76,7 @@ public:
int reuse_addr,
int protocol_family = PF_UNSPEC,
int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
+ int protocol = 132);
/**
@@ -90,7 +90,7 @@ public:
int reuse_addr = 0,
int protocol_family = PF_UNSPEC,
int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
+ int protocol = 132);
/// Multihomed version of same
@@ -98,7 +98,7 @@ public:
int reuse_addr = 0,
int protocol_family = PF_UNSPEC,
int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
+ int protocol = 132);
/// Initialize a passive-mode QoS-enabled acceptor socket. Returns 0
@@ -110,7 +110,7 @@ public:
int reuse_addr,
int protocol_family = PF_UNSPEC,
int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
+ int protocol = 132);
/// Close the socket. Returns 0 on success and -1 on failure.
int close (void);
diff --git a/ace/SOCK_SEQPACK_Association.cpp b/ace/SOCK_SEQPACK_Association.cpp
index b1c79c2050c..ab4b084218d 100644
--- a/ace/SOCK_SEQPACK_Association.cpp
+++ b/ace/SOCK_SEQPACK_Association.cpp
@@ -36,6 +36,74 @@ ACE_SOCK_SEQPACK_Association::close (void)
return ACE_SOCK::close ();
}
+#if defined (ACE_HAS_LKSCTP)
+int
+ACE_SOCK_SEQPACK_Association::get_local_addrs (ACE_INET_Addr *addrs, size_t &size) const
+{
+ ACE_TRACE ("ACE_SOCK_SEQPACK_Association::get_local_addrs");
+ /*
+ The size of ACE_INET_Addr must be large enough to hold the number of
+ local addresses on the machine. If the array is too small, the function
+ will only return the number of addresses that will fit. If the array is
+ too large, the 'size' parameter will be modified to indicate the number
+ of addrs.
+
+ We will call sctp_getladdrs() which accepts 3 parameters
+ 1. a socket fd
+ 2. a sctp association_id which will be ignored since we are using
+ tcp sockets
+ 3. a pointer to a sockaddr_storage
+
+ lksctp/draft will allocate memory and we are responsible for freeing
+ it by calling sctp_freeladdrs().
+ */
+
+ sockaddr_in *si = 0;
+ sockaddr_storage *laddrs = 0;
+ int err = 0;
+ size_t len = 0;
+
+ err = sctp_getladdrs(this->get_handle(), 0, &laddrs);
+ if (err > 0)
+ {
+ len = err;
+ // check to see if we have more addresses than we have
+ // space in our ACE_INET_Addr array
+ if (len > size)
+ {
+ // since our array is too small, we will only copy the first
+ // few that fit
+ len = size;
+ }
+
+ for (size_t i = 0; i < len; i++)
+ {
+ // first we cast the sockaddr_storage to sockaddr_in
+ // since we only support ipv4 at this time.
+ si = (sockaddr_in *) (&(laddrs[i]));
+
+ // now we fillup the ace_inet_addr array
+ addrs[i].set_addr(si, sizeof(sockaddr_in));
+ addrs[i].set_type(si->sin_family);
+ addrs[i].set_size(sizeof(sockaddr_in));
+ }
+ }
+ else /* err < 0 */
+ {
+ // sctp_getladdrs will return -1 on error
+ return -1;
+ }
+
+ // indicate the num of addrs returned to the calling function
+ size = len;
+
+ // make sure we free the struct using the system function
+ sctp_freeladdrs(laddrs);
+ return 0;
+}
+
+#else
+
int
ACE_SOCK_SEQPACK_Association::get_local_addrs (ACE_INET_Addr *addrs, size_t &size) const
{
@@ -104,6 +172,76 @@ ACE_SOCK_SEQPACK_Association::get_local_addrs (ACE_INET_Addr *addrs, size_t &siz
return 0;
}
+#endif
+
+
+#if defined (ACE_HAS_LKSCTP)
+int
+ACE_SOCK_SEQPACK_Association::get_remote_addrs (ACE_INET_Addr *addrs, size_t &size) const
+{
+ ACE_TRACE ("ACE_SOCK_SEQPACK_Association::get_remote_addrs");
+ /*
+ The size of ACE_INET_Addr must be large enough to hold the number of
+ remotes addresses in the association. If the array is too small, the
+ function will only return the number of addresses that will fit. If the
+ array is too large, the 'size' parameter will be modified to indicate
+ the number of addrs.
+
+ We will call sctp_getpaddrs() which accepts 3 parameters
+ 1. a socket fd
+ 2. a sctp association_id which will be ignored since we are using
+ tcp sockets
+ 3. a pointer to a sockaddr_storage
+
+ lksctp/draft will allocate memory and we are responsible for freeing
+ it by calling sctp_freepaddrs().
+ */
+
+ sockaddr_in *si = 0;
+ sockaddr_storage *paddrs = 0;
+ int err = 0;
+ size_t len = 0;
+
+ err = sctp_getpaddrs(this->get_handle(), 0, &paddrs);
+ if (err > 0)
+ {
+ len = err;
+ // check to see if we have more addresses than we have
+ // space in our ACE_INET_Addr array
+ if (len > size)
+ {
+ // since our array is too small, we will only copy the first
+ // few that fit
+ len = size;
+ }
+
+ for (size_t i = 0; i < len; i++)
+ {
+ // first we cast the sockaddr_storage to sockaddr_in
+ // since we only support ipv4 at this time.
+ si = (sockaddr_in *) (&(paddrs[i]));
+
+ // now we fillup the ace_inet_addr array
+ addrs[i].set_addr(si, sizeof(sockaddr_in));
+ addrs[i].set_type(si->sin_family);
+ addrs[i].set_size(sizeof(sockaddr_in));
+ }
+ }
+ else /* err < 0 */
+ {
+ // sctp_getpaddrs will return -1 on error
+ return -1;
+ }
+
+ // indicate the num of addrs returned to the calling function
+ size = len;
+
+ // make sure we free the struct using the system function
+ sctp_freepaddrs(paddrs);
+ return 0;
+}
+
+#else
int
ACE_SOCK_SEQPACK_Association::get_remote_addrs (ACE_INET_Addr *addrs, size_t &size) const
@@ -173,6 +311,7 @@ ACE_SOCK_SEQPACK_Association::get_remote_addrs (ACE_INET_Addr *addrs, size_t &si
return 0;
}
+#endif
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Auto_Array_Ptr<sockaddr_in>;
diff --git a/ace/SOCK_SEQPACK_Connector.cpp b/ace/SOCK_SEQPACK_Connector.cpp
index c0b04d1348f..9bc4d9a6727 100644
--- a/ace/SOCK_SEQPACK_Connector.cpp
+++ b/ace/SOCK_SEQPACK_Connector.cpp
@@ -33,9 +33,12 @@ ACE_SOCK_SEQPACK_Connector::shared_open (ACE_SOCK_SEQPACK_Association &new_assoc
// Only open a new socket if we don't already have a valid handle.
- if (new_association.get_handle () == ACE_INVALID_HANDLE
-
- && new_association.open (SOCK_SEQPACKET,
+ if (new_association.get_handle () == ACE_INVALID_HANDLE &&
+#if defined (ACE_HAS_LKSCTP)
+ new_association.open (SOCK_STREAM,
+#else
+ new_association.open (SOCK_SEQPACKET,
+#endif /* ACE_HAS_LKSCTP */
protocol_family,
protocol,
reuse_addr) == -1)
@@ -56,8 +59,12 @@ ACE_SOCK_SEQPACK_Connector::shared_open (ACE_SOCK_SEQPACK_Association &new_assoc
ACE_TRACE ("ACE_SOCK_SEQPACK_Connector::shared_open");
// Only open a new socket if we don't already have a valid handle.
- if (new_association.get_handle () == ACE_INVALID_HANDLE
- && new_association.open (SOCK_SEQPACKET,
+ if (new_association.get_handle () == ACE_INVALID_HANDLE &&
+#if defined (ACE_HAS_LKSCTP)
+ new_association.open (SOCK_STREAM,
+#else
+ new_association.open (SOCK_SEQPACKET,
+#endif /* ACE_HAS_LKSCTP */
protocol_family,
protocol,
protocolinfo,
@@ -128,6 +135,68 @@ ACE_SOCK_SEQPACK_Connector::shared_connect_start (ACE_SOCK_SEQPACK_Association &
// the Multihomed_INET_Addr
local_sap.get_addresses(local_inet_addrs, num_addresses);
+#if defined (ACE_HAS_LKSCTP)
+ sockaddr_storage *local_sockaddr = 0;
+ sockaddr_in portst;
+ int sn = sizeof(sockaddr);
+
+ // bind to the primary addr first
+ if (ACE_OS::bind(new_association.get_handle (),
+ ACE_reinterpret_cast(sockaddr *,
+ &(local_inet_addrs[0])),
+ sizeof(sockaddr)))
+ {
+ ACE_Errno_Guard error (errno);
+ new_association.close ();
+ return -1;
+ }
+
+ // do we need to bind multiple addrs
+ if (num_addresses > 1)
+ {
+ // allocate enough memory to hold the number of secondary addrs
+ ACE_NEW_NORETURN(local_sockaddr,
+ sockaddr_storage[num_addresses - 1]);
+
+ // get sockaddr_in for the local handle
+ if (ACE_OS::getsockname(new_association.get_handle (),
+ ACE_reinterpret_cast(sockaddr *,
+ &portst),
+ &sn))
+ {
+ ACE_Errno_Guard error (errno);
+ new_association.close ();
+ return -1;
+ }
+
+ // set the local port # assigned by the os to every secondary addr
+ for (size_t i = 1; i < num_addresses; i++)
+ {
+ local_inet_addrs[i].sin_port = portst.sin_port;
+ }
+
+ // copy all of the secondary addrs into a sockaddr_storage structure
+ for (size_t i = 0; i < num_addresses - 1; i++)
+ {
+ ACE_OS::memcpy(&(local_sockaddr[i]),
+ &(local_inet_addrs[i + 1]),
+ sizeof(sockaddr_in));
+ }
+
+ if (sctp_bindx(new_association.get_handle(),
+ local_sockaddr,
+ num_addresses - 1,
+ SCTP_BINDX_ADD_ADDR))
+ {
+ ACE_Errno_Guard error (errno);
+ new_association.close ();
+ return -1;
+ }
+
+ delete [] local_sockaddr;
+ }
+#else
+
// Call bind
if (ACE_OS::bind (new_association.get_handle (),
ACE_reinterpret_cast (sockaddr *,
@@ -139,6 +208,7 @@ ACE_SOCK_SEQPACK_Connector::shared_connect_start (ACE_SOCK_SEQPACK_Association &
new_association.close ();
return -1;
}
+#endif /* ACE_HAS_LKSCTP */
delete [] local_inet_addrs;
}
diff --git a/ace/SOCK_SEQPACK_Connector.h b/ace/SOCK_SEQPACK_Connector.h
index 8b8122e35e6..fca4f153745 100644
--- a/ace/SOCK_SEQPACK_Connector.h
+++ b/ace/SOCK_SEQPACK_Connector.h
@@ -99,7 +99,7 @@ public:
int reuse_addr = 0,
int flags = 0,
int perms = 0,
- int protocol = 0);
+ int protocol = 132);
/**
* Actively connect to a peer, producing a connected @c ACE_SOCK_SEQPACK_Association
@@ -148,7 +148,7 @@ public:
int reuse_addr = 0,
int flags = 0,
int perms = 0,
- int protocol = 0);
+ int protocol = 132);
/**
* Actively connect to a peer, producing a connected @c ACE_SOCK_SEQPACK_Association
@@ -198,7 +198,7 @@ public:
int reuse_addr = 0,
int flags = 0,
int perms = 0,
- int protocol = 0);
+ int protocol = 132);
/**
* Actively connect to a peer, producing a connected @c ACE_SOCK_SEQPACK_Association
@@ -248,7 +248,7 @@ public:
int reuse_addr = 0,
int flags = 0,
int perms = 0,
- int protocol = 0);
+ int protocol = 132);
/// Default dtor.
~ACE_SOCK_SEQPACK_Connector (void);
diff --git a/ace/os_include/sys/os_socket.h b/ace/os_include/sys/os_socket.h
index b6589195a00..5c9ac3796a9 100644
--- a/ace/os_include/sys/os_socket.h
+++ b/ace/os_include/sys/os_socket.h
@@ -141,6 +141,13 @@ extern "C"
# define ACE_PROTOCOL_FAMILY_INET PF_INET
#endif /* ACE_HAS_IPV6 */
+#if defined (ACE_HAS_LKSCTP)
+extern "C"
+{
+#include /**/ <netinet/sctp.h>
+}
+#endif /* ACE_HAS_LKSCTP */
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/include/makeinclude/platform_linux.GNU b/include/makeinclude/platform_linux.GNU
index 38695572d3b..13d2d3fc30a 100644
--- a/include/makeinclude/platform_linux.GNU
+++ b/include/makeinclude/platform_linux.GNU
@@ -130,7 +130,12 @@ ifeq ($(sctp),openss7)
PLATFORM_SCTP_LIBS=
endif
-# Eventually Other SCTP implementations will go here
+# support for LKSCTP (Linux Kernel 2.5)
+ifeq ($(sctp),lksctp)
+ PLATFORM_SCTP_CPPFLAGS= -DACE_HAS_LKSCTP
+ PLATFORM_SCTP_LDFLAGS=
+ PLATFORM_SCTP_LIBS= /usr/local/lib/libsctp.a
+endif
#### GNU gas has a string limit of 4096 characters. On Alphas,
#### builds will fail due to running over that limit. There are
diff --git a/performance-tests/SCTP/Options_Manager.cpp b/performance-tests/SCTP/Options_Manager.cpp
index 9ea6e9770de..198c063e2e9 100644
--- a/performance-tests/SCTP/Options_Manager.cpp
+++ b/performance-tests/SCTP/Options_Manager.cpp
@@ -411,11 +411,11 @@ Options_Manager::Options_Manager(int argc, ACE_TCHAR **argv, ACE_TCHAR const * c
_error_message = "histogram_bin_count must be no less than 1";
}
- if (server_port < 1010 ||
- server_port > 65000)
+ if ((server_port < 1010 ||
+ server_port > 65000) && server_port != 0)
{
_error = 1;
- _error_message = "server_port must be between 1010 and 65000 inclusive";
+ _error_message = "server_port must be between 1010 and 65000 inclusive, or zero.";
}
if ((!ACE_OS::strcmp("client-opts", opts_set)) && payload_size_power_of_2 > 17)
diff --git a/performance-tests/SCTP/README b/performance-tests/SCTP/README
index 8e88c4ea79e..3cad6c74a1b 100644
--- a/performance-tests/SCTP/README
+++ b/performance-tests/SCTP/README
@@ -1,7 +1,7 @@
This directory provides programs that measure the round trip latency
of synchronous octet messaging using ACE wrapper-facades for the SCTP
protocol. Currently these programs provide the only example code on
-how to use ACE's wrapper-facades for SCTP. In the future additonal
+how to use ACE's wrapper-facades for SCTP. In the future additional
code will be placed in the ACE_wrappers/examples/IPC_SAP/SOCK_SAP
directory.
diff --git a/performance-tests/SCTP/README.LKSCTP b/performance-tests/SCTP/README.LKSCTP
new file mode 100644
index 00000000000..bec659352e3
--- /dev/null
+++ b/performance-tests/SCTP/README.LKSCTP
@@ -0,0 +1,43 @@
+This README describes the LKSCTP implementation of SCTP for Linux.
+
+June 2003 - 1.0
+
+Overview
+--------
+
+The LKSCTP project is the Linux Kernel implementation of SCTP. As of this
+writing it has been incorporated into the Linux 2.5 development series of
+kernels.
+
+LKSCTP adheres to the IETF's SCTP Sockets Draft API. Please refer to that
+document for API specifics.
+
+Building ACE with LKSCTP support
+--------------------------------
+
+ - compile kernel with SCTP support
+ + if compiled as a module, be sure to load it.
+
+ - download LKSCTP userspace functions library from
+ http://lksctp.sourceforge.net/
+
+ - install userspace library (libsctp.a) into /usr/local/lib
+
+ - install header file (sctp.h) into /usr/local/include/sctp.h
+
+ - make ACE with "sctp=lksctp"
+
+Caveats
+---------------------------------
+
+ - Both services interfaces (SOCK_STREAM and SOCK_SEQPACKET) will
+ preserve message boundaries.
+
+Resources
+---------------------------------
+
+ - LKSCTP Homepage: http://lksctp.sourceforge.net/
+ - Latest Patches
+ - Userspace Library
+ - Mailing Lists
+--
diff --git a/performance-tests/SCTP/README.SCTP b/performance-tests/SCTP/README.SCTP
index d4bb163c8dc..a72857b6ada 100644
--- a/performance-tests/SCTP/README.SCTP
+++ b/performance-tests/SCTP/README.SCTP
@@ -43,6 +43,12 @@ SCTP as simple as changing one socket call.
Please see README.OpenSS7 for more details.
+ LKSCTP
+ ------
+ The LKSCTP implementation is based on the TSVWG's sockets draft.
+ It is included with the Linux 2.5 series development kernels.
+
+ Please see README.LKSCTP for more details.
Resources
===========
@@ -68,5 +74,7 @@ Resources
The OpenSS7 Project: http://www.openss7.org/sctp.html
+ The LKSCTP Project: http://lksctp.sourceforge.net/
+
--
diff --git a/performance-tests/SCTP/README.SCTP_in_ACE b/performance-tests/SCTP/README.SCTP_in_ACE
index c00115a38ec..b51cd6b3fe6 100644
--- a/performance-tests/SCTP/README.SCTP_in_ACE
+++ b/performance-tests/SCTP/README.SCTP_in_ACE
@@ -1,10 +1,30 @@
-Release 1.0 - April 2003
-Last Updated - April 2003
+Release 1.1 - June 2003
+
+Overview of SCTP sockets
+------------------------
+
+In order to support multiple implementations of SCTP, we had to standardize
+on a set of semantics.
+
+The IETF sockets draft states that service type SOCK_SEQPACKET indicates a UDP
+style socket (i.e. connection-less), while service type SOCK_STREAM indicates
+a TCP style socket. However, this conflicts with the POSIX definition for
+SOCK_SEQPACKET as connection-oriented.
+
+In ACE we choose to support the standard POSIX definition. In doing so, certain
+socket semantics will be guaranteed regardless of implementation.
+
+ [1] SOCK_SEQPACKET sockets will always be message-based,
+ connection-oriented, and reliable.
+
+ [2] SOCK_STREAM sockets will be message-based or byte-stream based,
+ connection-oriented, and reliable.
+
SCTP Features Accessible Within ACE
-----------------------------------
- * SOCK_STREAM (byte stream oriented) data transport service
+ * SOCK_STREAM (byte stream oriented or msg oriented) data transport service
* SOCK_SEQPACKET (message oriented) data transport service (this is
the service used by TAO's SCIOP pluggable protocol)
@@ -18,7 +38,7 @@ SCTP Features Accessible Within ACE
* Setting and getting of all parameters exposed by SCTP
(e.g. retransmission timeout (RTO)) via ACE_SOCK::set_option(...)
and ACE_SOCK::get_option(...) for both SOCK_STREAM and
- SOCK_SEQPACKET sockets
+ SOCK_SEQPACKET sockets. You must set the socket level appropriately.
* Multiplexing of lightweight "SCTP Streams" (over the SOCK_STREAM
and SOCK_SEQPACKET services) via ACE_SOCK::set_option(...)
@@ -33,9 +53,14 @@ Supported SCTP Implementations
------------------------------
* OpenSS7's Linux Implementation (Berkeley UNIX Network API)
- Available for free at http://www.openss7.org/linux-sctp-0.2.14.tgz
+ Linux 2.4.18 patch available at: http://www.openss7.org/linux-sctp-0.2.14.tgz
(as of April 2003)
+ * The LKSCTP Linux Kernel Implementation (IETF Sockets Draft API compliant)
+ Available in the Linux 2.5 kernels (http://www.kernel.org/)
+ Tools/Libs available at http://lksctp.sourceforge.net/
+ (All socket interfaces are message-based -- please see README.LKSCTP)
+
BUGS
----
@@ -43,9 +68,15 @@ BUGS
* OpenSS7 BUGS
- protocol crashes when transmitting message sizes greater than
- PATH MTU in the pressence of network failures (message size
+ PATH MTU in the presence of network failures (message size
includes SCTP and IP headers and data.)
+ * LKSCTP BUGS
+
+ - certain combinations of SCTP parameters will cause a kernel panic
+ (ie. setting rto_initial, rto_max, or rto_min to 0)
+
+
TO-DO
----
@@ -60,16 +91,15 @@ TO-DO
ACE_SOCK_SEQPACK_* wrapper-facade. (currently they can only be
accessed indirectly through ACE_SOCK::set_option(...))
- * Support the Draft-API Standard for SCTP. Current implementation is
- written to the Berkeley Unix Networking API that is used by the
- OpenSS7 implementation for Linux.
-
- * Support SOCK_RDM service within ACE.
+ * Support SOCK_RDM service (connection-less) within ACE for OpenSS7.
* Convert ATL's histogram utility (located under
performance-tests/SCTP) into a ACE utility and integrate with other
ACE provided statistics classes.
+ * Support Draft API msg notifications via sendmsg() and recvmsg().
+
+
USAGE
-----
@@ -83,9 +113,8 @@ USAGE
as shown in SOCK_STREAM_srv.cpp.
You must include the file sctp.h in order for
- IPPROTO_SCTP to be defined. The OpenSS7 implementation
- for Linux places this file in
- /usr/include/netinet.
+ IPPROTO_SCTP to be defined. This file should be under
+ /usr/include/netinet
Aside from these changes, the classes can be used as
they are under TCP (the protocol they use by
@@ -173,13 +202,6 @@ the SOCK_SEQPACK wrapper facade.
All SCTP socket options can be read and written from the current
socket options methods provided by ACE_SOCK.
-Finally, the current implementation of the SOCK_SEQPACK wrapper facade
-uses the Berkely Unix Networking API that is preserved for the OpenSS7
-SCTP implementation. SOCK_SEQPACK will not function properly with
-other SCTP implementations that provide only the draft SCTP API. In
-the future we hope to modify either OS.{c,h} or the SOCK_SEQPACK
-wrapper facade to handle both API variants.
-
Finally, our SOCK_SEQPACK wrapper facade does not yet support SCTP
stream multiplexing.
@@ -228,6 +250,8 @@ $(ACE_ROOT)/performance-tests/SCTP/README ADDED
$(ACE_ROOT)/performance-tests/SCTP/README.SCTP ADDED
$(ACE_ROOT)/performance-tests/SCTP/README.SCTP_in_ACE ADDED
$(ACE_ROOT)/performance-tests/SCTP/README.SCTP_PERF_TEST ADDED
+$(ACE_ROOT)/performance-tests/SCTP/README.OpenSS7 ADDED
+$(ACE_ROOT)/performance-tests/SCTP/README.LKSCTP ADDED
$(ACE_ROOT)/performance-tests/SCTP/Makefile ADDED
$(ACE_ROOT)/performance-tests/SCTP/run_spectrum.pl ADDED