From: tho Date: Thu, 12 May 2011 11:02:50 +0000 (+0000) Subject: 80221Bundle: added static const etherType member to MIHPacketType X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=2017d34cab7de03c786310b3a08424a339f4476d;p=senf.git 80221Bundle: added static const etherType member to MIHPacketType git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1787 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Packets/80221Bundle/MIHPacket.cc b/senf/Packets/80221Bundle/MIHPacket.cc index 4c40482..81ba767 100644 --- a/senf/Packets/80221Bundle/MIHPacket.cc +++ b/senf/Packets/80221Bundle/MIHPacket.cc @@ -34,7 +34,7 @@ #define prefix_ //-///////////////////////////////////////////////////////////////////////////////////////////////// -SENF_PACKET_REGISTRY_REGISTER( senf::EtherTypes, 0x8917, senf::MIHPacket); +SENF_PACKET_REGISTRY_REGISTER( senf::EtherTypes, senf::MIHPacketType::etherType, senf::MIHPacket); //-///////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/senf/Packets/80221Bundle/MIHPacket.hh b/senf/Packets/80221Bundle/MIHPacket.hh index f99c588..235ec58 100644 --- a/senf/Packets/80221Bundle/MIHPacket.hh +++ b/senf/Packets/80221Bundle/MIHPacket.hh @@ -110,6 +110,8 @@ namespace senf { static void finalize(packet p); static factory_t nextPacketType(packet p); static void validate(packet p); + + static const boost::uint16_t etherType = 0x8917; }; /** \brief MIH packet typedef diff --git a/senf/Packets/80221Bundle/TLVParser.hh b/senf/Packets/80221Bundle/TLVParser.hh index 2940400..0fd0a71 100644 --- a/senf/Packets/80221Bundle/TLVParser.hh +++ b/senf/Packets/80221Bundle/TLVParser.hh @@ -41,7 +41,8 @@ namespace senf { : senf::Exception("MIHTLVLengthException") {} }; - struct InvalidMIHPacketException : public senf::Exception { + struct InvalidMIHPacketException : public senf::Exception + { InvalidMIHPacketException(std::string const & description) : senf::Exception("Invalid MIH message: ") { append(description); } };