Internal client of ccnd, handles requests for inspecting and controlling operation of the ccnd; requests and responses themselves use ccn protocols. More...
Go to the source code of this file.
Defines | |
#define | GOT_HERE |
#define | CCND_NOTICE_NAME "notice.txt" |
#define | CCND_PING 1 |
#define | MORECOMPS_MASK 0x007F |
Local interpretation of selfp->intdata. | |
#define | MUST_VERIFY 0x0080 |
#define | MUST_VERIFY1 (MUST_VERIFY + 1) |
#define | OPER_MASK 0xFF00 |
#define | OP_PING 0x0000 |
#define | OP_NEWFACE 0x0200 |
#define | OP_DESTROYFACE 0x0300 |
#define | OP_PREFIXREG 0x0400 |
#define | OP_SELFREG 0x0500 |
#define | OP_UNREG 0x0600 |
#define | OP_NOTICE 0x0700 |
#define | OP_SERVICE 0x0800 |
#define | CCND_ID_TEMPL "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" |
#define | CCN_PATH_VAR_TMP "/var/tmp" |
#define | CCND_KEYSTORE_PASS "\010\043\103\375\327\237\152\351\155" |
Functions | |
static void | ccnd_start_notice (struct ccnd_handle *ccnd) |
static struct ccn_charbuf * | ccnd_init_service_ccnb (struct ccnd_handle *ccnd, const char *baseuri, int freshness) |
static enum ccn_upcall_res | ccnd_answer_req (struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info) |
Common interest handler for ccnd_internal_client. | |
static int | ccnd_internal_client_refresh (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
static void | ccnd_uri_listen (struct ccnd_handle *ccnd, const char *uri, ccn_handler p, intptr_t intdata) |
static void | ccnd_reg_ccnx_ccndid (struct ccnd_handle *ccnd) |
Make a forwarding table entry for ccnx:/ccnx/CCNDID. | |
int | ccnd_init_internal_keystore (struct ccnd_handle *ccnd) |
static int | post_face_notice (struct ccnd_handle *ccnd, unsigned faceid) |
static int | ccnd_notice_push (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
void | ccnd_face_status_change (struct ccnd_handle *ccnd, unsigned faceid) |
Called by ccnd when a face undergoes a substantive status change that should be reported to interested parties. | |
int | ccnd_internal_client_start (struct ccnd_handle *ccnd) |
void | ccnd_internal_client_stop (struct ccnd_handle *ccnd) |
Internal client of ccnd, handles requests for inspecting and controlling operation of the ccnd; requests and responses themselves use ccn protocols.
Part of ccnd - the CCNx Daemon.
Copyright (C) 2009-2011 Palo Alto Research Center, Inc.
This work is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Definition in file ccnd_internal_client.c.
#define CCN_PATH_VAR_TMP "/var/tmp" |
Definition at line 395 of file ccnd_internal_client.c.
Referenced by ccnd_init_internal_keystore().
#define CCND_ID_TEMPL "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" |
Definition at line 319 of file ccnd_internal_client.c.
Referenced by ccnd_internal_client_start(), and ccnd_uri_listen().
#define CCND_KEYSTORE_PASS "\010\043\103\375\327\237\152\351\155" |
Definition at line 404 of file ccnd_internal_client.c.
Referenced by ccnd_init_internal_keystore().
#define CCND_NOTICE_NAME "notice.txt" |
Definition at line 46 of file ccnd_internal_client.c.
Referenced by ccnd_internal_client_start(), and ccnd_start_notice().
#define CCND_PING 1 |
Definition at line 54 of file ccnd_internal_client.c.
#define GOT_HERE |
Definition at line 44 of file ccnd_internal_client.c.
#define MORECOMPS_MASK 0x007F |
Local interpretation of selfp->intdata.
Definition at line 110 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req().
#define MUST_VERIFY 0x0080 |
Definition at line 111 of file ccnd_internal_client.c.
#define MUST_VERIFY1 (MUST_VERIFY + 1) |
Definition at line 112 of file ccnd_internal_client.c.
Referenced by ccnd_internal_client_start().
#define OP_DESTROYFACE 0x0300 |
Definition at line 116 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req(), and ccnd_internal_client_start().
#define OP_NEWFACE 0x0200 |
Definition at line 115 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req(), and ccnd_internal_client_start().
#define OP_NOTICE 0x0700 |
Definition at line 120 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req(), and ccnd_internal_client_start().
#define OP_PING 0x0000 |
Definition at line 114 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req(), and ccnd_internal_client_start().
#define OP_PREFIXREG 0x0400 |
Definition at line 117 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req(), and ccnd_internal_client_start().
#define OP_SELFREG 0x0500 |
Definition at line 118 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req(), and ccnd_internal_client_start().
#define OP_SERVICE 0x0800 |
Definition at line 121 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req(), and ccnd_internal_client_start().
#define OP_UNREG 0x0600 |
Definition at line 119 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req(), ccnd_internal_client_start(), and process_prefix_face_list_item().
#define OPER_MASK 0xFF00 |
Definition at line 113 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req().
static enum ccn_upcall_res ccnd_answer_req | ( | struct ccn_closure * | selfp, | |
enum ccn_upcall_kind | kind, | |||
struct ccn_upcall_info * | info | |||
) | [static] |
Common interest handler for ccnd_internal_client.
Definition at line 126 of file ccnd_internal_client.c.
Referenced by ccnd_internal_client_start().
void ccnd_face_status_change | ( | struct ccnd_handle * | ccnd, | |
unsigned | faceid | |||
) |
Called by ccnd when a face 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 face is OK, though.
Definition at line 547 of file ccnd_internal_client.c.
Referenced by ccnd_start_notice(), do_deferred_write(), finalize_face(), and register_new_face().
int ccnd_init_internal_keystore | ( | struct ccnd_handle * | ccnd | ) |
Definition at line 408 of file ccnd_internal_client.c.
Referenced by ccnd_create(), and ccnd_internal_client_start().
static struct ccn_charbuf* ccnd_init_service_ccnb | ( | struct ccnd_handle * | ccnd, | |
const char * | baseuri, | |||
int | freshness | |||
) | [static, read] |
Definition at line 60 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req().
static int ccnd_internal_client_refresh | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
Definition at line 300 of file ccnd_internal_client.c.
Referenced by ccnd_internal_client_start().
int ccnd_internal_client_start | ( | struct ccnd_handle * | ccnd | ) |
Definition at line 593 of file ccnd_internal_client.c.
Referenced by ccnd_create().
void ccnd_internal_client_stop | ( | struct ccnd_handle * | ccnd | ) |
Definition at line 642 of file ccnd_internal_client.c.
Referenced by ccnd_destroy().
static int ccnd_notice_push | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
Definition at line 507 of file ccnd_internal_client.c.
Referenced by ccnd_face_status_change().
static void ccnd_reg_ccnx_ccndid | ( | struct ccnd_handle * | ccnd | ) | [static] |
Make a forwarding table entry for ccnx:/ccnx/CCNDID.
This one entry handles most of the namespace served by the ccnd internal client.
Definition at line 373 of file ccnd_internal_client.c.
Referenced by ccnd_internal_client_start().
static void ccnd_start_notice | ( | struct ccnd_handle * | ccnd | ) | [static] |
Definition at line 560 of file ccnd_internal_client.c.
Referenced by ccnd_answer_req().
static void ccnd_uri_listen | ( | struct ccnd_handle * | ccnd, | |
const char * | uri, | |||
ccn_handler | p, | |||
intptr_t | intdata | |||
) | [static] |
Definition at line 322 of file ccnd_internal_client.c.
Referenced by ccnd_internal_client_start().
static int post_face_notice | ( | struct ccnd_handle * | ccnd, | |
unsigned | faceid | |||
) | [static] |
Definition at line 478 of file ccnd_internal_client.c.
Referenced by ccnd_notice_push().