ccnsnew.c File Reference

A CCNx program to collect content objects as they arrive. More...

Go to the source code of this file.

Defines

#define USAGE   "[-p port] [ -0123s ] ccnx:/uri ...\n collect arriving content"

Functions

static enum ccn_upcall_res incoming_interest (struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info)
 Interest handler.
static enum ccn_upcall_res incoming_content (struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info)
 Content handler.
static void usage (void)
 Usage.
int main (int argc, char **argv)
static int me_too (struct ccn *h, struct ccn_parsed_interest *pi, const unsigned char *imsg, int scope)
 Me too - express the interest that we just saw, with small modifications.

Variables

static const char * progname
static int setscope = 0

Detailed Description

A CCNx program to collect content objects as they arrive.

Definition in file ccnsnew.c.


Define Documentation

#define USAGE   "[-p port] [ -0123s ] ccnx:/uri ...\n collect arriving content"

Definition at line 29 of file ccnsnew.c.


Function Documentation

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

Content handler.

Definition at line 116 of file ccnsnew.c.

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

Interest handler.

Definition at line 205 of file ccnsnew.c.

int main ( int  argc,
char **  argv 
)

Definition at line 42 of file ccnsnew.c.

static int me_too ( struct ccn *  h,
struct ccn_parsed_interest pi,
const unsigned char *  imsg,
int  scope 
) [static]

Me too - express the interest that we just saw, with small modifications.

The idea is to be able to get a copy of whatever content comes along to satisfy the interest.

Before sending the interest back out, we need to strip the Nonce, because otherwise it will just be discarded as a duplicate.

The scope may also be modified; normally it is set to 0 to minimize the impact on traffic.

Definition at line 161 of file ccnsnew.c.

Referenced by incoming_interest().

static void usage ( void   )  [static]

Usage.

Definition at line 225 of file ccnsnew.c.


Variable Documentation

const char* progname [static]

Definition at line 38 of file ccnsnew.c.

Referenced by main(), and usage().

int setscope = 0 [static]

Definition at line 39 of file ccnsnew.c.

Referenced by incoming_interest(), and main().

Generated on Tue Aug 21 14:54:34 2012 for Content-Centric Networking in C by  doxygen 1.6.3