MetisLogger * metisTlvSkeleton_GetLogger(const MetisTlvSkeleton *opaque) { const _InternalSkeleton *skeleton = (const _InternalSkeleton *) opaque; _assertInvariants(skeleton); return skeleton->logger; }
size_t metisTlvSkeleton_TotalPacketLength(const MetisTlvSkeleton *opaque) { const _InternalSkeleton *skeleton = (const _InternalSkeleton *) opaque; _assertInvariants(skeleton); return skeleton->tlvOps->totalPacketLength(skeleton->packet); }
bool metisTlvSkeleton_IsPacketTypeHopByHopFragment(const MetisTlvSkeleton *opaque) { const _InternalSkeleton *skeleton = (const _InternalSkeleton *) opaque; _assertInvariants(skeleton); return skeleton->tlvOps->isPacketTypeHopByHopFragment(skeleton->packet); }
const uint8_t * metisTlvSkeleton_GetPacket(const MetisTlvSkeleton *opaque) { const _InternalSkeleton *skeleton = (const _InternalSkeleton *) opaque; _assertInvariants(skeleton); return skeleton->packet; }
PARCCryptoHash * metisTlvSkeleton_ComputeContentObjectHash(const MetisTlvSkeleton *opaque) { const _InternalSkeleton *skeleton = (const _InternalSkeleton *) opaque; _assertInvariants(skeleton); return skeleton->tlvOps->computeContentObjectHash(skeleton->packet); }
static void _ccnxInterestFacadeV1_AssertValid(const CCNxTlvDictionary *interestDictionary) { _assertInvariants(interestDictionary); assertTrue(ccnxTlvDictionary_IsValueName(interestDictionary, CCNxCodecSchemaV1TlvDictionary_MessageFastArray_NAME), "Name field is not a name"); }
static bool _ccnxInterestFacadeV1_SetContentObjectHashRestriction(CCNxTlvDictionary *interestDictionary, const PARCBuffer *contentObjectHash) { _assertInvariants(interestDictionary); return ccnxTlvDictionary_PutBuffer(interestDictionary, CCNxCodecSchemaV1TlvDictionary_MessageFastArray_OBJHASH_RESTRICTION, contentObjectHash); }
/** * Initialize the skeleton memory * * Clears all the extents to {0, 0} and sets the tlvOps and packet members for further parsing. * * @param [in] skeleton The skeleton to initialize * @param [in] tlvOps The parser operations to use * @param [in] packet the packet buffer (points to byte "0" of the fixed header) * * Example: * @code * { * MetisTlvSkeleton skeleton; * _initialize(&skeleton, &MetisTlvSchemaV0_Ops, packet); * } * @endcode */ static void _initialize(_InternalSkeleton *skeleton, const struct metis_tlv_ops *tlvOps, uint8_t *packet, MetisLogger *logger) { memset(skeleton, 0, sizeof(MetisTlvSkeleton)); skeleton->packet = packet; skeleton->tlvOps = tlvOps; skeleton->logger = logger; _assertInvariants(skeleton); }
static CCNxName * _ccnxInterestFacadeV1_GetName(const CCNxTlvDictionary *interestDictionary) { int key = CCNxCodecSchemaV1TlvDictionary_MessageFastArray_NAME; _assertInvariants(interestDictionary); if (ccnxTlvDictionary_IsValueName(interestDictionary, key)) { return ccnxTlvDictionary_GetName(interestDictionary, key); } return NULL; }
static void _ccnxInterestFacadeV1_Display(const CCNxTlvDictionary *interestDictionary, size_t indentation) { _assertInvariants(interestDictionary); ccnxTlvDictionary_Display(interestDictionary, (unsigned) indentation); }
static uint32_t _ccnxInterestFacadeV1_GetHopLimit(const CCNxTlvDictionary *interestDictionary) { _assertInvariants(interestDictionary); return _fetchUint32(interestDictionary, CCNxCodecSchemaV1TlvDictionary_MessageFastArray_HOPLIMIT, CCNxInterestDefault_HopLimit); }
static PARCBuffer * _ccnxInterestFacadeV1_GetPayload(const CCNxTlvDictionary *interestDictionary) { _assertInvariants(interestDictionary); return ccnxTlvDictionary_GetBuffer(interestDictionary, CCNxCodecSchemaV1TlvDictionary_MessageFastArray_PAYLOAD); }
static PARCBuffer * _ccnxInterestFacadeV1_GetKeyIdRestriction(const CCNxTlvDictionary *interestDictionary) { _assertInvariants(interestDictionary); return ccnxTlvDictionary_GetBuffer(interestDictionary, CCNxCodecSchemaV1TlvDictionary_MessageFastArray_KEYID_RESTRICTION); }
static uint32_t _ccnxInterestFacadeV1_GetLifetime(const CCNxTlvDictionary *interestDictionary) { _assertInvariants(interestDictionary); return _fetchUint32(interestDictionary, CCNxCodecSchemaV1TlvDictionary_HeadersFastArray_InterestLifetime, CCNxInterestDefault_LifetimeMilliseconds); }
static bool _ccnxInterestFacadeV1_SetHopLimit(CCNxTlvDictionary *interestDictionary, uint32_t hopLimit) { _assertInvariants(interestDictionary); return ccnxTlvDictionary_PutInteger(interestDictionary, CCNxCodecSchemaV1TlvDictionary_MessageFastArray_HOPLIMIT, hopLimit); }
static bool _ccnxInterestFacadeV1_SetKeyIdRestriction(CCNxTlvDictionary *interestDictionary, const PARCBuffer *keyId) { _assertInvariants(interestDictionary); return ccnxTlvDictionary_PutBuffer(interestDictionary, CCNxCodecSchemaV1TlvDictionary_MessageFastArray_KEYID_RESTRICTION, keyId); }