Socket/Protocols/INet: BUGFIX: Fix SOL_IP to SOL_IPV6 in INet6MulticastSocketProtocol
g0dil [Fri, 2 May 2008 13:44:29 +0000 (13:44 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@834 270642c3-0616-0410-b53a-bc976706d245

Console/ParsedCommand.hh
Packets/Packet.cti
Socket/Protocols/INet/MulticastSocketProtocol.cc
senfscons/senfutil.py

index af8dfe7..db85451 100644 (file)
@@ -358,7 +358,8 @@ namespace console {
         BOOST_PARAMETER_KEYWORD(type, default_doc) ///< String rep of default value
                                         /**< By default, the default value is documented by
                                              converting the value to it's string representation
-                                             using \c boost::lexical_cast / \c iostreams. The
+                                             using the corresponding return value formatter which by
+                                             default uses \c boost::lexical_cast / \c iostreams. The
                                              displayed value can be changed by setting this
                                              attribute. */
         BOOST_PARAMETER_KEYWORD(type, parser) ///< Argument parser
index b824c09..6dec365 100644 (file)
@@ -185,6 +185,8 @@ create(ForwardReadableRange const & range,
     return ConcretePacket(interpreter::create(range));
 }
 
+#endif
+
 // Create packet as new packet after a given packet
 
 template <class PacketType>
@@ -194,8 +196,6 @@ senf::ConcretePacket<PacketType>::createAfter(Packet packet)
     return ConcretePacket(interpreter::createAfter(packet.ptr()));
 }
 
-#endif
-
 template <class PacketType>
 prefix_ senf::ConcretePacket<PacketType>
 senf::ConcretePacket<PacketType>::createAfter(Packet packet, senf::NoInit_t)
@@ -217,6 +217,8 @@ senf::ConcretePacket<PacketType>::createAfter(Packet packet, size_type size, sen
     return ConcretePacket(interpreter::createAfter(packet.ptr(), size, senf::noinit));
 }
 
+#ifndef DOXYGEN
+
 template <class PacketType>
 template <class ForwardReadableRange>
 prefix_ senf::ConcretePacket<PacketType> senf::ConcretePacket<PacketType>::
@@ -226,6 +228,8 @@ createAfter(Packet packet, ForwardReadableRange const & range,
     return ConcretePacket(interpreter::createAfter(packet.ptr(), range));
 }
 
+#endif
+
 // Create packet as new packet (header) before a given packet
 
 template <class PacketType>
index 8d47679..535dc2f 100644 (file)
@@ -192,7 +192,7 @@ prefix_ void senf::INet6MulticastSocketProtocol::mcAddMembership(INet6Address co
     struct ipv6_mreq mreqn;
     std::copy(mcAddr.begin(), mcAddr.end(), mreqn.ipv6mr_multiaddr.s6_addr);
     mreqn.ipv6mr_interface = 0;
-    if (::setsockopt(fd(),SOL_IP,IPV6_ADD_MEMBERSHIP,&mreqn,sizeof(mreqn)) < 0)
+    if (::setsockopt(fd(),SOL_IPV6,IPV6_ADD_MEMBERSHIP,&mreqn,sizeof(mreqn)) < 0)
         SENF_THROW_SYSTEM_EXCEPTION("::setsockopt(IPV6_ADD_MEMBERSHIP");
 }
 
@@ -204,7 +204,7 @@ prefix_ void senf::INet6MulticastSocketProtocol::mcAddMembership(INet6Address co
     mreqn.ipv6mr_interface = if_nametoindex(iface.c_str());
     if (mreqn.ipv6mr_interface == 0)
         throw SystemException("::if_nametoindex()",ENOENT SENF_EXC_DEBUGINFO);
-    if (::setsockopt(fd(),SOL_IP,IPV6_ADD_MEMBERSHIP,&mreqn,sizeof(mreqn)) < 0)
+    if (::setsockopt(fd(),SOL_IPV6,IPV6_ADD_MEMBERSHIP,&mreqn,sizeof(mreqn)) < 0)
         SENF_THROW_SYSTEM_EXCEPTION("::setsockopt(IPV6_ADD_MEMBERSHIP");
 }
 
@@ -214,7 +214,7 @@ prefix_ void senf::INet6MulticastSocketProtocol::mcDropMembership(INet6Address c
     struct ipv6_mreq mreqn;
     std::copy(mcAddr.begin(), mcAddr.end(), mreqn.ipv6mr_multiaddr.s6_addr);
     mreqn.ipv6mr_interface = 0;
-    if (::setsockopt(fd(),SOL_IP,IPV6_DROP_MEMBERSHIP,&mreqn,sizeof(mreqn)) < 0)
+    if (::setsockopt(fd(),SOL_IPV6,IPV6_DROP_MEMBERSHIP,&mreqn,sizeof(mreqn)) < 0)
         SENF_THROW_SYSTEM_EXCEPTION("");
 }
 
@@ -228,7 +228,7 @@ senf::INet6MulticastSocketProtocol::mcDropMembership(INet6Address const & mcAddr
     mreqn.ipv6mr_interface = if_nametoindex(iface.c_str());
     if (mreqn.ipv6mr_interface == 0)
         throw SystemException("::if_nametoindex()",ENOENT SENF_EXC_DEBUGINFO);
-    if (::setsockopt(fd(),SOL_IP,IPV6_DROP_MEMBERSHIP,&mreqn,sizeof(mreqn)) < 0)
+    if (::setsockopt(fd(),SOL_IPV6,IPV6_DROP_MEMBERSHIP,&mreqn,sizeof(mreqn)) < 0)
         SENF_THROW_SYSTEM_EXCEPTION("");
 }
 
index 2e537d8..ad80d8b 100644 (file)
@@ -52,6 +52,6 @@ def SetupForSENF(env):
 
         env.Default(
             env.AlwaysBuild(
-                env.Command('senf/libsenf.a', [],  [ 'scons -C senf $SENF_BUILDOPTS libsenf.a' ])))
+                env.Command('senf/libsenf.a', [],  [ 'scons -C %s $SENF_BUILDOPTS libsenf.a' % os.path.realpath('senf')])))
     else:
         print '\nUsing global SENF\n'