From: tho Date: Wed, 8 Jul 2009 09:35:39 +0000 (+0000) Subject: Packets/80221Bundle: added handy SENF_MIH_PACKET_REGISTRY_REGISTER define X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=cc3ff5b49ee43194e138fd72fefd04cfd88eac6d;p=senf.git Packets/80221Bundle: added handy SENF_MIH_PACKET_REGISTRY_REGISTER define git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1258 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/80221Bundle/MIHPacket.hh b/Packets/80221Bundle/MIHPacket.hh index 508a961..90765c3 100644 --- a/Packets/80221Bundle/MIHPacket.hh +++ b/Packets/80221Bundle/MIHPacket.hh @@ -40,7 +40,18 @@ ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { - + + struct MIHMessageRegistry { + // MIH messages registry + typedef boost::uint16_t key_t; + }; + +# define SENF_MIH_PACKET_REGISTRY_REGISTER( sid, opcode, aid, type ) \ + SENF_PACKET_REGISTRY_REGISTER( \ + senf::MIHMessageRegistry, \ + boost::uint16_t((boost::uint16_t(sid) << 12) | (boost::uint16_t(opcode) << 10) | aid), \ + type ) + /** \brief Parse a MIHF_ID the maximum length of a MIHF_ID is 253 octets (see F.3.11 in 802.21) @@ -97,12 +108,7 @@ namespace senf { return boost::make_filter_iterator(begin, end); } }; - - struct MIHMessageRegistry { - // MIH messages registry - typedef boost::uint16_t key_t; - }; - + /** \brief Parse a MIH packet Parser implementing the MIH header. The fields implemented are: @@ -178,6 +184,8 @@ namespace senf { static void dump(packet p, std::ostream &os); static void finalize(packet p); static factory_t nextPacketType(packet p); + + enum ResponseStatus { Success, UnspecifiedFailure, Rejected, AuthorizationFailure, NetworkError }; }; /** \brief MIH packet typedef */