///////////////////////////////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)
return boost::make_filter_iterator<binaryNAIDecoder>(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:
SENF_PARSER_SKIP_BITS ( 1 );
// MIH message ID (MID)
- SENF_PARSER_LABEL ( msgId_begin)
+ SENF_PARSER_FIELD ( messageId, UInt16Parser ); //<pkgdraw:hide
+ SENF_PARSER_GOTO ( messageId );
SENF_PARSER_BITFIELD ( sid, 4, unsigned );
SENF_PARSER_BITFIELD ( opcode, 2, unsigned );
SENF_PARSER_BITFIELD ( aid, 10, unsigned );
- SENF_PARSER_GOTO ( msgId_begin );
- SENF_PARSER_FIELD ( messageId, UInt16Parser );
SENF_PARSER_SKIP_BITS ( 4 );
SENF_PARSER_BITFIELD ( transactionId, 12, unsigned );
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 */