ccnr_util.c File Reference

Part of ccnr - CCNx Repository Daemon. More...

Go to the source code of this file.

Functions

PUBLIC struct ccn_charbufr_util_charbuf_obtain (struct ccnr_handle *h)
PUBLIC void r_util_charbuf_release (struct ccnr_handle *h, struct ccn_charbuf *c)
PUBLIC struct ccn_indexbufr_util_indexbuf_obtain (struct ccnr_handle *h)
PUBLIC void r_util_indexbuf_release (struct ccnr_handle *h, struct ccn_indexbuf *c)
PUBLIC void r_util_reseed (struct ccnr_handle *h)
PUBLIC void r_util_gettime (const struct ccn_gettime *self, struct ccn_timeval *result)
PUBLIC int r_util_timecmp (long secA, unsigned usecA, long secB, unsigned usecB)
PUBLIC intmax_t r_util_segment_from_component (const unsigned char *ccnb, size_t start, size_t stop)
int r_util_name_comp_compare (const unsigned char *data, const struct ccn_indexbuf *indexbuf, unsigned int i, const void *buf, size_t length)
 Compare a name component at index i to bytes in buf and return 0 if they are equal length and equal value.
PUBLIC int r_util_is_final_pco (const unsigned char *ccnb, struct ccn_parsed_ContentObject *pco, struct ccn_indexbuf *comps)
 Given a ccnb encoded content object, the parsed form, and name components report whether this is the last (FinalBlockID) segment of a stream.


Detailed Description

Part of ccnr - CCNx Repository Daemon.

Definition in file ccnr_util.c.


Function Documentation

PUBLIC struct ccn_charbuf* r_util_charbuf_obtain ( struct ccnr_handle h  )  [read]

Definition at line 60 of file ccnr_util.c.

Referenced by r_link_stuff_and_send(), and r_sync_notify_content().

PUBLIC void r_util_charbuf_release ( struct ccnr_handle h,
struct ccn_charbuf c 
)

Definition at line 71 of file ccnr_util.c.

Referenced by r_link_stuff_and_send(), and r_sync_notify_content().

PUBLIC void r_util_gettime ( const struct ccn_gettime self,
struct ccn_timeval result 
)

Definition at line 125 of file ccnr_util.c.

Referenced by r_init_create().

PUBLIC struct ccn_indexbuf* r_util_indexbuf_obtain ( struct ccnr_handle h  )  [read]

Definition at line 81 of file ccnr_util.c.

Referenced by r_sync_lookup().

PUBLIC void r_util_indexbuf_release ( struct ccnr_handle h,
struct ccn_indexbuf c 
)

Definition at line 92 of file ccnr_util.c.

Referenced by r_sync_lookup().

PUBLIC int r_util_is_final_pco ( const unsigned char *  ccnb,
struct ccn_parsed_ContentObject pco,
struct ccn_indexbuf comps 
)

Given a ccnb encoded content object, the parsed form, and name components report whether this is the last (FinalBlockID) segment of a stream.

This is very similar to ccn_is_final_block()

Definition at line 194 of file ccnr_util.c.

Referenced by load_policy(), and r_proto_policy_update().

int r_util_name_comp_compare ( const unsigned char *  data,
const struct ccn_indexbuf indexbuf,
unsigned int  i,
const void *  buf,
size_t  length 
)

Compare a name component at index i to bytes in buf and return 0 if they are equal length and equal value.

In the case of inequality, a negative or positive value is returned, according to the canonical ordering of names.

Definition at line 173 of file ccnr_util.c.

Referenced by r_proto_answer_req().

PUBLIC void r_util_reseed ( struct ccnr_handle h  ) 

Definition at line 102 of file ccnr_util.c.

Referenced by r_init_create().

PUBLIC intmax_t r_util_segment_from_component ( const unsigned char *  ccnb,
size_t  start,
size_t  stop 
)

Definition at line 146 of file ccnr_util.c.

Referenced by r_proto_continue_enumeration(), and r_proto_expect_content().

PUBLIC int r_util_timecmp ( long  secA,
unsigned  usecA,
long  secB,
unsigned  usecB 
)

Definition at line 137 of file ccnr_util.c.

Referenced by reap_enumerations().


Generated on Thu Feb 16 00:44:08 2012 for Content-Centric Networking in C by  doxygen 1.5.6