X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FDefaultBundle%2FNDPOptions.hh;fp=senf%2FPackets%2FDefaultBundle%2FNDPOptions.hh;h=186343b7545b1e8ab300557a1a2e7b4682a4466e;hb=cad7256a15fbec9b4bf38559e89db7e0fe814db0;hp=488e5ebd336533e21282865a1a2f8402ed0e01d3;hpb=9cb871b939efe93e35dd96808d25089399acfc46;p=senf.git diff --git a/senf/Packets/DefaultBundle/NDPOptions.hh b/senf/Packets/DefaultBundle/NDPOptions.hh index 488e5eb..186343b 100644 --- a/senf/Packets/DefaultBundle/NDPOptions.hh +++ b/senf/Packets/DefaultBundle/NDPOptions.hh @@ -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; };