Bug 1827 - Linux SCTP support over DCE
authorHajime Tazaki <tazaki@sfc.wide.ad.jp>
Thu, 09 Jan 2014 19:58:10 +0900
changeset 546 d7753e122d06
parent 545 5c0050741a8f
child 547 17ca4464ade9
Bug 1827 - Linux SCTP support over DCE
RELEASE_NOTES
example/dce-cradle-simple.cc
example/examples-to-run.py
model/linux/ipv4-linux.cc
model/linux/ipv6-linux.cc
model/linux/linux-sctp-socket-factory-impl.cc
model/linux/linux-sctp-socket-factory-impl.h
model/linux/linux-sctp-socket-factory.cc
model/linux/linux-sctp-socket-factory.h
model/linux/linux-sctp6-socket-factory-impl.cc
model/linux/linux-sctp6-socket-factory-impl.h
model/linux/linux-sctp6-socket-factory.cc
model/linux/linux-sctp6-socket-factory.h
test/dce-cradle-test.cc
wscript
--- a/RELEASE_NOTES	Thu Jan 09 00:39:11 2014 +0900
+++ b/RELEASE_NOTES	Thu Jan 09 19:58:10 2014 +0900
@@ -25,8 +25,8 @@
 New user-visible features
 -------------------------
 - LinuxStackHelper now can configure IPv6 addresses with the support of Ipv6AddressHelper
-- DCE Cradle now support IPv6 sockets (TCP6, UDP6, RAW6, DCCP6)
-- Stream Control Transmission Protocol (SCTP) support
+- DCE Cradle now support IPv6 sockets (TCP6, UDP6, RAW6, DCCP6, SCTP6)
+- Stream Control Transmission Protocol (SCTP) support, DCE Cradle as well
   you need to install lksctp-dev/lksctp-tools-devel to run example.
 
 Bugs fixed
--- a/example/dce-cradle-simple.cc	Thu Jan 09 00:39:11 2014 +0900
+++ b/example/dce-cradle-simple.cc	Thu Jan 09 19:58:10 2014 +0900
@@ -46,12 +46,11 @@
   proto_sw.insert (std::make_pair ("udp", "ns3::LinuxUdpSocketFactory"));
   proto_sw.insert (std::make_pair ("tcp", "ns3::LinuxTcpSocketFactory"));
   proto_sw.insert (std::make_pair ("dccp", "ns3::LinuxDccpSocketFactory"));
+  proto_sw.insert (std::make_pair ("sctp", "ns3::LinuxSctpSocketFactory"));
   proto_sw.insert (std::make_pair ("icmp6", "ns3::LinuxIpv6RawSocketFactory"));
   proto_sw.insert (std::make_pair ("udp6", "ns3::LinuxUdp6SocketFactory"));
   proto_sw.insert (std::make_pair ("tcp6", "ns3::LinuxTcp6SocketFactory"));
   proto_sw.insert (std::make_pair ("dccp6", "ns3::LinuxDccp6SocketFactory"));
-  // below are not supported yet (Jan. 6, 2014)
-  proto_sw.insert (std::make_pair ("sctp", "ns3::LinuxSctpSocketFactory"));
   proto_sw.insert (std::make_pair ("sctp6", "ns3::LinuxSctp6SocketFactory"));
 
   CommandLine cmd;
--- a/example/examples-to-run.py	Thu Jan 09 00:39:11 2014 +0900
+++ b/example/examples-to-run.py	Thu Jan 09 19:58:10 2014 +0900
@@ -30,17 +30,21 @@
     ("dce-cradle-simple --rate=10kbps --proto=tcp", "True", "True"),
     ("dce-cradle-simple --rate=10kbps --proto=dccp", "True", "True"),
     ("dce-cradle-simple --rate=10kbps --proto=dccp -ccid=3", "True", "True"),
+    ("dce-cradle-simple --rate=10kbps --proto=sctp", "True", "True"),
     ("dce-cradle-simple --bulk=1 --rate=10kbps --proto=tcp", "True", "True"),
     ("dce-cradle-simple --bulk=1 --rate=10kbps --proto=dccp", "True", "True"),
     ("dce-cradle-simple --bulk=1 --rate=10kbps --proto=dccp -ccid=3", "True", "True"),
+    ("dce-cradle-simple --bulk=1 --rate=10kbps --proto=sctp", "True", "True"),
     ("dce-cradle-simple --rate=10kbps --proto=icmp6", "True", "True"),
     ("dce-cradle-simple --rate=10kbps --proto=udp6", "True", "True"),
     ("dce-cradle-simple --rate=10kbps --proto=tcp6", "True", "True"),
     ("dce-cradle-simple --rate=10kbps --proto=dccp6", "True", "True"),
     ("dce-cradle-simple --rate=10kbps --proto=dccp6 -ccid=3", "True", "True"),
