Go to the source code of this file.
Data Structures | |
struct | ccnr_parsed_policy |
struct | ccnr_expect_content |
Defines | |
#define | REPO_SW "\xC1.R.sw" |
#define | REPO_SWC "\xC1.R.sw-c" |
#define | REPO_AF "\xC1.R.af" |
#define | NAME_BE "\xC1.E.be" |
#define | CCNR_PIPELINE 4 |
Functions | |
void | r_proto_init (struct ccnr_handle *ccnr) |
void | r_proto_uri_listen (struct ccnr_handle *ccnr, struct ccn *ccn, const char *uri, ccn_handler p, intptr_t intdata) |
int | r_proto_append_repo_info (struct ccnr_handle *ccnr, struct ccn_charbuf *rinfo, struct ccn_charbuf *names, const char *info) |
Construct a charbuf with an encoding of a RepositoryInfo. | |
int | r_proto_policy_append_basic (struct ccnr_handle *ccnr, struct ccn_charbuf *policy, const char *version, const char *local_name, const char *global_prefix) |
int | r_proto_policy_append_namespace (struct ccnr_handle *ccnr, struct ccn_charbuf *policy, const char *namespace) |
enum ccn_upcall_res | r_proto_expect_content (struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info) |
int | r_proto_parse_policy (struct ccnr_handle *ccnr, const unsigned char *buf, size_t length, struct ccnr_parsed_policy *pp) |
Parse a ccnb-encoded policy content object and fill in a ccn_parsed_policy structure as the result. | |
void | r_proto_activate_policy (struct ccnr_handle *ccnr, struct ccnr_parsed_policy *pp) |
Install the listener for the namespaces that the parsed policy says to serve. | |
void | r_proto_deactivate_policy (struct ccnr_handle *ccnr, struct ccnr_parsed_policy *pp) |
Uninstall the listener for the namespaces that the parsed policy says to serve. | |
int | r_proto_initiate_key_fetch (struct ccnr_handle *ccnr, const unsigned char *msg, struct ccn_parsed_ContentObject *pco, int use_link, ccnr_cookie a) |
Initiate a key fetch if necessary. |
Definition in file ccnr_proto.h.
#define CCNR_PIPELINE 4 |
Definition at line 42 of file ccnr_proto.h.
Referenced by r_proto_expect_content(), r_proto_initiate_key_fetch(), and r_proto_start_write().
#define NAME_BE "\xC1.E.be" |
#define REPO_AF "\xC1.R.af" |
Definition at line 30 of file ccnr_proto.h.
Referenced by r_proto_answer_req(), and r_proto_bulk_import().
#define REPO_SW "\xC1.R.sw" |
#define REPO_SWC "\xC1.R.sw-c" |
void r_proto_activate_policy | ( | struct ccnr_handle * | ccnr, | |
struct ccnr_parsed_policy * | pp | |||
) |
Install the listener for the namespaces that the parsed policy says to serve.
Normal usage is to deactivate the old policy and then activate the new one
Definition at line 249 of file ccnr_proto.c.
Referenced by r_init_create(), and r_proto_policy_update().
int r_proto_append_repo_info | ( | struct ccnr_handle * | ccnr, | |
struct ccn_charbuf * | rinfo, | |||
struct ccn_charbuf * | names, | |||
const char * | info | |||
) |
Construct a charbuf with an encoding of a RepositoryInfo.
Definition at line 296 of file ccnr_proto.c.
Referenced by r_proto_bulk_import(), r_proto_start_write(), and r_proto_start_write_checked().
void r_proto_deactivate_policy | ( | struct ccnr_handle * | ccnr, | |
struct ccnr_parsed_policy * | pp | |||
) |
Uninstall the listener for the namespaces that the parsed policy says to serve.
Definition at line 271 of file ccnr_proto.c.
Referenced by r_proto_policy_update().
enum ccn_upcall_res r_proto_expect_content | ( | struct ccn_closure * | selfp, | |
enum ccn_upcall_kind | kind, | |||
struct ccn_upcall_info * | info | |||
) |
Definition at line 339 of file ccnr_proto.c.
Referenced by r_proto_initiate_key_fetch(), and r_proto_start_write().
void r_proto_init | ( | struct ccnr_handle * | ccnr | ) |
int r_proto_initiate_key_fetch | ( | struct ccnr_handle * | ccnr, | |
const unsigned char * | msg, | |||
struct ccn_parsed_ContentObject * | pco, | |||
int | use_link, | |||
ccnr_cookie | a | |||
) |
Initiate a key fetch if necessary.
Definition at line 1454 of file ccnr_proto.c.
Referenced by r_proto_expect_content(), and r_sync_upcall_store().
int r_proto_parse_policy | ( | struct ccnr_handle * | ccnr, | |
const unsigned char * | buf, | |||
size_t | length, | |||
struct ccnr_parsed_policy * | pp | |||
) |
Parse a ccnb-encoded policy content object and fill in a ccn_parsed_policy structure as the result.
Definition at line 1426 of file ccnr_proto.c.
Referenced by load_policy(), and r_proto_policy_update().
int r_proto_policy_append_basic | ( | struct ccnr_handle * | ccnr, | |
struct ccn_charbuf * | policy, | |||
const char * | version, | |||
const char * | local_name, | |||
const char * | global_prefix | |||
) |
int r_proto_policy_append_namespace | ( | struct ccnr_handle * | ccnr, | |
struct ccn_charbuf * | policy, | |||
const char * | namespace | |||
) |
void r_proto_uri_listen | ( | struct ccnr_handle * | ccnr, | |
struct ccn * | ccn, | |||
const char * | uri, | |||
ccn_handler | p, | |||
intptr_t | intdata | |||
) |
Definition at line 220 of file ccnr_proto.c.
Referenced by r_proto_activate_policy(), and r_proto_deactivate_policy().