ccn_traverse.c File Reference

Support for traversing a branch of the ccn name hierarchy. More...

Go to the source code of this file.

Defines

#define EXCLUDE_LOW   1
#define EXCLUDE_HIGH   2
#define MUST_VERIFY   4
#define LOCAL_SCOPE   8
#define ALLOW_STALE   0x10

Functions

static int namecompare (const void *a, const void *b)
 Comparison operator for sorting the excl list with qsort.
static struct ccn_traversal * get_my_data (struct ccn_closure *selfp)
static void append_Any_filter (struct ccn_charbuf *c)
 Append an Any filter, useful for excluding everything between two 'fenceposts' in an Exclude construct.
static int express_my_interest (struct ccn *h, struct ccn_closure *selfp, struct ccn_charbuf *name)
static struct ccn_closuresplit_my_excludes (struct ccn_closure *selfp)
static enum ccn_upcall_res incoming_content (struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *)
static struct ccn_charbufccn_charbuf_duplicate (struct ccn_charbuf *)
static void answer_passive (struct ccn_charbuf *templ, int allow_stale)
static void local_scope (struct ccn_charbuf *templ)
void ccn_dump_names (struct ccn *h, struct ccn_charbuf *name_prefix, int local_scope, int allow_stale)
 Temporary driver - exits when done!

Detailed Description

Support for traversing a branch of the ccn name hierarchy.

Part of the CCNx C Library.

Copyright (C) 2009 Palo Alto Research Center, Inc.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Definition in file ccn_traverse.c.


Define Documentation

#define ALLOW_STALE   0x10

Definition at line 51 of file ccn_traverse.c.

Referenced by ccn_dump_names(), and express_my_interest().

#define EXCLUDE_HIGH   2

Definition at line 48 of file ccn_traverse.c.

Referenced by express_my_interest(), incoming_content(), and split_my_excludes().

#define EXCLUDE_LOW   1

Definition at line 47 of file ccn_traverse.c.

Referenced by express_my_interest(), incoming_content(), and split_my_excludes().

#define LOCAL_SCOPE   8

Definition at line 50 of file ccn_traverse.c.

Referenced by ccn_dump_names(), and express_my_interest().

#define MUST_VERIFY   4

Definition at line 49 of file ccn_traverse.c.

Referenced by ccnd_answer_req(), incoming_content(), and main().


Function Documentation

static void answer_passive ( struct ccn_charbuf templ,
int  allow_stale 
) [static]

Definition at line 347 of file ccn_traverse.c.

Referenced by express_my_interest().

static void append_Any_filter ( struct ccn_charbuf c  )  [static]

Append an Any filter, useful for excluding everything between two 'fenceposts' in an Exclude construct.

Definition at line 328 of file ccn_traverse.c.

Referenced by express_my_interest().

static struct ccn_charbuf * ccn_charbuf_duplicate ( struct ccn_charbuf c  )  [static, read]

Definition at line 335 of file ccn_traverse.c.

Referenced by split_my_excludes().

void ccn_dump_names ( struct ccn *  h,
struct ccn_charbuf name_prefix,
int  local_scope,
int  allow_stale 
)

Temporary driver - exits when done!

This is a temporary interface, don't even bother to put it in a header file.

Definition at line 373 of file ccn_traverse.c.

Referenced by main().

static int express_my_interest ( struct ccn *  h,
struct ccn_closure selfp,
struct ccn_charbuf name 
) [static]

Definition at line 239 of file ccn_traverse.c.

Referenced by ccn_dump_names(), and incoming_content().

static struct ccn_traversal * get_my_data ( struct ccn_closure selfp  )  [static, read]

Definition at line 85 of file ccn_traverse.c.

Referenced by express_my_interest(), incoming_content(), and split_my_excludes().

static enum ccn_upcall_res incoming_content ( struct ccn_closure selfp,
enum ccn_upcall_kind  kind,
struct ccn_upcall_info info 
) [static]

Definition at line 125 of file ccn_traverse.c.

Referenced by ccn_dump_names(), incoming_content(), main(), and split_my_excludes().

static void local_scope ( struct ccn_charbuf templ  )  [static]

Definition at line 360 of file ccn_traverse.c.

Referenced by express_my_interest().

static int namecompare ( const void *  a,
const void *  b 
) [static]

Comparison operator for sorting the excl list with qsort.

For convenience, the items in the excl array are charbufs containing ccnb-encoded Names of one component each. (This is not the most efficient representation.)

Definition at line 75 of file ccn_traverse.c.

Referenced by incoming_content().

static struct ccn_closure * split_my_excludes ( struct ccn_closure selfp  )  [static, read]

Definition at line 288 of file ccn_traverse.c.

Referenced by incoming_content().

Generated on Fri May 13 16:27:22 2011 for Content-Centric Networking in C by  doxygen 1.6.3