X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FDefaultBundle%2FNDPOptions.hh;h=d4cc4a7846535134e206ac35613b19bf485b567d;hb=e3179a2123ad51d0d9eb63834a581145c4f77c92;hp=488e5ebd336533e21282865a1a2f8402ed0e01d3;hpb=57524bfa72e4536b15700a83eae94093ed32106a;p=senf.git diff --git a/senf/Packets/DefaultBundle/NDPOptions.hh b/senf/Packets/DefaultBundle/NDPOptions.hh index 488e5eb..d4cc4a7 100644 --- a/senf/Packets/DefaultBundle/NDPOptions.hh +++ b/senf/Packets/DefaultBundle/NDPOptions.hh @@ -30,7 +30,7 @@ #include #include -///////////////////////////////hh.p//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// namespace senf { //############################################################# @@ -46,7 +46,17 @@ namespace senf { typedef GenericTLVParserRegistry Registry; }; - typedef GenericTLVParserBase NDPGenericOptionParser; + + struct NDPGenericOptionParser : public GenericTLVParserBase + { + typedef GenericTLVParserBase base; + NDPGenericOptionParser(data_iterator i, state_type s) : base(i,s) {} + + senf::PacketParserBase::size_type bytes() const + { + return length()*8; + } + }; struct NDPSourceLLAddressTLVParser : public NDPOptionParser { @@ -76,7 +86,11 @@ namespace senf { type() = typeId; length() = 1; } - static const UInt8Parser::value_type typeId = 0x02; + + senf::PacketParserBase::size_type bytes(NDPTargetLLAddressTLVParser p) { + return length()*8; + } + static const type_t::value_type typeId = 0x02; void dump(std::ostream & os) const; }; @@ -101,6 +115,9 @@ namespace senf { reserved1() = 0; reserved2() = 0; } + senf::PacketParserBase::size_type bytes(NDPPrefixInformationTLVParser p) { + return length()*8; + } static const UInt8Parser::value_type typeId = 0x03; void dump(std::ostream & os) const; }; @@ -124,7 +141,7 @@ namespace senf { }; } -///////////////////////////////hh.e//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// //#include "NDPOptions.cci" //#include "NDPOptions.ct" //#include "NDPOptions.cti"