env.Value(env.subst("$_CPPDEFFLAGS")))
env.Default(conf)
env.Install('$CONFINSTALLDIR', conf)
+
+# AllBundles:
+cobject = env.CombinedObject('${LOCALLIBDIR}/${NAME}${OBJADDSUFFIX}', env['PACKET_BUNDLES'],
+ NAME="AllBundles")
+env.Default(cobject)
+env.Install('${OBJINSTALLDIR}', cobject)
+
\ No newline at end of file
public:
enum Type { Empty, MACAddress, INet4Address, INet6Address, String, EUI64 };
- MIHFId();
- MIHFId(senf::MACAddress const & addr);
- MIHFId(senf::INet4Address const & addr);
- MIHFId(senf::INet6Address const & addr);
- MIHFId(std::string const & addr);
- MIHFId(senf::EUI64 const & addr);
+ MIHFId(); ///< Create empty instance.
+ MIHFId(senf::MACAddress const & addr); ///< Construct id with given MACAddress
+ MIHFId(senf::INet4Address const & addr); ///< Construct id with given INet4Address
+ MIHFId(senf::INet6Address const & addr); ///< Construct id with given INet6Address
+ MIHFId(std::string const & addr); ///< Construct id with given String
+ MIHFId(senf::EUI64 const & addr); ///< Construct id with given EUI64
Type type() const;
bool operator==(MIHFId const & other) const;
SENF_PARSER_INHERIT ( BaseTLVPacketParser );
SENF_PARSER_SKIP ( length(), 0 );
SENF_PARSER_FINALIZE ( MIHFId_TLVParser );
-
+
+ public:
std::string asString() const;
void setString(std::string const &id);
{
# include SENF_PARSER()
SENF_PARSER_LIST ( tlv_list, packetSize(), GenericTLVPacketParser );
-
SENF_PARSER_FINALIZE ( MIHPayloadPacketParser );
};
// Custom includes
#include "MIHPacket.hh"
+#include <senf/Packets/DefaultBundle/EthernetPacket.hh>
#include <senf/Utils/auto_unit_test.hh>
#include <boost/test/test_tools.hpp>
BOOST_CHECK_EQUAL( mihPacket->messageId(), 0x4c2a );
}
+BOOST_AUTO_UNIT_TEST(MIHPacket_create_eth)
+{
+ EthernetPacket eth (EthernetPacket::create());
+ MIHPacket mihPacket (MIHPacket::createAfter(eth));
+ eth.finalizeAll();
+ BOOST_CHECK_EQUAL( eth->type_length(), 0x86dd);
+ std::ostringstream oss (std::ostringstream::out);
+ SENF_CHECK_NO_THROW( eth.dump( oss));
+}
+
BOOST_AUTO_UNIT_TEST(MIHPacket_create_string)
{
MIHPacket mihPacket (MIHPacket::create());
env.PkgDraw("MPEGDVBBundle/TransportPacket.hh"),
])
-cobject = env.CombinedObject('${LOCALLIBDIR}/${NAME}${OBJADDSUFFIX}', env['PACKET_BUNDLES'],
- NAME="AllBundles")
-env.Default(cobject)
-env.Install('${OBJINSTALLDIR}', cobject)
-