X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2F80221Bundle%2FTLVParser.hh;h=0a466c6482e2fdb1798f1f0b7d10a6bf207a9e79;hb=7db21ff4de83edddec7084c5f121a10321b5a42f;hp=2c4fc7d1562da26e9b81827ec864351cd5dab605;hpb=5cb66935d4b2973ea0fe7487b862b9ddc31648f4;p=senf.git diff --git a/senf/Packets/80221Bundle/TLVParser.hh b/senf/Packets/80221Bundle/TLVParser.hh index 2c4fc7d..0a466c6 100644 --- a/senf/Packets/80221Bundle/TLVParser.hh +++ b/senf/Packets/80221Bundle/TLVParser.hh @@ -35,13 +35,6 @@ namespace senf { - struct MIHTLVLengthException : public senf::Exception - { - MIHTLVLengthException() - : senf::Exception("MIHTLVLengthException") {} - }; - - class MIHTLVLengthParser : public detail::packet::IntParserOps, public PacketParserBase @@ -127,6 +120,9 @@ namespace senf { \param v maximum value of length field */ void maxLength(MIHTLVLengthParser::value_type maxl) const; + + void validateType(boost::uint8_t type) const; + void validateTypeLength(boost::uint8_t type, MIHTLVLengthParser::value_type length) const; }; @@ -292,6 +288,7 @@ namespace senf { } static type_t::value_type const typeId = 1; void dump(std::ostream & os) const; + void validate() const; }; /** \brief Parser for 802.21 destination MIHF_ID TLV @@ -306,6 +303,7 @@ namespace senf { } static type_t::value_type const typeId = 2; void dump(std::ostream & os) const; + void validate() const; }; /** \brief Parser for 802.21 Status TLV @@ -324,6 +322,7 @@ namespace senf { } static type_t::value_type const typeId = 3; void dump(std::ostream & os) const; ///< dump string representation to given stream + void validate() const; enum StatusCode { Success, UnspecifiedFailure, Rejected, AuthorizationFailure, NetworkError }; @@ -343,6 +342,7 @@ namespace senf { } static type_t::value_type const typeId = 11; void dump(std::ostream & os) const; ///< dump string representation to given stream + void validate() const; enum RequestCode { Registration, ReRegistration }; }; @@ -361,6 +361,7 @@ namespace senf { } static type_t::value_type const typeId = 12; void dump(std::ostream & os) const; ///< dump string representation to given stream + void validate() const; }; }