#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <ccn/ccn.h>
#include <ccn/charbuf.h>
#include <ccn/ccn_private.h>
#include <ccn/schedule.h>
#include <ccn/sockaddrutil.h>
#include <ccn/uri.h>
#include <ccn/keystore.h>
#include "ccnr_private.h"
#include "ccnr_internal_client.h"
#include "ccnr_forwarding.h"
#include "ccnr_io.h"
#include "ccnr_msg.h"
#include "ccnr_proto.h"
#include "ccnr_util.h"
Defines | |
#define | CCNR_ID_TEMPL "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" |
#define | CCNR_KEYSTORE_PASS "Th1s 1s n0t 8 g00d R3p0s1t0ry p8ssw0rd!" |
Functions | |
static struct ccn_charbuf * | ccnr_init_service_ccnb (struct ccnr_handle *ccnr, struct ccn *h, const char *baseuri, int freshness) |
PUBLIC enum ccn_upcall_res | ccnr_answer_req (struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info) |
Common interest handler. | |
static int | ccnr_internal_client_refresh (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
PUBLIC void | ccnr_uri_listen (struct ccnr_handle *ccnr, struct ccn *ccn, const char *uri, ccn_handler p, intptr_t intdata) |
int | ccnr_init_repo_keystore (struct ccnr_handle *ccnr, struct ccn *h) |
Create the repository keystore if necessary, and load it into the client handle h. | |
static int | post_face_notice (struct ccnr_handle *ccnr, unsigned filedesc) |
static int | ccnr_notice_push (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
void | ccnr_face_status_change (struct ccnr_handle *ccnr, unsigned filedesc) |
Called by ccnr when a fdholder undergoes a substantive status change that should be reported to interested parties. | |
int | ccnr_internal_client_start (struct ccnr_handle *ccnr) |
void | ccnr_internal_client_stop (struct ccnr_handle *ccnr) |
static int | ccnr_direct_client_refresh (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
int | ccnr_direct_client_start (struct ccnr_handle *ccnr) |
void | ccnr_direct_client_stop (struct ccnr_handle *ccnr) |
void ccnr_face_status_change | ( | struct ccnr_handle * | ccnr, | |
unsigned | filedesc | |||
) |
Called by ccnr when a fdholder undergoes a substantive status change that should be reported to interested parties.
In the destroy case, this is called from the hash table finalizer, so it shouldn't do much directly. Inspecting the fdholder is OK, though.
int ccnr_init_repo_keystore | ( | struct ccnr_handle * | ccnr, | |
struct ccn * | h | |||
) |
Create the repository keystore if necessary, and load it into the client handle h.
It is permitted for h to be NULL to skip the load.