X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2F80221Bundle%2FTLVParser.hh;h=ce4048148b1c81c90ac7b11cf385604860e9071d;hb=bd52d6b1c3b258c030c7302f5e926aeb5b5b0715;hp=da6a96f22228a0452c85c000ede965690899b0ce;hpb=d0c31526ac12869eed085891e3ae13e8b21072e6;p=senf.git diff --git a/senf/Packets/80221Bundle/TLVParser.hh b/senf/Packets/80221Bundle/TLVParser.hh index da6a96f..ce40481 100644 --- a/senf/Packets/80221Bundle/TLVParser.hh +++ b/senf/Packets/80221Bundle/TLVParser.hh @@ -41,6 +41,11 @@ namespace senf { : 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, @@ -128,7 +133,7 @@ namespace senf { */ void maxLength(MIHTLVLengthParser::value_type maxl) const; - std::pair validateTL(boost::uint8_t type, MIHTLVLengthParser::value_type length) const; + void validateTL(boost::uint8_t type, MIHTLVLengthParser::value_type length) const; }; @@ -294,7 +299,7 @@ namespace senf { } static type_t::value_type const typeId = 1; void dump(std::ostream & os) const; - std::pair validate() const; + void validate() const; }; /** \brief Parser for 802.21 destination MIHF_ID TLV @@ -309,7 +314,7 @@ namespace senf { } static type_t::value_type const typeId = 2; void dump(std::ostream & os) const; - std::pair validate() const; + void validate() const; }; /** \brief Parser for 802.21 Status TLV @@ -328,7 +333,7 @@ namespace senf { } static type_t::value_type const typeId = 3; void dump(std::ostream & os) const; ///< dump string representation to given stream - std::pair validate() const; + void validate() const; enum StatusCode { Success, UnspecifiedFailure, Rejected, AuthorizationFailure, NetworkError }; @@ -348,7 +353,7 @@ namespace senf { } static type_t::value_type const typeId = 11; void dump(std::ostream & os) const; ///< dump string representation to given stream - std::pair validate() const; + void validate() const; enum RequestCode { Registration, ReRegistration }; }; @@ -367,7 +372,7 @@ namespace senf { } static type_t::value_type const typeId = 12; void dump(std::ostream & os) const; ///< dump string representation to given stream - std::pair validate() const; + void validate() const; }; }