Support for the match predicate between interest and content. More...
Go to the source code of this file.
Functions | |
void | ccn_digest_ContentObject (const unsigned char *content_object, struct ccn_parsed_ContentObject *pc) |
Compute the digest of the entire ContentObject if necessary, caching the result in pc->digest, pc->digest_bytes. | |
static int | ccn_pubid_matches (const unsigned char *content_object, struct ccn_parsed_ContentObject *pc, const unsigned char *interest_msg, const struct ccn_parsed_interest *pi) |
int | ccn_excluded (const unsigned char *excl, size_t excl_size, const unsigned char *nextcomp, size_t nextcomp_size) |
Test for a match between a next component and an exclusion clause. | |
int | ccn_content_matches_interest (const unsigned char *content_object, size_t content_object_size, int implicit_content_digest, struct ccn_parsed_ContentObject *pc, const unsigned char *interest_msg, size_t interest_msg_size, const struct ccn_parsed_interest *pi) |
Test for a match between a ContentObject and an Interest. |
Support for the match predicate between interest and content.
Part of the CCNx C Library.
Definition in file ccn_match.c.
int ccn_content_matches_interest | ( | const unsigned char * | content_object, | |
size_t | content_object_size, | |||
int | implicit_content_digest, | |||
struct ccn_parsed_ContentObject * | pc, | |||
const unsigned char * | interest_msg, | |||
size_t | interest_msg_size, | |||
const struct ccn_parsed_interest * | pi | |||
) |
Test for a match between a ContentObject and an Interest.
content_object | ccnb-encoded ContentObject | |
content_object_size | its size in bytes | |
implicit_content_digest | boolean indicating whether the final name component is implicit (as in the on-wire format) or explicit (as within ccnd's content store). | |
pc | Valid parse information may be provided to speed things up. If NULL it will be reconstructed internally. | |
interest_msg | ccnb-encoded Interest | |
interest_msg_size | its size in bytes | |
pi | see _pc_ |
Definition at line 195 of file ccn_match.c.
Referenced by ccn_dispatch_message(), ccnd_answer_req(), ccnr_answer_req(), cob_matches(), consume_matching_interests(), incoming_interest(), interest_handler(), matchbox(), process_incoming_interest(), r_match_consume_matching_interests(), r_proto_begin_enumeration(), r_proto_continue_enumeration(), seqw_incoming_interest(), SyncInterestArrived(), and write_interest_handler().
void ccn_digest_ContentObject | ( | const unsigned char * | content_object, | |
struct ccn_parsed_ContentObject * | pc | |||
) |
Compute the digest of the entire ContentObject if necessary, caching the result in pc->digest, pc->digest_bytes.
Definition at line 34 of file ccn_match.c.
Referenced by ccn_content_matches_interest(), incoming_content(), process_incoming_content(), r_store_set_flatname(), storeHandler(), and test_insert_content().
int ccn_excluded | ( | const unsigned char * | excl, | |
size_t | excl_size, | |||
const unsigned char * | nextcomp, | |||
size_t | nextcomp_size | |||
) |
Test for a match between a next component and an exclusion clause.
excl | address of exclusion encoding | |
excl_size | bytes in exclusion encoding | |
nextcomp | addr of nextcomp bytes | |
nextcomp_size | number of nextcomp bytes |
Definition at line 102 of file ccn_match.c.
Referenced by ccn_btree_match_interest(), ccn_content_matches_interest(), and SyncInterestArrived().
static int ccn_pubid_matches | ( | const unsigned char * | content_object, | |
struct ccn_parsed_ContentObject * | pc, | |||
const unsigned char * | interest_msg, | |||
const struct ccn_parsed_interest * | pi | |||
) | [static] |
Definition at line 56 of file ccn_match.c.
Referenced by ccn_content_matches_interest().