ccnr_store.h File Reference

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

Go to the source code of this file.

Functions

void r_store_init (struct ccnr_handle *h)
int r_store_final (struct ccnr_handle *h, int stable)
void r_store_set_content_timer (struct ccnr_handle *h, struct content_entry *content, struct ccn_parsed_ContentObject *pco)
 Schedules content expiration based on its FreshnessSeconds.
void r_store_mark_stale (struct ccnr_handle *h, struct content_entry *content)
 Mark content as stale.
struct content_entryr_store_next_child_at_level (struct ccnr_handle *h, struct content_entry *content, int level)
struct content_entryr_store_content_next (struct ccnr_handle *h, struct content_entry *content)
int r_store_content_matches_interest_prefix (struct ccnr_handle *h, struct content_entry *content, const unsigned char *interest_msg, size_t interest_size)
struct content_entryr_store_find_first_match_candidate (struct ccnr_handle *h, const unsigned char *interest_msg, const struct ccn_parsed_interest *pi)
ccnr_cookie r_store_enroll_content (struct ccnr_handle *h, struct content_entry *content)
 This makes a cookie for content, and, if it has an accession number already, enters it into the content_by_accession_tab.
struct content_entryr_store_content_from_accession (struct ccnr_handle *h, ccnr_accession accession)
struct content_entryr_store_content_from_cookie (struct ccnr_handle *h, ccnr_cookie cookie)
struct content_entryr_store_lookup (struct ccnr_handle *h, const unsigned char *msg, const struct ccn_parsed_interest *pi, struct ccn_indexbuf *comps)
struct content_entryr_store_lookup_ccnb (struct ccnr_handle *h, const unsigned char *namish, size_t size)
 Find the first content handle that matches the prefix given by the namish, which may be a Name, Interest, ContentObject, .
int r_store_content_field_access (struct ccnr_handle *h, struct content_entry *content, enum ccn_dtag dtag, const unsigned char **bufp, size_t *sizep)
void r_store_send_content (struct ccnr_handle *h, struct fdholder *fdholder, struct content_entry *content)
int r_store_name_append_components (struct ccn_charbuf *dst, struct ccnr_handle *h, struct content_entry *content, int skip, int count)
int r_store_content_flags (struct content_entry *content)
int r_store_content_change_flags (struct content_entry *content, int set, int clear)
int r_store_commit_content (struct ccnr_handle *h, struct content_entry *content)
void r_store_forget_content (struct ccnr_handle *h, struct content_entry **pentry)
 Remove internal representation of a content object.
void ccnr_debug_content (struct ccnr_handle *h, int lineno, const char *msg, struct fdholder *fdholder, struct content_entry *content)
int r_store_set_accession_from_offset (struct ccnr_handle *h, struct content_entry *content, struct fdholder *fdholder, off_t offset)
int r_store_content_trim (struct ccnr_handle *h, struct content_entry *content)
 If the content appears to be safely stored in the repository, removes any buffered copy.
void r_store_trim (struct ccnr_handle *h, unsigned long limit)
 Evict recoverable content from in-memory buffers.
ccnr_cookie r_store_content_cookie (struct ccnr_handle *h, struct content_entry *content)
ccnr_accession r_store_content_accession (struct ccnr_handle *h, struct content_entry *content)
const unsigned char * r_store_content_base (struct ccnr_handle *h, struct content_entry *content)
 Get the base address of the content object.
size_t r_store_content_size (struct ccnr_handle *h, struct content_entry *content)
void r_store_index_needs_cleaning (struct ccnr_handle *h)
struct ccn_charbufr_store_content_flatname (struct ccnr_handle *h, struct content_entry *content)
 Get the flatname associated with content.


Detailed Description

Part of ccnr - CCNx Repository Daemon.

Definition in file ccnr_store.h.


Function Documentation

void ccnr_debug_content ( struct ccnr_handle h,
int  lineno,
const char *  msg,
struct fdholder fdholder,
struct content_entry content 
)

int r_store_commit_content ( struct ccnr_handle h,
struct content_entry content 
)

ccnr_accession r_store_content_accession ( struct ccnr_handle h,
struct content_entry content 
)

Definition at line 108 of file ccnr_store.c.

Referenced by r_sync_enumerate(), r_sync_enumerate_action(), and r_sync_notify_content().

const unsigned char* r_store_content_base ( struct ccnr_handle h,
struct content_entry content 
)

Get the base address of the content object.

This may involve reading the object in. Caller should not assume that the address will stay valid after it relinquishes control, either by returning or by calling routines that might invalidate objects.

Definition at line 265 of file ccnr_store.c.

Referenced by load_policy(), r_match_consume_matching_interests(), r_proto_policy_update(), r_store_content_btree_insert(), r_store_content_field_access(), r_store_content_from_accession(), r_store_send_content(), r_store_set_content_timer(), r_store_set_flatname(), and r_sync_lookup().

int r_store_content_change_flags ( struct content_entry content,
int  set,
int  clear 
)

Definition at line 319 of file ccnr_store.c.

Referenced by r_store_commit_content().

ccnr_cookie r_store_content_cookie ( struct ccnr_handle h,
struct content_entry content 
)

int r_store_content_field_access ( struct ccnr_handle h,
struct content_entry content,
enum ccn_dtag  dtag,
const unsigned char **  bufp,
size_t *  sizep 
)

Definition at line 1226 of file ccnr_store.c.

