Bring up a link to another ccnd. More...
Go to the source code of this file.
Defines | |
#define | BIND_8_COMPAT |
#define | NS_MAXMSG 65535 |
#define | T_SRV 33 |
#define | OP_REG 0 |
#define | OP_UNREG 1 |
#define | ON_ERROR_EXIT(resval, msg) on_error_exit((resval), __LINE__, msg) |
#define | ON_ERROR_CLEANUP(resval) |
#define | ON_NULL_CLEANUP(resval) |
Functions | |
static void | usage (const char *progname) |
void | ccndc_warn (int lineno, const char *format,...) |
void | ccndc_fatal (int line, const char *format,...) |
static void | on_error_exit (int res, int lineno, const char *msg) |
static void | initialize_global_data (void) |
static int | get_ccndid (struct ccn *h, const unsigned char *ccndid, size_t ccndid_storage_size) |
static struct prefix_face_list_item * | prefix_face_list_item_create (struct ccn_charbuf *prefix, int ipproto, int mcast_ttl, char *host, char *port, char *mcastif, int lifetime, int flags) |
static void | prefix_face_list_destroy (struct prefix_face_list_item **pflpp) |
static struct ccn_face_instance * | create_face (struct ccn *h, struct ccn_face_instance *face_instance) |
Create a face based on the face attributes. | |
static int | register_unregister_prefix (struct ccn *h, int operation, struct ccn_charbuf *name_prefix, struct ccn_face_instance *face_instance, int flags) |
Register an interest prefix as being routed to a given face. | |
static int | process_command_tokens (struct prefix_face_list_item *pfltail, int lineno, char *cmd, char *uri, char *proto, char *host, char *port, char *flags, char *mcastttl, char *mcastif) |
static int | read_configfile (const char *filename, struct prefix_face_list_item *pfltail) |
int | query_srv (const unsigned char *domain, int domain_size, char **hostp, int *portp, char **proto) |
void | process_prefix_face_list_item (struct ccn *h, struct prefix_face_list_item *pfl) |
enum ccn_upcall_res | incoming_interest (struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info) |
int | main (int argc, char **argv) |
Variables | |
static struct ccn_charbuf * | local_scope_template = NULL |
static struct ccn_charbuf * | no_name = NULL |
static unsigned char | ccndid_storage [32] = {0} |
static const unsigned char * | ccndid = ccndid_storage |
static size_t | ccndid_size = 0 |
int | verbose = 0 |
Bring up a link to another ccnd.
A CCNx program.
Copyright (C) 2009-2010 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 ccndc.c.
#define NS_MAXMSG 65535 |
Definition at line 55 of file ccndc.c.
Referenced by query_srv().
#define ON_ERROR_CLEANUP | ( | resval | ) |
{ \ if ((resval) < 0) { \ if (verbose > 0) ccndc_warn (__LINE__, "OnError cleanup\n"); \ goto Cleanup; \ } \ }
Definition at line 144 of file ccndc.c.
Referenced by create_face(), and register_unregister_prefix().
#define ON_ERROR_EXIT | ( | resval, | |||
msg | ) | on_error_exit((resval), __LINE__, msg) |
Definition at line 134 of file ccndc.c.
Referenced by get_ccndid(), and initialize_global_data().
#define ON_NULL_CLEANUP | ( | resval | ) |
{ \ if ((resval) == NULL) { \ if (verbose > 0) ccndc_warn(__LINE__, "OnNull cleanup\n"); \ goto Cleanup; \ } \ }
Definition at line 152 of file ccndc.c.
Referenced by create_face(), and register_unregister_prefix().
#define OP_REG 0 |
Definition at line 68 of file ccndc.c.
Referenced by process_prefix_face_list_item(), and register_unregister_prefix().
#define T_SRV 33 |
Definition at line 65 of file ccndc.c.
Referenced by query_srv().
void ccndc_fatal | ( | int | line, | |
const char * | format, | |||
... | ||||
) |
Definition at line 122 of file ccndc.c.
Referenced by on_error_exit(), process_command_tokens(), and read_configfile().
void ccndc_warn | ( | int | lineno, | |
const char * | format, | |||
... | ||||
) |
Definition at line 110 of file ccndc.c.
Referenced by process_command_tokens(), and process_prefix_face_list_item().
static struct ccn_face_instance* create_face | ( | struct ccn * | h, | |
struct ccn_face_instance * | face_instance | |||
) | [static, read] |
Create a face based on the face attributes.
h | the ccnd handle | |
face_instance | the parameters of the face to be created | |
flags |
Definition at line 303 of file ccndc.c.
Referenced by process_prefix_face_list_item().
static int get_ccndid | ( | struct ccn * | h, | |
const unsigned char * | ccndid, | |||
size_t | ccndid_storage_size | |||
) | [static] |
enum ccn_upcall_res incoming_interest | ( | struct ccn_closure * | selfp, | |
enum ccn_upcall_kind | kind, | |||
struct ccn_upcall_info * | info | |||
) |
static void initialize_global_data | ( | void | ) | [static] |
static void on_error_exit | ( | int | res, | |
int | lineno, | |||
const char * | msg | |||
) | [static] |
static void prefix_face_list_destroy | ( | struct prefix_face_list_item ** | pflpp | ) | [static] |
Definition at line 279 of file ccndc.c.
Referenced by incoming_interest(), and main().
static struct prefix_face_list_item* prefix_face_list_item_create | ( | struct ccn_charbuf * | prefix, | |
int | ipproto, | |||
int | mcast_ttl, | |||
char * | host, | |||
char * | port, | |||
char * | mcastif, | |||
int | lifetime, | |||
int | flags | |||
) | [static, read] |
Definition at line 228 of file ccndc.c.
Referenced by process_command_tokens().
static int process_command_tokens | ( | struct prefix_face_list_item * | pfltail, | |
int | lineno, | |||
char * | cmd, | |||
char * | uri, | |||
char * | proto, | |||
char * | host, | |||
char * | port, | |||
char * | flags, | |||
char * | mcastttl, | |||
char * | mcastif | |||
) | [static] |
Definition at line 441 of file ccndc.c.
Referenced by incoming_interest(), main(), and read_configfile().
void process_prefix_face_list_item | ( | struct ccn * | h, | |
struct prefix_face_list_item * | pfl | |||
) |
Definition at line 721 of file ccndc.c.
Referenced by incoming_interest(), and main().
int query_srv | ( | const unsigned char * | domain, | |
int | domain_size, | |||
char ** | hostp, | |||
int * | portp, | |||
char ** | proto | |||
) |
Definition at line 623 of file ccndc.c.
Referenced by incoming_interest().
static int read_configfile | ( | const char * | filename, | |
struct prefix_face_list_item * | pfltail | |||
) | [static] |
static int register_unregister_prefix | ( | struct ccn * | h, | |
int | operation, | |||
struct ccn_charbuf * | name_prefix, | |||
struct ccn_face_instance * | face_instance, | |||
int | flags | |||
) | [static] |
Register an interest prefix as being routed to a given face.
h | the ccnd handle | |
name_prefix | the prefix to be registered | |
face_instance | the face to which the interests with the prefix should be routed | |
flags |
Definition at line 367 of file ccndc.c.
Referenced by process_prefix_face_list_item().
static void usage | ( | const char * | progname | ) | [static] |
Definition at line 97 of file ccndc.c.
Referenced by main(), and process_options().
const unsigned char* ccndid = ccndid_storage [static] |
Definition at line 87 of file ccndc.c.
Referenced by handle_ccndid_response(), main(), and process_prefix_face_list_item().
size_t ccndid_size = 0 [static] |
Definition at line 88 of file ccndc.c.
Referenced by main(), and process_prefix_face_list_item().
unsigned char ccndid_storage[32] = {0} [static] |
struct ccn_charbuf* local_scope_template = NULL [static] |
struct ccn_charbuf* no_name = NULL [static] |