+    ("dce-cradle-simple --rate=10kbps --proto=sctp6", "True", "True"),
     ("dce-cradle-simple --bulk=1 --rate=10kbps --proto=tcp6", "True", "True"),
     ("dce-cradle-simple --bulk=1 --rate=10kbps --proto=dccp6", "True", "True"),
     ("dce-cradle-simple --bulk=1 --rate=10kbps --proto=dccp6 -ccid=3", "True", "True"),
+    ("dce-cradle-simple --bulk=1 --rate=10kbps --proto=sctp6", "True", "True"),
     ("dce-tcp-ns3-nsc-comparison", "True", "True"), 
     ("dce-tcp-ns3-nsc-comparison --stack=dce", "True", "True"),
     ("dce-tcp-ns3-nsc-comparison --bulk=1", "True", "True"), 
--- a/model/linux/ipv4-linux.cc	Thu Jan 09 00:39:11 2014 +0900
+++ b/model/linux/ipv4-linux.cc	Thu Jan 09 19:58:10 2014 +0900
@@ -33,6 +33,7 @@
 #include "linux-udp-socket-factory-impl.h"
 #include "linux-tcp-socket-factory-impl.h"
 #include "linux-dccp-socket-factory-impl.h"
+#include "linux-sctp-socket-factory-impl.h"
 
 NS_LOG_COMPONENT_DEFINE ("Ipv4Linux");
 
@@ -518,6 +519,8 @@
   node->AggregateObject (tcpFactory);
   Ptr<LinuxDccpSocketFactoryImpl> dccpFactory = CreateObject<LinuxDccpSocketFactoryImpl> ();
   node->AggregateObject (dccpFactory);
+  Ptr<LinuxSctpSocketFactoryImpl> sctpFactory = CreateObject<LinuxSctpSocketFactoryImpl> ();
+  node->AggregateObject (sctpFactory);
 }
 Ptr<Ipv4Interface>
 Ipv4Linux::GetInterface (uint32_t index) const
--- a/model/linux/ipv6-linux.cc	Thu Jan 09 00:39:11 2014 +0900
+++ b/model/linux/ipv6-linux.cc	Thu Jan 09 19:58:10 2014 +0900
@@ -30,6 +30,7 @@
 #include "linux-udp6-socket-factory-impl.h"
 #include "linux-tcp6-socket-factory-impl.h"
 #include "linux-dccp6-socket-factory-impl.h"
+#include "linux-sctp6-socket-factory-impl.h"
 
 NS_LOG_COMPONENT_DEFINE ("Ipv6Linux");
 
@@ -416,6 +417,8 @@
   node->AggregateObject (tcp6Factory);
   Ptr<LinuxDccp6SocketFactoryImpl> dccp6Factory = CreateObject<LinuxDccp6SocketFactoryImpl> ();
   node->AggregateObject (dccp6Factory);
