80221Bundle: added static const etherType member to MIHPacketType
tho [Thu, 12 May 2011 11:02:50 +0000 (11:02 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1787 270642c3-0616-0410-b53a-bc976706d245

senf/Packets/80221Bundle/MIHPacket.cc
senf/Packets/80221Bundle/MIHPacket.hh
senf/Packets/80221Bundle/TLVParser.hh

index 4c40482..81ba767 100644 (file)
@@ -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);
 
 
 //-/////////////////////////////////////////////////////////////////////////////////////////////////
index f99c588..235ec58 100644 (file)
@@ -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
index 2940400..0fd0a71 100644 (file)
@@ -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); }
     };