#include "Packets/DefaultBundle/EthernetPacket.hh"
#include "Packets/MPEGDVBBundle/DatagramSection.hh"
#include "Utils/membind.hh"
-#include "Socket/DVBDemuxHandles.hh"
+#include "Socket/Protocols/DVB/DVBDemuxHandles.hh"
#include "Packets/ParseInt.hh"
#include "Packets/Packet.hh"
#include "Packets/PacketData.hh"
#include "Packets/DefaultBundle/EthernetPacket.hh"
#include "Packets/MPEGDVBBundle/TransportPacket.hh"
#include "Utils/membind.hh"
-#include "Socket/DVBDemuxHandles.hh"
+#include "Socket/Protocols/DVB/DVBDemuxHandles.hh"
#include "Packets/ParseInt.hh"
#include "Packets/Packet.hh"
#include "Packets/PacketData.hh"
#include <string>
#include <iostream>
-#include "Socket/DVBFrontendHandle.hh"
+#include "Socket/Protocols/DVB/DVBFrontendHandle.hh"
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
#include <fstream>
#include <string>
#include <iomanip>
-#include "Socket/UDPSocketHandle.hh"
+#include "Socket/Protocols/INet/UDPSocketHandle.hh"
#include "Scheduler/Scheduler.hh"
#include "Packets/DefaultBundle/EthernetPacket.hh"
#include "Utils/membind.hh"
#include <string>
#include <iostream>
#include <iomanip>
-#include "Socket/PacketSocketHandle.hh"
+#include "Socket/Protocols/PacketSocketHandle.hh"
#include "Scheduler/Scheduler.hh"
#include "Utils/membind.hh"
#include "Packets/DefaultBundle/EthernetPacket.hh"
// Custom includes
#include <iostream>
#include <sstream>
-#include "Socket/TCPSocketHandle.hh"
-#include "Socket/INetAddressing.hh"
+#include "Socket/Protocols/INet/TCPSocketHandle.hh"
+#include "Socket/Protocols/INet/INetAddressing.hh"
int main(int argc, char const * argv[])
#include <iostream>
#include "Scheduler/Scheduler.hh"
#include "Utils/membind.hh"
-#include "Socket/TCPSocketHandle.hh"
-#include "Socket/INetAddressing.hh"
+#include "Socket/Protocols/INet/TCPSocketHandle.hh"
+#include "Socket/Protocols/INet/INetAddressing.hh"
class Server
#include "IpV6Extensions.hh"
#include "IpV6Packet.hh"
#include "UDPPacket.hh"
-#include "Socket/INetAddressing.hh"
+#include "Socket/Protocols/INet/INetAddressing.hh"
#include <boost/test/auto_unit_test.hpp>
#include <boost/test/test_tools.hpp>
// Custom includes
#include "EthernetPacket.hh"
-#include "Socket/INetAddressing.hh"
+#include "Socket/Protocols/INet/INetAddressing.hh"
//#include "IpV6Packet.mpp"
#define prefix_
// Custom includes
#include "IpV6Packet.hh"
-#include "Socket/INetAddressing.hh"
+#include "Socket/Protocols/INet/INetAddressing.hh"
#include "Packets/DataPacket.hh"
#include <boost/test/auto_unit_test.hpp>
PROJECT_NAME = libSocket
TAGFILES = "$(TOPDIR)/Utils/doc/Utils.tag"
GENERATE_TAGFILE = doc/Socket.tag
+RECURSIVE = Yes
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
-#include "SocketHandle.hh"
+#include "Socket/SocketHandle.hh"
//#include "BSDSocketProtocol.mpp"
#define prefix_
// Custom includes
#include <sys/time.h>
-#include "SocketProtocol.hh"
+#include "Socket/SocketProtocol.hh"
//#include "BSDSocketProtocol.mpp"
///////////////////////////////hh.p////////////////////////////////////////
#define HH_DVBDemuxHandles_ 1
// Custom includes
-#include "BufferingPolicy.hh"
-#include "FramingPolicy.hh"
-#include "CommunicationPolicy.hh"
-#include "ReadWritePolicy.hh"
-#include "ProtocolClientSocketHandle.hh"
+#include "Socket/BufferingPolicy.hh"
+#include "Socket/FramingPolicy.hh"
+#include "Socket/CommunicationPolicy.hh"
+#include "Socket/ReadWritePolicy.hh"
+#include "Socket/ProtocolClientSocketHandle.hh"
#include "DVBDemuxProtocol.hh"
//#include "DVBDemuxHandles.mpp"
#include <string>
#include <sys/ioctl.h>
#include <linux/sockios.h>
-#include "SocketHandle.hh"
+#include "Socket/SocketHandle.hh"
//#include "DVBDemuxProtocol.mpp"
#define prefix_
#include <linux/dvb/dmx.h>
// Custom includes
-#include "SocketProtocol.hh"
+#include "Socket/SocketProtocol.hh"
//#include "DVBProtocol.mpp"
///////////////////////////////hh.p////////////////////////////////////////
#include <linux/sockios.h>
#include <stdio.h>
#include <fcntl.h>
-#include "SocketHandle.hh"
+#include "Socket/SocketHandle.hh"
#include "Utils/Exception.hh"
#define HH_DVBFrontendHandle_ 1
// Custom includes
-#include "BufferingPolicy.hh"
-#include "FramingPolicy.hh"
-#include "CommunicationPolicy.hh"
-#include "ReadWritePolicy.hh"
-#include "ProtocolClientSocketHandle.hh"
-#include "SocketProtocol.hh"
+#include "Socket/BufferingPolicy.hh"
+#include "Socket/FramingPolicy.hh"
+#include "Socket/CommunicationPolicy.hh"
+#include "Socket/ReadWritePolicy.hh"
+#include "Socket/ProtocolClientSocketHandle.hh"
+#include "Socket/SocketProtocol.hh"
#include <linux/dvb/frontend.h>
--- /dev/null
+# -*- python -*-
+
+Import('env')
+import SENFSCons, glob
+
+###########################################################################
+
+sources = SENFSCons.GlobSources()
+
+allob = []
+
+allob.extend(
+ SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Utils' ] ) )
+
+for sc in glob.glob("*/SConscript"):
+ ob = SConscript(sc)
+ if ob : allob.extend(ob)
+
+Return('allob')
-// $Id$
+// $Id: main.test.cc 296 2007-07-10 20:39:34Z g0dil $
//
// Copyright (C) 2006
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
// Free Software Foundation, Inc.,
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-/** \file
- \brief PacketProtocol and PacketSocketHandle non-inline template implementation
- */
+// Definition of non-inline non-template functions
-#include "PacketSocketHandle.ih"
+//#include "test.hh"
+//#include "test.ih"
// Custom includes
+#define BOOST_AUTO_TEST_MAIN
+#include <boost/test/auto_unit_test.hpp>
+#include <boost/test/test_tools.hpp>
#define prefix_
-///////////////////////////////ct.p////////////////////////////////////////
+///////////////////////////////cc.p////////////////////////////////////////
-template <class ForwardRange>
-prefix_ unsigned
-senf::detail::Range_LLAddressCopier<ForwardRange>::operator()(unsigned char * target)
- const
-{
- std::size_t len (0);
- typename boost::range_const_iterator<ForwardRange>::type i (boost::begin(range_));
- for (; i != boost::end(range_) && len<8; ++i, ++len, ++target)
- *target = *i;
- if (i != boost::end(range_))
- throw InvalidLLSocketAddressException();
- return len;
-}
-///////////////////////////////ct.e////////////////////////////////////////
+///////////////////////////////cc.e////////////////////////////////////////
#undef prefix_
\f
#define HH_GenericAddressingPolicy_ 1
// Custom includes
-#include "SocketHandle.hh"
-#include "FileHandle.hh"
-#include "SocketPolicy.hh"
-#include "CommunicationPolicy.hh"
+#include "Socket/SocketHandle.hh"
+#include "Socket/FileHandle.hh"
+#include "Socket/SocketPolicy.hh"
+#include "Socket/CommunicationPolicy.hh"
//#include "GenericAddressingPolicy.mpp"
///////////////////////////////hh.p////////////////////////////////////////
#include <string>
#include <exception>
#include <netinet/in.h>
-#include "SocketPolicy.hh"
-#include "ClientSocketHandle.hh"
-#include "CommunicationPolicy.hh"
-#include "GenericAddressingPolicy.hh"
+#include "Socket/SocketPolicy.hh"
+#include "Socket/ClientSocketHandle.hh"
+#include "Socket/CommunicationPolicy.hh"
+#include "Socket/Protocols/GenericAddressingPolicy.hh"
//#include "INetAddressing.mpp"
///////////////////////////////hh.p////////////////////////////////////////
#define HH_INetProtocol_ 1
// Custom includes
-#include "SocketProtocol.hh"
+#include "Socket/SocketProtocol.hh"
#include "INetAddressing.hh"
-#include "ClientSocketHandle.hh"
-#include "CommunicationPolicy.hh"
+#include "Socket/ClientSocketHandle.hh"
+#include "Socket/CommunicationPolicy.hh"
//#include "INetProtocol.mpp"
///////////////////////////////hh.p////////////////////////////////////////
--- /dev/null
+# -*- python -*-
+
+Import('env')
+import SENFSCons, glob
+
+###########################################################################
+
+sources = SENFSCons.GlobSources()
+
+allob = []
+
+allob.extend(
+ SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Utils' ] ) )
+
+for sc in glob.glob("*/SConscript"):
+ ob = SConscript(sc)
+ if ob : allob.extend(ob)
+
+Return('allob')
#include <netinet/tcp.h>
#include <sys/ioctl.h>
#include <linux/sockios.h> // for SIOCINQ / SIOCOUTQ
-#include "SocketHandle.hh"
+#include "Socket/SocketHandle.hh"
//#include "TCPProtocol.mpp"
#define prefix_
#define HH_TCPProtocol_ 1
// Custom includes
-#include "SocketProtocol.hh"
+#include "Socket/SocketProtocol.hh"
//#include "TCPProtocol.mpp"
///////////////////////////////hh.p////////////////////////////////////////
#include "Utils/pool_alloc_mixin.hh"
#include "INetProtocol.hh"
#include "TCPProtocol.hh"
-#include "BSDSocketProtocol.hh"
-#include "FramingPolicy.hh"
-#include "CommunicationPolicy.hh"
-#include "ReadWritePolicy.hh"
-#include "BufferingPolicy.hh"
-#include "ProtocolClientSocketHandle.hh"
-#include "ProtocolServerSocketHandle.hh"
+#include "Socket/Protocols/BSDSocketProtocol.hh"
+#include "Socket/FramingPolicy.hh"
+#include "Socket/CommunicationPolicy.hh"
+#include "Socket/ReadWritePolicy.hh"
+#include "Socket/BufferingPolicy.hh"
+#include "Socket/ProtocolClientSocketHandle.hh"
+#include "Socket/ProtocolServerSocketHandle.hh"
//#include "TCPSocketHandle.mpp"
///////////////////////////////hh.p////////////////////////////////////////
#include <sys/ioctl.h>
#include <linux/sockios.h> // for SIOCINQ / SIOCOUTQ
#include <net/if.h> // for if_nametoindex
-#include "SocketHandle.hh"
+#include "Socket/SocketHandle.hh"
//#include "UDPProtocol.mpp"
#define prefix_
#define HH_UDPProtocol_ 1
// Custom includes
-#include "SocketProtocol.hh"
+#include "Socket/SocketProtocol.hh"
#include "INetAddressing.hh"
//#include "UDPProtocol.mpp"
// Custom includes
#include "INetProtocol.hh"
#include "UDPProtocol.hh"
-#include "BSDSocketProtocol.hh"
-#include "FramingPolicy.hh"
-#include "CommunicationPolicy.hh"
-#include "ReadWritePolicy.hh"
-#include "BufferingPolicy.hh"
-#include "ProtocolClientSocketHandle.hh"
+#include "Socket/Protocols/BSDSocketProtocol.hh"
+#include "Socket/FramingPolicy.hh"
+#include "Socket/CommunicationPolicy.hh"
+#include "Socket/ReadWritePolicy.hh"
+#include "Socket/BufferingPolicy.hh"
+#include "Socket/ProtocolClientSocketHandle.hh"
//#include "UDPSocketHandle.mpp"
///////////////////////////////hh.p////////////////////////////////////////
-// $Id$
+// $Id: main.test.cc 296 2007-07-10 20:39:34Z g0dil $
//
// Copyright (C) 2006
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
// Free Software Foundation, Inc.,
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-/** \file
- \brief PacketProtocol and PacketSocketHandle non-inline template implementation
- */
+// Definition of non-inline non-template functions
-#include "PacketSocketHandle.ih"
+//#include "test.hh"
+//#include "test.ih"
// Custom includes
+#define BOOST_AUTO_TEST_MAIN
+#include <boost/test/auto_unit_test.hpp>
+#include <boost/test/test_tools.hpp>
#define prefix_
-///////////////////////////////ct.p////////////////////////////////////////
+///////////////////////////////cc.p////////////////////////////////////////
-template <class ForwardRange>
-prefix_ unsigned
-senf::detail::Range_LLAddressCopier<ForwardRange>::operator()(unsigned char * target)
- const
-{
- std::size_t len (0);
- typename boost::range_const_iterator<ForwardRange>::type i (boost::begin(range_));
- for (; i != boost::end(range_) && len<8; ++i, ++len, ++target)
- *target = *i;
- if (i != boost::end(range_))
- throw InvalidLLSocketAddressException();
- return len;
-}
-///////////////////////////////ct.e////////////////////////////////////////
+///////////////////////////////cc.e////////////////////////////////////////
#undef prefix_
\f
#include <sys/socket.h>
#include <netpacket/packet.h>
-#include "SocketPolicy.hh"
-#include "FileHandle.hh"
+#include "Socket/SocketPolicy.hh"
+#include "Socket/FileHandle.hh"
#include "GenericAddressingPolicy.hh"
//#include "LLAddressing.mpp"
#define HH_PacketSocketHandle_ 1
// Custom includes
-#include "SocketPolicy.hh"
-#include "SocketProtocol.hh"
-#include "ProtocolClientSocketHandle.hh"
+#include "Socket/SocketPolicy.hh"
+#include "Socket/SocketProtocol.hh"
+#include "Socket/ProtocolClientSocketHandle.hh"
+#include "Socket/FramingPolicy.hh"
+#include "Socket/CommunicationPolicy.hh"
+#include "Socket/ReadWritePolicy.hh"
+#include "Socket/BufferingPolicy.hh"
#include "LLAddressing.hh"
-#include "FramingPolicy.hh"
-#include "CommunicationPolicy.hh"
-#include "ReadWritePolicy.hh"
-#include "BufferingPolicy.hh"
#include "BSDSocketProtocol.hh"
//#include "PacketSocketHandle.mpp"
--- /dev/null
+# -*- python -*-
+
+Import('env')
+import SENFSCons, glob
+
+###########################################################################
+
+sources = SENFSCons.GlobSources()
+
+allob = []
+
+allob.extend(
+ SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Utils' ] ) )
+
+for sc in glob.glob("*/SConscript"):
+ ob = SConscript(sc)
+ if ob : allob.extend(ob)
+
+Return('allob')
-// $Id$
+// $Id: main.test.cc 296 2007-07-10 20:39:34Z g0dil $
//
// Copyright (C) 2006
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
// Free Software Foundation, Inc.,
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-/** \file
- \brief PacketProtocol and PacketSocketHandle non-inline template implementation
- */
+// Definition of non-inline non-template functions
-#include "PacketSocketHandle.ih"
+//#include "test.hh"
+//#include "test.ih"
// Custom includes
+#define BOOST_AUTO_TEST_MAIN
+#include <boost/test/auto_unit_test.hpp>
+#include <boost/test/test_tools.hpp>
#define prefix_
-///////////////////////////////ct.p////////////////////////////////////////
+///////////////////////////////cc.p////////////////////////////////////////
-template <class ForwardRange>
-prefix_ unsigned
-senf::detail::Range_LLAddressCopier<ForwardRange>::operator()(unsigned char * target)
- const
-{
- std::size_t len (0);
- typename boost::range_const_iterator<ForwardRange>::type i (boost::begin(range_));
- for (; i != boost::end(range_) && len<8; ++i, ++len, ++target)
- *target = *i;
- if (i != boost::end(range_))
- throw InvalidLLSocketAddressException();
- return len;
-}
-///////////////////////////////ct.e////////////////////////////////////////
+///////////////////////////////cc.e////////////////////////////////////////
#undef prefix_
\f
Import('env')
import SENFSCons
+import glob
###########################################################################
-sources = SENFSCons.GlobSources()
+sources, testSources = SENFSCons.GlobSources()
SENFSCons.StandardTargets(env)
+subob = []
+for sc in glob.glob("*/SConscript"):
+ ob = SConscript(sc)
+ if ob : subob.extend(ob)
+
SENFSCons.Lib(env,
- library = 'Socket',
- sources = sources,
- LIBS = [ 'Utils' ])
+ library = 'Socket',
+ sources = sources + subob,
+ testSources = testSources,
+ LIBS = [ 'Utils' ])
SENFSCons.Doxygen(env, extra_sources = [
env.Dia2Png('SocketLibrary-classes.dia'),
// Custom includes
-#include "GenericSockAddr.hh"
-
//#include "SocketPolicy.mpp"
///////////////////////////////hh.p////////////////////////////////////////
{
virtual ~AddressingPolicyBase() {}
- typedef GenericSockAddr Address;
+ class Address { Address(); };
};
/** \brief Policy defining the framing format
import os.path
import os
-def BoostUnitTests(env, target, source, test_source=None, LIBS = [], OBJECTS = [], DEPENDS = [], **kw):
+def BoostUnitTests(env, target, objects, test_sources=None, LIBS = [], OBJECTS = [], DEPENDS = [], **kw):
path, name = os.path.split(target)
- if test_source:
- if type(test_source) is not type([]):
- test_source = [ test_source ]
+ if test_sources:
+ if type(test_sources) is not type([]):
+ test_sources = [ test_sources ]
else:
- test_source = []
+ test_sources = []
testEnv = env.Copy(**kw)
testEnv.Prepend(LIBS = '$BOOSTTESTLIB')
testEnv.Prepend(LIBS = LIBS)
- sources = []
- if source:
- sources = sources + env.Object(source) + OBJECTS
- sources = sources + test_source
+ all_objects = []
+ if not objects:
+ objects = []
+ all_objects = objects + env.Object(test_sources) + OBJECTS
binName = os.path.join(path,'.' + name +'.bin')
- testRunner = testEnv.Program(binName, sources)
+ testRunner = testEnv.Program(binName, all_objects)
stamp = os.path.join(path,'.' + os.path.splitext(name)[0]+'.stamp')
if DEPENDS:
env.Depends(testRunner, DEPENDS)
if type(sources) == type(()):
testSources = sources[1]
sources = sources[0]
+ if type(sources) is not type([]):
+ sources = [ sources ]
objects = None
if sources:
- objects = env.Object(sources)
+ objects = env.Object([
+ source
+ for source in sources
+ if not str(source).endswith('.o') ]) + [
+ source
+ for source in sources
+ if str(source).endswith('.o') ]
+
if testSources:
test = env.BoostUnitTests(
target = 'test',
- source = sources,
- test_source = testSources,
+ objects = objects,
+ test_sources = testSources,
LIBS = LIBS,
OBJECTS = OBJECTS,
DEPENDS = [ env.File(LibPath(x)) for x in LIBS ])