added additional flags in optionType Parser and unittests
[senf.git] / senf / Packets / DefaultBundle / IPv6ExtOptionType.ct
index 6c5a841..f498f28 100644 (file)
@@ -44,7 +44,13 @@ prefix_ void senf::GenericOptTypeTLVPacketParser::value(ForwardReadableRange con
         resize(optionLength()+2, rangeSize);
 
     std::copy(boost::next(boost::begin(range), 2), boost::next(boost::end(range)), si);
-    optionType() = *(boost::begin(range));
+    unsigned int val = *(boost::begin(range));
+    unsigned int mask = 192u;
+    altAction() = (val & mask) >> 6;
+    mask = 32u;
+    changeFlag() = (val & mask) >> 5;
+    mask = 31u;
+    optionType() = (val & mask);
     optionLength() = *(boost::next( boost::begin(range), 1));
 }