int r_store_content_flags ( struct content_entry content  ) 

struct ccn_charbuf* r_store_content_flatname ( struct ccnr_handle h,
struct content_entry content 
) [read]

Get the flatname associated with content.

Returns:
flatname in a charbuf, which should be treated as read-only.

Definition at line 1174 of file ccnr_store.c.

Referenced by r_sync_enumerate_action().

struct content_entry* r_store_content_from_accession ( struct ccnr_handle h,
ccnr_accession  accession 
) [read]

Definition at line 578 of file ccnr_store.c.

Referenced by process_incoming_content(), r_store_lookup(), and r_sync_enumerate_action().

struct content_entry* r_store_content_from_cookie ( struct ccnr_handle h,
ccnr_cookie  cookie 
) [read]

int r_store_content_matches_interest_prefix ( struct ccnr_handle h,
struct content_entry content,
const unsigned char *  interest_msg,
size_t  interest_size 
)

struct content_entry* r_store_content_next ( struct ccnr_handle h,
struct content_entry content 
) [read]

Definition at line 904 of file ccnr_store.c.

Referenced by r_store_lookup(), and r_sync_enumerate_action().

size_t r_store_content_size ( struct ccnr_handle h,
struct content_entry content 
)

int r_store_content_trim ( struct ccnr_handle h,
struct content_entry content 
)

If the content appears to be safely stored in the repository, removes any buffered copy.

Returns:
0 if buffer was removed, -1 if not.

Definition at line 216 of file ccnr_store.c.

Referenced by r_store_trim().

ccnr_cookie r_store_enroll_content ( struct ccnr_handle h,
struct content_entry content 
)

This makes a cookie for content, and, if it has an accession number already, enters it into the content_by_accession_tab.

Does not index by name.

Definition at line 636 of file ccnr_store.c.

Referenced by process_incoming_content(), r_store_content_from_accession(), and r_store_look().

int r_store_final ( struct ccnr_handle h,
int  stable 
)

Definition at line 566 of file ccnr_store.c.

Referenced by r_init_destroy().

struct content_entry* r_store_find_first_match_candidate ( struct ccnr_handle h,
const unsigned char *  interest_msg,
const struct ccn_parsed_interest pi 
) [read]

Definition at line 825 of file ccnr_store.c.

Referenced by r_proto_begin_enumeration(), r_store_lookup(), and r_sync_enumerate().

void r_store_forget_content ( struct ccnr_handle h,
struct content_entry **  pentry 
)

Remove internal representation of a content object.

Definition at line 730 of file ccnr_store.c.

Referenced by process_incoming_content(), r_store_content_from_accession(), and r_store_enroll_content().

void r_store_index_needs_cleaning ( struct ccnr_handle h  ) 

Definition at line 1450 of file ccnr_store.c.

Referenced by r_store_content_btree_insert(), r_store_init(), and r_store_trim().

void r_store_init ( struct ccnr_handle h  ) 

Definition at line 448 of file ccnr_store.c.

Referenced by r_init_create().

struct content_entry* r_store_lookup ( struct ccnr_handle h,
const unsigned char *  msg,
const struct ccn_parsed_interest pi,
struct ccn_indexbuf comps 
) [read]

Definition at line 956 of file ccnr_store.c.

Referenced by r_proto_answer_req(), r_proto_start_write_checked(), and r_sync_lookup().

struct content_entry* r_store_lookup_ccnb ( struct ccnr_handle h,
const unsigned char *  namish,
size_t  size 
) [read]

Find the first content handle that matches the prefix given by the namish, which may be a Name, Interest, ContentObject, .

..

Does not check the other parts of namish, in particular, does not generate the digest component of a ContentObject.

Definition at line 1030 of file ccnr_store.c.

Referenced by load_policy(), and r_proto_policy_update().

void r_store_mark_stale ( struct ccnr_handle h,
struct content_entry content 
)

Mark content as stale.

Definition at line 1061 of file ccnr_store.c.

Referenced by expire_content().

int r_store_name_append_components ( struct ccn_charbuf dst,
struct ccnr_handle h,
struct content_entry content,
int  skip,
int  count 
)

struct content_entry* r_store_next_child_at_level ( struct ccnr_handle h,
struct content_entry content,
int  level 
) [read]

Definition at line 915 of file ccnr_store.c.

Referenced by r_proto_continue_enumeration(), and r_store_lookup().

void r_store_send_content ( struct ccnr_handle h,
struct fdholder fdholder,
struct content_entry content 
)

Definition at line 1297 of file ccnr_store.c.

Referenced by r_link_send_content(), and r_store_commit_content().

int r_store_set_accession_from_offset ( struct ccnr_handle h,
struct content_entry content,
struct fdholder fdholder,
off_t  offset 
)

Definition at line 1252 of file ccnr_store.c.

Referenced by process_input_message(), and r_store_send_content().

void r_store_set_content_timer ( struct ccnr_handle h,
struct content_entry content,
struct ccn_parsed_ContentObject pco 
)

Schedules content expiration based on its FreshnessSeconds.

Definition at line 1102 of file ccnr_store.c.

Referenced by process_incoming_content().

void r_store_trim ( struct ccnr_handle h,
unsigned long  limit 
)

Evict recoverable content from in-memory buffers.

Definition at line 230 of file ccnr_store.c.

Referenced by r_dispatch_run(), and r_init_create().


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