Packets/80221Bundle: fixed message validation
[senf.git] / senf / Packets / 80221Bundle / TLVParser.hh
index ce40481..0a466c6 100644 (file)
 
 namespace senf {
 
-    struct MIHTLVLengthException : public senf::Exception
-    {
-        MIHTLVLengthException()
-          : senf::Exception("MIHTLVLengthException") {}
-    };
-
-    struct InvalidMIHPacketException : public senf::Exception {
-        InvalidMIHPacketException(std::string const & description)
-            : senf::Exception("Invalid MIH message: ") { append(description); }
-    };
-
-
     class MIHTLVLengthParser
         : public detail::packet::IntParserOps<MIHTLVLengthParser, boost::uint32_t>,
           public PacketParserBase
@@ -133,7 +121,8 @@ namespace senf {
          */
         void maxLength(MIHTLVLengthParser::value_type maxl) const;
 
-        void validateTL(boost::uint8_t type, MIHTLVLengthParser::value_type length) const;
+        void validateType(boost::uint8_t type) const;
+        void validateTypeLength(boost::uint8_t type, MIHTLVLengthParser::value_type length) const;
     };