From: g0dil Date: Fri, 2 May 2008 13:44:29 +0000 (+0000) Subject: Socket/Protocols/INet: BUGFIX: Fix SOL_IP to SOL_IPV6 in INet6MulticastSocketProtocol X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=275e7f8a473a1b04516f2db9ba7cbb81e7fa53b7;p=senf.git Socket/Protocols/INet: BUGFIX: Fix SOL_IP to SOL_IPV6 in INet6MulticastSocketProtocol git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@834 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Console/ParsedCommand.hh b/Console/ParsedCommand.hh index af8dfe7..db85451 100644 --- a/Console/ParsedCommand.hh +++ b/Console/ParsedCommand.hh @@ -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 diff --git a/Packets/Packet.cti b/Packets/Packet.cti index b824c09..6dec365 100644 --- a/Packets/Packet.cti +++ b/Packets/Packet.cti @@ -185,6 +185,8 @@ create(ForwardReadableRange const & range, return ConcretePacket(interpreter::create(range)); } +#endif + // Create packet as new packet after a given packet template @@ -194,8 +196,6 @@ senf::ConcretePacket::createAfter(Packet packet) return ConcretePacket(interpreter::createAfter(packet.ptr())); } -#endif - template prefix_ senf::ConcretePacket senf::ConcretePacket::createAfter(Packet packet, senf::NoInit_t) @@ -217,6 +217,8 @@ senf::ConcretePacket::createAfter(Packet packet, size_type size, sen return ConcretePacket(interpreter::createAfter(packet.ptr(), size, senf::noinit)); } +#ifndef DOXYGEN + template template prefix_ senf::ConcretePacket senf::ConcretePacket:: @@ -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 diff --git a/Socket/Protocols/INet/MulticastSocketProtocol.cc b/Socket/Protocols/INet/MulticastSocketProtocol.cc index 8d47679..535dc2f 100644 --- a/Socket/Protocols/INet/MulticastSocketProtocol.cc +++ b/Socket/Protocols/INet/MulticastSocketProtocol.cc @@ -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(""); } diff --git a/senfscons/senfutil.py b/senfscons/senfutil.py index 2e537d8..ad80d8b 100644 --- a/senfscons/senfutil.py +++ b/senfscons/senfutil.py @@ -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'