+  Ptr<LinuxSctp6SocketFactoryImpl> sctp6Factory = CreateObject<LinuxSctp6SocketFactoryImpl> ();
+  node->AggregateObject (sctp6Factory);
 }
 Ptr<Ipv6Interface>
 Ipv6Linux::GetInterface (uint32_t index) const
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/model/linux/linux-sctp-socket-factory-impl.cc	Thu Jan 09 19:58:10 2014 +0900
@@ -0,0 +1,48 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013 Hajime Tazaki
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
+ */
+#include "ns3/assert.h"
+#include "ns3/log.h"
+#include "ns3/uinteger.h"
+#include "linux-socket-impl.h"
+#include "linux-sctp-socket-factory-impl.h"
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+NS_LOG_COMPONENT_DEFINE ("LinuxSctpSocketFactoryImpl");
+
+namespace ns3 {
+
+Ptr<Socket>
+LinuxSctpSocketFactoryImpl::CreateSocket (void)
+{
+#ifdef KERNEL_STACK
+  Ptr<LinuxSocketImpl> socket = CreateObject<LinuxSocketImpl> ();
+  Ptr<Node> node = this->GetObject<Node> ();
+  socket->SetNode (node);
+  socket->SetAttribute ("Family", UintegerValue (AF_INET));
+  socket->SetAttribute ("SockType", UintegerValue (SOCK_STREAM));
+  socket->SetAttribute ("Protocol", UintegerValue (IPPROTO_SCTP));
+  socket->CreateSocket ();
+  return socket;
+#endif
+}
+
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/model/linux/linux-sctp-socket-factory-impl.h	Thu Jan 09 19:58:10 2014 +0900
@@ -0,0 +1,55 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013 Hajime Tazaki
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
+ */
+#ifndef LINUX_SCTP_SOCKET_FACTORY_IMPL_H
+#define LINUX_SCTP_SOCKET_FACTORY_IMPL_H
+
+#include "linux-sctp-socket-factory.h"
+#include "ns3/ptr.h"
+#include "ns3/node.h"
+
+namespace ns3 {
+
+/**
+ * \ingroup dccp
+ * \brief Object to create DCCP socket instances
+ * \internal
+ *
+ * This class implements the API for creating DCCP sockets.
+ * It is a socket factory (deriving from class SocketFactory).
+ */
+class LinuxSctpSocketFactoryImpl : public LinuxSctpSocketFactory
+{
+public:
+  /**
+   * \brief Implements a method to create a Dccp-based socket and return
+   * a base class smart pointer to the socket.
+   * \internal
+   *
+   * \return smart pointer to Socket
+   */
+  virtual Ptr<Socket> CreateSocket (void);
+
+protected:
+private:
+};
+
+} // namespace ns3
+
+#endif /* LINUX_SCTP_SOCKET_FACTORY_IMPL_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/model/linux/linux-sctp-socket-factory.cc	Thu Jan 09 19:58:10 2014 +0900
@@ -0,0 +1,34 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013 Hajime Tazaki
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
+ */
+#include "linux-sctp-socket-factory.h"
+
+namespace ns3 {
+
+NS_OBJECT_ENSURE_REGISTERED (LinuxSctpSocketFactory);
+
+TypeId LinuxSctpSocketFactory::GetTypeId (void)
+{
+  static TypeId tid = TypeId ("ns3::LinuxSctpSocketFactory")
+    .SetParent<SocketFactory> ()
+  ;
+  return tid;
+}
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/model/linux/linux-sctp-socket-factory.h	Thu Jan 09 19:58:10 2014 +0900
@@ -0,0 +1,49 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013 Hajime Tazaki
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
+ */
+#ifndef LINUX_SCTP_SOCKET_FACTORY_H
+#define LINUX_SCTP_SOCKET_FACTORY_H
+
+#include "ns3/socket-factory.h"
+
+namespace ns3 {
+
+class Socket;
+
+/**
+ * \ingroup socket
+ *
+ * \brief API to create DCCP socket instances
+ *
+ * This abstract class defines the API for DCCP socket factory.
+ * All DCCP implementations must provide an implementation of CreateSocket
+ * below.
+ *
+ * \see LinuxSctpSocketFactoryImpl
+ */
+class LinuxSctpSocketFactory : public SocketFactory
+{
+public:
+  static TypeId GetTypeId (void);
+
+};
+
+} // namespace ns3
+
+#endif /* LINUX_SCTP_SOCKET_FACTORY_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/model/linux/linux-sctp6-socket-factory-impl.cc	Thu Jan 09 19:58:10 2014 +0900
@@ -0,0 +1,48 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013 Hajime Tazaki
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
+ */
+#include "ns3/assert.h"
+#include "ns3/log.h"
+#include "ns3/uinteger.h"
+#include "linux-socket-impl.h"
+#include "linux-sctp6-socket-factory-impl.h"
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+NS_LOG_COMPONENT_DEFINE ("LinuxSctp6SocketFactoryImpl");
+
+namespace ns3 {
+
+Ptr<Socket>
+LinuxSctp6SocketFactoryImpl::CreateSocket (void)
+{
+#ifdef KERNEL_STACK
+  Ptr<LinuxSocketImpl> socket = CreateObject<LinuxSocketImpl> ();
+  Ptr<Node> node = this->GetObject<Node> ();
+  socket->SetNode (node);
+  socket->SetAttribute ("Family", UintegerValue (AF_INET6));
+  socket->SetAttribute ("SockType", UintegerValue (SOCK_STREAM));
+  socket->SetAttribute ("Protocol", UintegerValue (IPPROTO_SCTP));
+  socket->CreateSocket ();
+  return socket;
+#endif
+}
+
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/model/linux/linux-sctp6-socket-factory-impl.h	Thu Jan 09 19:58:10 2014 +0900
@@ -0,0 +1,55 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013 Hajime Tazaki
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
+ */
+#ifndef LINUX_SCTP6_SOCKET_FACTORY_IMPL_H
+#define LINUX_SCTP6_SOCKET_FACTORY_IMPL_H
+
+#include "linux-sctp6-socket-factory.h"
+#include "ns3/ptr.h"
+#include "ns3/node.h"
+
+namespace ns3 {
+
+/**
+ * \ingroup dccp
+ * \brief Object to create DCCP socket instances
+ * \internal
+ *
+ * This class implements the API for creating DCCP sockets.
+ * It is a socket factory (deriving from class SocketFactory).
+ */
+class LinuxSctp6SocketFactoryImpl : public LinuxSctp6SocketFactory
+{
+public:
+  /**
+   * \brief Implements a method to create a Dccp-based socket and return
+   * a base class smart pointer to the socket.
+   * \internal
+   *
+   * \return smart pointer to Socket
+   */
+  virtual Ptr<Socket> CreateSocket (void);
+
+protected:
+private:
+};
+
+} // namespace ns3
+
+#endif /* LINUX_SCTP6_SOCKET_FACTORY_IMPL_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/model/linux/linux-sctp6-socket-factory.cc	Thu Jan 09 19:58:10 2014 +0900
@@ -0,0 +1,34 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013 Hajime Tazaki
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
+ */
+#include "linux-sctp6-socket-factory.h"
+
+namespace ns3 {
+
+NS_OBJECT_ENSURE_REGISTERED (LinuxSctp6SocketFactory);
+
+TypeId LinuxSctp6SocketFactory::GetTypeId (void)
+{
+  static TypeId tid = TypeId ("ns3::LinuxSctp6SocketFactory")
+    .SetParent<SocketFactory> ()
+  ;
+  return tid;
+}
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/model/linux/linux-sctp6-socket-factory.h	Thu Jan 09 19:58:10 2014 +0900
@@ -0,0 +1,49 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013 Hajime Tazaki
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
+ */
+#ifndef LINUX_SCTP6_SOCKET_FACTORY_H
+#define LINUX_SCTP6_SOCKET_FACTORY_H
+
+#include "ns3/socket-factory.h"
+
+namespace ns3 {
+
+class Socket;
+
+/**
+ * \ingroup socket
+ *
+ * \brief API to create DCCP socket instances
+ *
+ * This abstract class defines the API for DCCP socket factory.
+ * All DCCP implementations must provide an implementation of CreateSocket
+ * below.
+ *
+ * \see LinuxSctp6SocketFactoryImpl
+ */
+class LinuxSctp6SocketFactory : public SocketFactory
+{
+public:
+  static TypeId GetTypeId (void);
+
+};
+
+} // namespace ns3
+
+#endif /* LINUX_SCTP6_SOCKET_FACTORY_H */
--- a/test/dce-cradle-test.cc	Thu Jan 09 00:39:11 2014 +0900
+++ b/test/dce-cradle-test.cc	Thu Jan 09 19:58:10 2014 +0900
@@ -153,13 +153,12 @@
     {"udp", "ns3::LinuxUdpSocketFactory", 30, false},
     {"tcp", "ns3::LinuxTcpSocketFactory", 30, false},
     {"dccp", "ns3::LinuxDccpSocketFactory", 30, false},
+    {"sctp", "ns3::LinuxSctpSocketFactory", 20, false},
     {"raw6", "ns3::LinuxIpv6RawSocketFactory", 20, false},
     {"udp6", "ns3::LinuxUdp6SocketFactory", 20, false},
     {"tcp6", "ns3::LinuxTcp6SocketFactory", 20, false},
     {"dccp6", "ns3::LinuxDccp6SocketFactory", 20, false},
-    // below are not supported yet (Nov. 9, 2012)
-    {"sctp", "ns3::LinuxSctpSocketFactory", 20, true},
-    {"sctp6", "ns3::LinuxSctp6SocketFactory", 20, true},
+    {"sctp6", "ns3::LinuxSctp6SocketFactory", 20, false},
   };
 
   for (unsigned int i = 0; i < sizeof(tests)/sizeof(testPair); i++)
--- a/wscript	Thu Jan 09 00:39:11 2014 +0900
+++ b/wscript	Thu Jan 09 19:58:10 2014 +0900
@@ -632,6 +632,19 @@
         'helper/ipv4-dce-routing-helper.h',
         'helper/linux-stack-helper.h',
         ]
+
+    if bld.env['SCTP_TOOLS_FOUND']:
+        module_source += [
+            'model/linux/linux-sctp-socket-factory.cc',
+            'model/linux/linux-sctp-socket-factory-impl.cc',
+            'model/linux/linux-sctp6-socket-factory.cc',
+            'model/linux/linux-sctp6-socket-factory-impl.cc',
+            ]
+        module_headers += [
+            'model/linux/linux-sctp-socket-factory.h',
+            'model/linux/linux-sctp6-socket-factory.h',
+            ]
+
     module_source = module_source + kernel_source
     module_headers = module_headers + kernel_headers
     uselib = ns3waf.modules_uselib(bld, ['core', 'network', 'internet', 'netlink'])