#include "ICMPv6Packet.hh"
#include "ICMPv6TypePacket.hh"
#include <senf/Packets/DataPacket.hh>
-#include <senf/Utils/String.hh>
#include <senf/Utils/auto_unit_test.hh>
#include <boost/test/test_tools.hpp>
BOOST_AUTO_UNIT_TEST(ICMPv6_MLDv2_Packet_packet)
{
unsigned char data[] = {
- 0x00 ,0x00 ,0x00 ,0x01 ,0x04 ,0x00 ,0x00 ,0x00 ,
- 0xff ,0x15 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
- 0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x16
+ 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00,
+ 0xff, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16
};
-
senf::MLDv2ListenerReport p ( senf::MLDv2ListenerReport::create(data) );
- BOOST_CHECK_EQUAL(p->reserved(),0x0000 );
- senf::MLDv2ListenerReport::Parser::mcastAddrRecords_t::container mcastAddrRecords (p->mcastAddrRecords());
- senf::MLDv2ListenerReport::Parser::mcastAddrRecords_t::container::iterator mcAddrIt (mcastAddrRecords.begin() );
- BOOST_CHECK_EQUAL(mcAddrIt->recordType(), 0x04);
- BOOST_CHECK_EQUAL(senf::str(mcAddrIt->mcAddress() ), "ff15::16");
+ BOOST_CHECK_EQUAL(p->reserved(),0x0000 );
+ typedef senf::MLDv2ListenerReport::Parser::mcastAddrRecords_t::container recContainer_t;
+ recContainer_t mcastAddrRecords (p->mcastAddrRecords());
+ recContainer_t::iterator mcAddrIt (mcastAddrRecords.begin() );
+ BOOST_CHECK_EQUAL( mcAddrIt->recordType(), 0x04);
+ BOOST_CHECK_EQUAL( mcAddrIt->mcAddress().value(), senf::MACAddress(0xff1516));
}
#include <boost/operators.hpp>
#include <boost/utility.hpp>
#include <boost/type_traits/is_integral.hpp>
-#include <senf/Utils/Exception.hh>
#include <senf/Utils/Tags.hh>
#include <senf/Utils/safe_bool.hh>
#include "PacketInterpreter.hh"
// Custom includes
#include <errno.h>
-#include <senf/Utils/membind.hh>
+#include <boost/bind.hpp>
#include <senf/Utils/Exception.hh>
#include "Scheduler.hh"
// Custom includes
#include <senf/Utils/senfassert.hh>
#include <errno.h>
-#include <senf/Utils/Exception.hh>
#define prefix_ inline
///////////////////////////////cci.p///////////////////////////////////////
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/finder.hpp>
-#include <senf/Utils/Exception.hh>
#include <senf/Socket/Protocols/AddressExceptions.hh>
//#include "LLAddressing.mpp"
// Custom includes
#include <senf/Utils/senfassert.hh>
-#include <senf/Utils/Exception.hh>
#include "SocketProtocol.hh"
#define prefix_ inline
#include "Config.ih"
// Custom includes
-#include <senf/Utils/membind.hh>
#define prefix_ inline
///////////////////////////////cci.p///////////////////////////////////////
#include <boost/preprocessor/stringize.hpp>
#include <senf/Utils/senfassert.hh>
#include <senf/Utils/Range.hh>
-#include <senf/Utils/String.hh>
-#include <senf/Utils/range.hh>
#include "Server.hh"
//#include "Executor.mpp"
// Custom includes
#include <senf/Utils/Logger/SenfLog.hh>
-#include <senf/Utils/range.hh>
+#include <senf/Utils/Range.hh>
+#include <senf/Utils/membind.hh>
//#include "LineEditor.mpp"
#define prefix_
#include "Node.hh"
#include "Node.ih"
-#include <senf/Utils/range.hh>
// Custom includes
+#include <senf/Utils/Range.hh>
//#include "Node.mpp"
#define prefix_
// Custom includes
#include <boost/algorithm/string/predicate.hpp>
#include <boost/format.hpp>
-#include <senf/Utils/range.hh>
+#include <senf/Utils/Range.hh>
#include "OverloadedCommand.hh"
//#include "ProgramOptions.mpp"
// Custom includes
#include <time.h>
-#include <senf/Utils/Exception.hh>
#include <senf/Scheduler/ClockService.hh>
//#include "TimeSource.mpp"
std::copy(boost::begin(range), boost::end(range), i);
}
+template <class Range>
+prefix_ bool senf::has_one_elt(Range r)
+{
+ return ! r.empty() && boost::next(r.begin()) == r.end();
+}
+
///////////////////////////////cti.e///////////////////////////////////////
#undef prefix_
template <class Range, class Iterator>
void copy_range(Range & range, Iterator const & i);
+ template <class Range>
+ bool has_one_elt(Range r);
}
///////////////////////////////hh.e////////////////////////////////////////
+++ /dev/null
-// $Id$
-//
-// Copyright (C) 2008
-// Fraunhofer Institute for Open Communication Systems (FOKUS)
-// Competence Center NETwork research (NET), St. Augustin, GERMANY
-// Stefan Bund <g0dil@berlios.de>
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// 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.
-
-/** \file
- \brief range inline template implementation */
-
-//#include "range.ih"
-
-// Custom includes
-#include <boost/utility.hpp>
-
-#define prefix_ inline
-///////////////////////////////cti.p///////////////////////////////////////
-
-template <class Range>
-prefix_ bool senf::has_one_elt(Range r)
-{
- return ! r.empty() && boost::next(r.begin()) == r.end();
-}
-
-///////////////////////////////cti.e///////////////////////////////////////
-#undef prefix_
-
-\f
-// Local Variables:
-// mode: c++
-// fill-column: 100
-// comment-column: 40
-// c-file-style: "senf"
-// indent-tabs-mode: nil
-// ispell-local-dictionary: "american"
-// compile-command: "scons -u test"
-// End:
+++ /dev/null
-// $Id$
-//
-// Copyright (C) 2008
-// Fraunhofer Institute for Open Communication Systems (FOKUS)
-// Competence Center NETwork research (NET), St. Augustin, GERMANY
-// Stefan Bund <g0dil@berlios.de>
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// 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.
-
-/** \file
- \brief range public header */
-
-#ifndef HH_SENF_Utils_range_
-#define HH_SENF_Utils_range_ 1
-
-// Custom includes
-
-//#include "range.mpp"
-///////////////////////////////hh.p////////////////////////////////////////
-
-namespace senf {
-
- template <class Range>
- bool has_one_elt(Range r);
-
-}
-
-///////////////////////////////hh.e////////////////////////////////////////
-//#include "range.cci"
-//#include "range.ct"
-#include "range.cti"
-#endif
-
-\f
-// Local Variables:
-// mode: c++
-// fill-column: 100
-// comment-column: 40
-// c-file-style: "senf"
-// indent-tabs-mode: nil
-// ispell-local-dictionary: "american"
-// compile-command: "scons -u test"
-// End: