X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2F80221Bundle%2FMIHPacket.cc;h=f2e61243268743ac754851e98cd327d1c41bc9e5;hb=5443435c4c2b6e4386c5334b5b8358273f2bae93;hp=6c167f8849c75bba85e892138c243973a3248b2c;hpb=ffd0e5bf26f993bab27c777f71d58285867345d7;p=senf.git diff --git a/Packets/80221Bundle/MIHPacket.cc b/Packets/80221Bundle/MIHPacket.cc index 6c167f8..f2e6124 100644 --- a/Packets/80221Bundle/MIHPacket.cc +++ b/Packets/80221Bundle/MIHPacket.cc @@ -97,25 +97,27 @@ prefix_ void senf::MIHPacketType::dump(packet p, std::ostream &os) boost::io::ios_all_saver ias(os); os << "MIH Packet:\n" << " protocol header:\n" - << " Version: " << unsigned( p->version()) << "\n" - << " Ack-Request: " << p->ackRequest() << "\n" - << " Ack-Response: " << p->ackResponse() << "\n" - << " UIR: " << p->uir() << "\n" - << " more fragment: " << p->moreFragment() << "\n" - << " fragment number: " << p->fragmentNr() << "\n" - << " message ID (MID):\n" - << " SID: " << unsigned( p->sid()) << "\n" - << " Opcode: " << unsigned( p->opcode()) << "\n" - << " AID: " << unsigned( p->aid()) << "\n" - << " Transaction ID: " << unsigned( p->transactionId()) << "\n" - << " payload length: " << unsigned( p->payloadLength()) << "\n" + << " Version: " << unsigned( p->version()) << "\n" + << " Ack-Request: " << p->ackRequest() << "\n" + << " Ack-Response: " << p->ackResponse() << "\n" + << " UIR: " << p->uir() << "\n" + << " more fragment: " << p->moreFragment() << "\n" + << " fragment number: " << p->fragmentNr() << "\n" + << " message ID (MID): " << unsigned( p->messageId()) << "\n" + << " SID: " << unsigned( p->sid()) << "\n" + << " Opcode: " << unsigned( p->opcode()) << "\n" + << " AID: " << unsigned( p->aid()) << "\n" + << " Transaction ID: " << unsigned( p->transactionId()) << "\n" + << " payload length: " << unsigned( p->payloadLength()) << "\n" << " source MIHF_Id TLV:\n" - << " length: " << unsigned (p->src_mihfId().length()) << "\n" + << " type: " << unsigned (p->src_mihfId().type()) << "\n" + << " length: " << unsigned (p->src_mihfId().length()) << "\n" << " value:\n"; std::string src_mihfId (p->src_mihfId().asString()); hexdump(src_mihfId.begin(), src_mihfId.end(), os); os << " destination MIHF_Id TLV:\n" - << " length: " << unsigned (p->dst_mihfId().length()) << "\n" + << " type: " << unsigned (p->dst_mihfId().type()) << "\n" + << " length: " << unsigned (p->dst_mihfId().length()) << "\n" << " value:\n"; std::string dst_mihfId (p->dst_mihfId().asString()); hexdump(dst_mihfId.begin(), dst_mihfId.end(), os); @@ -130,6 +132,23 @@ prefix_ void senf::MIHPacketType::finalize(packet p) } +prefix_ senf::PacketInterpreterBase::factory_t senf::MIHPacketType::nextPacketType(packet p) +{ + if (p.data().size() < initSize()) + return no_factory(); + PkReg_Entry const * e (PacketRegistry::lookup( p->messageId(), nothrow )); + return e ? e->factory() : MIHPayloadPacket::factory(); +} + + +prefix_ void senf::MIHPayloadPacketType::dump(packet p, std::ostream &os) +{ + boost::io::ios_all_saver ias(os); + os << "MIH Payload (service specific TLVs):\n" + << " ToDo!\n"; +} + + #undef prefix_