fixed ...
[senf.git] / senf / Packets / DefaultBundle / IPv6Extensions.cc
index 0e39c65..543a3b3 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "IPv6Extensions.hh"
 //#include "IPv6Extensions.ih"
-
+#include <senf/Utils/hexdump.hh>
 // Custom includes
 
 //#include "IPv6Extensions.mpp"
@@ -72,6 +72,14 @@ prefix_ void senf::IPv6ExtensionType_HopByHop::dump(packet p, std::ostream & os)
     os << "Internet protocol Version 6 Hop-By-Hop extension:\n"
        <<     "  next header             : " << unsigned (p->nextHeader()) << "\n"
        <<     "  header length           : " << unsigned (p->headerLength()) << "\n";
+       os << "OptionTypes:\n";
+       IPv6Extension_HopByHop::Parser::options_t::container options (p->options());
+       IPv6Extension_HopByHop::Parser::options_t::container::iterator optIter(options.begin());
+       for(;optIter != options.end(); ++ optIter){
+           os << "Option Type:\t" << (unsigned) optIter->optionType()
+             << "\nOptionLength:\t" << (unsigned)  optIter->optionLength() <<"\n";
+           senf::hexdump(boost::next(boost::begin(optIter->value())), boost::next( boost::end(optIter->value())), os );
+       }
 }
 
 prefix_ void senf::IPv6ExtensionType_Destination::dump(packet p, std::ostream & os)