Go to the source code of this file.
Defines | |
#define | GOT_HERE ccnd_msg(h, "at ccnd.c:%d", __LINE__); |
Main program of ccnd - the CCNx Daemon. | |
#define | CCN_SKIPLIST_MAX_DEPTH 30 |
Typedefs | |
typedef void(* | loggerproc )(void *, const char *,...) |
Functions | |
static void | cleanup_at_exit (void) |
static void | unlink_at_exit (const char *path) |
static int | create_local_listener (struct ccnd_handle *h, const char *sockname, int backlog) |
static struct face * | record_connection (struct ccnd_handle *h, int fd, struct sockaddr *who, socklen_t wholen, int setflags) |
Make a new face entered in the faces_by_fd table. | |
static void | process_input_message (struct ccnd_handle *h, struct face *face, unsigned char *msg, size_t size, int pdu_ok) |
static void | process_input (struct ccnd_handle *h, int fd) |
Process the input from a socket. | |
static int | ccn_stuff_interest (struct ccnd_handle *h, struct face *face, struct ccn_charbuf *c) |
Stuff a PDU with interest messages that will fit. | |
static void | do_deferred_write (struct ccnd_handle *h, int fd) |
static void | clean_needed (struct ccnd_handle *h) |
static struct face * | get_dgram_source (struct ccnd_handle *h, struct face *face, struct sockaddr *addr, socklen_t addrlen, int why) |
static void | content_skiplist_insert (struct ccnd_handle *h, struct content_entry *content) |
static void | content_skiplist_remove (struct ccnd_handle *h, struct content_entry *content) |
static void | mark_stale (struct ccnd_handle *h, struct content_entry *content) |
Mark content as stale. | |
static ccn_accession_t | content_skiplist_next (struct ccnd_handle *h, struct content_entry *content) |
static void | reap_needed (struct ccnd_handle *h, int init_delay_usec) |
static void | check_comm_file (struct ccnd_handle *h) |
static struct nameprefix_entry * | nameprefix_for_pe (struct ccnd_handle *h, struct propagating_entry *pe) |
static int | nameprefix_seek (struct ccnd_handle *h, struct hashtb_enumerator *e, const unsigned char *msg, struct ccn_indexbuf *comps, int ncomps) |
Creates a nameprefix entry if it does not already exist, together with all of its parents. | |
static void | register_new_face (struct ccnd_handle *h, struct face *face) |
Called when a face is first created, and (perhaps) a second time in the case that a face transitions from the undecided state. | |
static void | update_forward_to (struct ccnd_handle *h, struct nameprefix_entry *npe) |
Recompute the contents of npe->forward_to and npe->flags from forwarding lists of npe and all of its ancestors. | |
static void | stuff_and_send (struct ccnd_handle *h, struct face *face, const unsigned char *data1, size_t size1, const unsigned char *data2, size_t size2) |
Send a message in a PDU, possibly stuffing other interest messages into it. | |
static void | ccn_link_state_init (struct ccnd_handle *h, struct face *face) |
static void | ccn_append_link_stuff (struct ccnd_handle *h, struct face *face, struct ccn_charbuf *c) |
static int | process_incoming_link_message (struct ccnd_handle *h, struct face *face, enum ccn_dtag dtag, unsigned char *msg, size_t size) |
static void | handle_fatal_signal (int sig) |
static int | comm_file_ok (void) |
static struct ccn_charbuf * | charbuf_obtain (struct ccnd_handle *h) |
static void | charbuf_release (struct ccnd_handle *h, struct ccn_charbuf *c) |
static struct ccn_indexbuf * | indexbuf_obtain (struct ccnd_handle *h) |
static void | indexbuf_release (struct ccnd_handle *h, struct ccn_indexbuf *c) |
static struct face * | face_from_faceid (struct ccnd_handle *h, unsigned faceid) |
Looks up a face based on its faceid (private). | |
struct face * | ccnd_face_from_faceid (struct ccnd_handle *h, unsigned faceid) |
Looks up a face based on its faceid. | |
static int | enroll_face (struct ccnd_handle *h, struct face *face) |
Assigns the faceid for a nacent face, calls register_new_face() if successful. | |
static int | choose_face_delay (struct ccnd_handle *h, struct face *face, enum cq_delay_class c) |
static struct content_queue * | content_queue_create (struct ccnd_handle *h, struct face *face, enum cq_delay_class c) |
static void | content_queue_destroy (struct ccnd_handle *h, struct content_queue **pq) |
static void | close_fd (int *pfd) |
Close an open file descriptor quietly. | |
static void | ccnd_close_fd (struct ccnd_handle *h, unsigned faceid, int *pfd) |
Close an open file descriptor, and grumble about it. | |
static void | finalize_face (struct hashtb_enumerator *e) |
static struct content_entry * | content_from_accession (struct ccnd_handle *h, ccn_accession_t accession) |
static void | cleanout_stragglers (struct ccnd_handle *h) |
static int | cleanout_empties (struct ccnd_handle *h) |
static void | enroll_content (struct ccnd_handle *h, struct content_entry *content) |
static void | finalize_content (struct hashtb_enumerator *content_enumerator) |
static int | content_skiplist_findbefore (struct ccnd_handle *h, const unsigned char *key, size_t keysize, struct content_entry *wanted_old, struct ccn_indexbuf **ans) |
static struct content_entry * | find_first_match_candidate (struct ccnd_handle *h, const unsigned char *interest_msg, const struct ccn_parsed_interest *pi) |
static int | content_matches_interest_prefix (struct ccnd_handle *h, struct content_entry *content, const unsigned char *interest_msg, struct ccn_indexbuf *comps, int prefix_comps) |
static void | consume (struct ccnd_handle *h, struct propagating_entry *pe) |
static void | finalize_nameprefix (struct hashtb_enumerator *e) |
static void | link_propagating_interest_to_nameprefix (struct ccnd_handle *h, struct propagating_entry *pe, struct nameprefix_entry *npe) |
static void | finalize_propagating (struct hashtb_enumerator *e) |
static int | establish_min_recv_bufsize (struct ccnd_handle *h, int fd, int minsize) |
static void | init_face_flags (struct ccnd_handle *h, struct face *face, int setflags) |
Initialize the face flags based upon the addr information and the provided explicit setflags. | |
static int | accept_connection (struct ccnd_handle *h, int listener_fd) |
Accept an incoming DGRAM_STREAM connection, creating a new face. | |
static struct face * | make_connection (struct ccnd_handle *h, struct sockaddr *who, socklen_t wholen, int setflags) |
Make an outbound stream connection. | |
static int | ccnd_getboundsocket (void *dat, struct sockaddr *who, socklen_t wholen) |
static unsigned | faceid_from_fd (struct ccnd_handle *h, int fd) |
static struct face * | setup_multicast (struct ccnd_handle *h, struct ccn_face_instance *face_instance, struct sockaddr *who, socklen_t wholen) |
static void | shutdown_client_fd (struct ccnd_handle *h, int fd) |
static void | send_content (struct ccnd_handle *h, struct face *face, struct content_entry *content) |
static enum cq_delay_class | choose_content_delay_class (struct ccnd_handle *h, unsigned faceid, int content_flags) |
static unsigned | randomize_content_delay (struct ccnd_handle *h, struct content_queue *q) |
static int | content_sender (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
static int | face_send_queue_insert (struct ccnd_handle *h, struct face *face, struct content_entry *content) |
static int | promote_outbound (struct propagating_entry *pe, unsigned faceid) |
If the pe interest is slated to be sent to the given faceid, promote the faceid to the front of the list, preserving the order of the others. | |
static int | consume_matching_interests (struct ccnd_handle *h, struct nameprefix_entry *npe, struct content_entry *content, struct ccn_parsed_ContentObject *pc, struct face *face) |
Consume matching interests given a nameprefix_entry and a piece of content. | |
static void | adjust_npe_predicted_response (struct ccnd_handle *h, struct nameprefix_entry *npe, int up) |
static void | adjust_predicted_response (struct ccnd_handle *h, struct propagating_entry *pe, int up) |
static void | note_content_from (struct ccnd_handle *h, struct nameprefix_entry *npe, unsigned from_faceid, int prefix_comps) |
Keep a little history about where matching content comes from. | |
static int | reorder_outbound_using_history (struct ccnd_handle *h, struct nameprefix_entry *npe, struct propagating_entry *pe) |
Use the history to reorder the interest forwarding. | |
static int | match_interests (struct ccnd_handle *h, struct content_entry *content, struct ccn_parsed_ContentObject *pc, struct face *face, struct face *from_face) |
Find and consume interests that match given content. | |
static int | stuff_link_check (struct ccnd_handle *h, struct face *face, struct ccn_charbuf *c) |
Append a link-check interest if appropriate. | |
static int | check_dgram_faces (struct ccnd_handle *h) |
Checks for inactivity on datagram faces. | |
int | ccnd_destroy_face (struct ccnd_handle *h, unsigned faceid) |
Destroys the face identified by faceid. | |
static void | check_forward_to (struct ccnd_handle *h, struct nameprefix_entry *npe) |
Remove expired faces from npe->forward_to. | |
static int | check_propagating (struct ccnd_handle *h) |
Check for expired propagating interests. | |
static int | check_nameprefix_entries (struct ccnd_handle *h) |
Ages src info and retires unused nameprefix entries. | |
static int | reap (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
Scheduled reap event for retiring expired structures. | |
static int | remove_content (struct ccnd_handle *h, struct content_entry *content) |
static int | clean_deamon (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
Periodic content cleaning. | |
static int | age_forwarding (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
Age out the old forwarding table entries. | |
static void | age_forwarding_needed (struct ccnd_handle *h) |
static struct ccn_forwarding * | seek_forwarding (struct ccnd_handle *h, struct nameprefix_entry *npe, unsigned faceid) |
static int | ccnd_reg_prefix (struct ccnd_handle *h, const unsigned char *msg, struct ccn_indexbuf *comps, int ncomps, unsigned faceid, int flags, int expires) |
Register or update a prefix in the forwarding table (FIB). | |
int | ccnd_reg_uri (struct ccnd_handle *h, const char *uri, unsigned faceid, int flags, int expires) |
Register a prefix, expressed in the form of a URI. | |
void | ccnd_reg_uri_list (struct ccnd_handle *h, struct ccn_charbuf *uris, unsigned faceid, int flags, int expires) |
Register prefixes, expressed in the form of a list of URIs. | |
static int | ccnd_nack (struct ccnd_handle *h, struct ccn_charbuf *reply_body, int errcode, const char *errtext) |
Replaces contents of reply_body with a ccnb-encoded StatusResponse. | |
static int | check_ccndid (struct ccnd_handle *h, const void *p, size_t sz, struct ccn_charbuf *reply_body) |
Check that indicated ccndid matches ours. | |
static int | check_face_instance_ccndid (struct ccnd_handle *h, struct ccn_face_instance *f, struct ccn_charbuf *reply_body) |
static int | check_forwarding_entry_ccndid (struct ccnd_handle *h, struct ccn_forwarding_entry *f, struct ccn_charbuf *reply_body) |
int | ccnd_req_newface (struct ccnd_handle *h, const unsigned char *msg, size_t size, struct ccn_charbuf *reply_body) |
Process a newface request for the ccnd internal client. | |
int | ccnd_req_destroyface (struct ccnd_handle *h, const unsigned char *msg, size_t size, struct ccn_charbuf *reply_body) |
Process a destroyface request for the ccnd internal client. | |
static int | ccnd_req_prefix_or_self_reg (struct ccnd_handle *h, const unsigned char *msg, size_t size, int selfreg, struct ccn_charbuf *reply_body) |
Worker bee for two very similar public functions. | |
int | ccnd_req_prefixreg (struct ccnd_handle *h, const unsigned char *msg, size_t size, struct ccn_charbuf *reply_body) |
Process a prefixreg request for the ccnd internal client. | |
int | ccnd_req_selfreg (struct ccnd_handle *h, const unsigned char *msg, size_t size, struct ccn_charbuf *reply_body) |
Process a selfreg request for the ccnd internal client. | |
int | ccnd_req_unreg (struct ccnd_handle *h, const unsigned char *msg, size_t size, struct ccn_charbuf *reply_body) |
Process an unreg request for the ccnd internal client. | |
static struct ccn_indexbuf * | get_outbound_faces (struct ccnd_handle *h, struct face *from, unsigned char *msg, struct ccn_parsed_interest *pi, struct nameprefix_entry *npe) |
This is where we consult the interest forwarding table. | |
static int | pe_next_usec (struct ccnd_handle *h, struct propagating_entry *pe, int next_delay, int lineno) |
static void | replan_propagation (struct ccnd_handle *, struct propagating_entry *) |
static int | do_propagate (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
static int | adjust_outbound_for_existing_interests (struct ccnd_handle *h, struct face *face, unsigned char *msg, struct ccn_parsed_interest *pi, struct nameprefix_entry *npe, struct ccn_indexbuf *outbound) |
Adjust the outbound face list for a new Interest, based upon existing similar interests. | |
static void | ccnd_append_debug_nonce (struct ccnd_handle *h, struct face *face, struct ccn_charbuf *cb) |
static void | ccnd_append_plain_nonce (struct ccnd_handle *h, struct face *face, struct ccn_charbuf *cb) |
static int | propagate_interest (struct ccnd_handle *h, struct face *face, unsigned char *msg, struct ccn_parsed_interest *pi, struct nameprefix_entry *npe) |
Schedules the propagation of an Interest message. | |
static int | is_duplicate_flooded (struct ccnd_handle *h, unsigned char *msg, struct ccn_parsed_interest *pi, unsigned faceid) |
Checks whether this Interest message has been seen before by using its Nonce, recording it in the process. | |
int | nameprefix_longest_match (struct ccnd_handle *h, const unsigned char *msg, struct ccn_indexbuf *comps, int ncomps) |
Finds the longest matching nameprefix, returns the component count or -1 for error. | |
static struct content_entry * | next_child_at_level (struct ccnd_handle *h, struct content_entry *content, int level) |
static void | process_incoming_interest (struct ccnd_handle *h, struct face *face, unsigned char *msg, size_t size) |
static int | expire_content (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
Scheduled event that makes content stale when its FreshnessSeconds has exported. | |
static void | set_content_timer (struct ccnd_handle *h, struct content_entry *content, struct ccn_parsed_ContentObject *pco) |
Schedules content expiration based on its FreshnessSeconds. | |
static void | process_incoming_content (struct ccnd_handle *h, struct face *face, unsigned char *wire_msg, size_t wire_size) |
static void | ccnd_new_face_msg (struct ccnd_handle *h, struct face *face) |
static struct sockaddr * | scrub_sockaddr (struct sockaddr *addr, socklen_t addrlen, struct sockaddr_in6 *space) |
Since struct sockaddr_in6 may contain fields that should not participate in comparison / hash, ensure the undesired fields are zero. | |
static void | process_input_buffer (struct ccnd_handle *h, struct face *face) |
Break up data in a face's input buffer buffer into individual messages, and call process_input_message on each one. | |
static void | process_internal_client_buffer (struct ccnd_handle *h) |
static int | handle_send_error (struct ccnd_handle *h, int errnum, struct face *face, const void *data, size_t size) |
Handle errors after send() or sendto(). | |
static int | sending_fd (struct ccnd_handle *h, struct face *face) |
void | ccnd_send (struct ccnd_handle *h, struct face *face, const void *data, size_t size) |
Send data to the face. | |
static void | prepare_poll_fds (struct ccnd_handle *h) |
Set up the array of fd descriptors for the poll(2) call. | |
void | ccnd_run (struct ccnd_handle *h) |
Run the main loop of the ccnd. | |
static void | ccnd_reseed (struct ccnd_handle *h) |
static char * | ccnd_get_local_sockname (void) |
static void | ccnd_gettime (const struct ccn_gettime *self, struct ccn_timeval *result) |
void | ccnd_setsockopt_v6only (struct ccnd_handle *h, int fd) |
static const char * | af_name (int family) |
static int | ccnd_listen_on_wildcards (struct ccnd_handle *h) |
static int | ccnd_listen_on_address (struct ccnd_handle *h, const char *addr) |
static int | ccnd_listen_on (struct ccnd_handle *h, const char *addrs) |
static struct ccn_charbuf * | ccnd_parse_uri_list (struct ccnd_handle *h, const char *what, const char *uris) |
struct ccnd_handle * | ccnd_create (const char *progname, ccnd_logger logger, void *loggerdata) |
Start a new ccnd instance. | |
static void | ccnd_shutdown_listeners (struct ccnd_handle *h) |
Shutdown listeners and bound datagram sockets, leaving connected streams. | |
void | ccnd_destroy (struct ccnd_handle **pccnd) |
Destroy the ccnd instance, releasing all associated resources. | |
Variables | |
static const char * | unlink_this_at_exit = NULL |
#define CCN_SKIPLIST_MAX_DEPTH 30 |
Definition at line 581 of file ccnd.c.
Referenced by content_skiplist_insert(), content_skiplist_remove(), find_first_match_candidate(), and next_child_at_level().
#define GOT_HERE ccnd_msg(h, "at ccnd.c:%d", __LINE__); |
typedef void(* loggerproc)(void *, const char *,...) |
static int accept_connection | ( | struct ccnd_handle * | h, | |
int | listener_fd | |||
) | [static] |
Accept an incoming DGRAM_STREAM connection, creating a new face.
Definition at line 919 of file ccnd.c.
Referenced by process_input().
static void adjust_npe_predicted_response | ( | struct ccnd_handle * | h, | |
struct nameprefix_entry * | npe, | |||
int | up | |||
) | [static] |
Definition at line 1392 of file ccnd.c.
Referenced by adjust_predicted_response(), and note_content_from().
static int adjust_outbound_for_existing_interests | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
unsigned char * | msg, | |||
struct ccn_parsed_interest * | pi, | |||
struct nameprefix_entry * | npe, | |||
struct ccn_indexbuf * | outbound | |||
) | [static] |
Adjust the outbound face list for a new Interest, based upon existing similar interests.
Definition at line 3065 of file ccnd.c.
Referenced by propagate_interest().
static void adjust_predicted_response | ( | struct ccnd_handle * | h, | |
struct propagating_entry * | pe, | |||
int | up | |||
) | [static] |
static const char* af_name | ( | int | family | ) | [static] |
Definition at line 4555 of file ccnd.c.
Referenced by ccnd_listen_on_address(), ccnd_listen_on_wildcards(), r_net_listen_on_address(), and r_net_listen_on_wildcards().
static int age_forwarding | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
Age out the old forwarding table entries.
Definition at line 2102 of file ccnd.c.
Referenced by age_forwarding_needed().
static void age_forwarding_needed | ( | struct ccnd_handle * | h | ) | [static] |
static void ccn_append_link_stuff | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
struct ccn_charbuf * | c | |||
) | [static] |
static void ccn_link_state_init | ( | struct ccnd_handle * | h, | |
struct face * | face | |||
) | [static] |
static int ccn_stuff_interest | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
struct ccn_charbuf * | c | |||
) | [static] |
Stuff a PDU with interest messages that will fit.
Note by default stuffing does not happen due to the setting of h->mtu.
Definition at line 1608 of file ccnd.c.
Referenced by stuff_and_send().
static void ccnd_append_debug_nonce | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
struct ccn_charbuf * | cb | |||
) | [static] |
static void ccnd_append_plain_nonce | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
struct ccn_charbuf * | cb | |||
) | [static] |
static void ccnd_close_fd | ( | struct ccnd_handle * | h, | |
unsigned | faceid, | |||
int * | pfd | |||
) | [static] |
Close an open file descriptor, and grumble about it.
Definition at line 341 of file ccnd.c.
Referenced by finalize_face().
struct ccnd_handle* ccnd_create | ( | const char * | progname, | |
ccnd_logger | logger, | |||
void * | loggerdata | |||
) | [read] |
Start a new ccnd instance.
progname | - name of program binary, used for locating helpers | |
logger | - logger function | |
loggerdata | - data to pass to logger function |
Definition at line 4803 of file ccnd.c.
Referenced by main(), and start_ccnd().
void ccnd_destroy | ( | struct ccnd_handle ** | pccnd | ) |
int ccnd_destroy_face | ( | struct ccnd_handle * | h, | |
unsigned | faceid | |||
) |
Destroys the face identified by faceid.
Definition at line 1801 of file ccnd.c.
Referenced by ccnd_req_destroyface(), and ccnd_stats_handle_http_connection().
struct face* ccnd_face_from_faceid | ( | struct ccnd_handle * | h, | |
unsigned | faceid | |||
) | [read] |
Looks up a face based on its faceid.
Definition at line 220 of file ccnd.c.
Referenced by ccnd_collect_stats(), and post_face_notice().
static char* ccnd_get_local_sockname | ( | void | ) | [static] |
static int ccnd_getboundsocket | ( | void * | dat, | |
struct sockaddr * | who, | |||
socklen_t | wholen | |||
) | [static] |
static void ccnd_gettime | ( | const struct ccn_gettime * | self, | |
struct ccn_timeval * | result | |||
) | [static] |
static int ccnd_listen_on | ( | struct ccnd_handle * | h, | |
const char * | addrs | |||
) | [static] |
static int ccnd_listen_on_address | ( | struct ccnd_handle * | h, | |
const char * | addr | |||
) | [static] |
static int ccnd_listen_on_wildcards | ( | struct ccnd_handle * | h | ) | [static] |
static int ccnd_nack | ( | struct ccnd_handle * | h, | |
struct ccn_charbuf * | reply_body, | |||
int | errcode, | |||
const char * | errtext | |||
) | [static] |
Replaces contents of reply_body with a ccnb-encoded StatusResponse.
Definition at line 2338 of file ccnd.c.
Referenced by ccnd_req_destroyface(), ccnd_req_newface(), ccnd_req_prefix_or_self_reg(), ccnd_req_unreg(), and check_ccndid().
static void ccnd_new_face_msg | ( | struct ccnd_handle * | h, | |
struct face * | face | |||
) | [static] |
static struct ccn_charbuf* ccnd_parse_uri_list | ( | struct ccnd_handle * | h, | |
const char * | what, | |||
const char * | uris | |||
) | [static, read] |
static int ccnd_reg_prefix | ( | struct ccnd_handle * | h, | |
const unsigned char * | msg, | |||
struct ccn_indexbuf * | comps, | |||
int | ncomps, | |||
unsigned | faceid, | |||
int | flags, | |||
int | expires | |||
) | [static] |
Register or update a prefix in the forwarding table (FIB).
h | is the ccnd handle. | |
msg | is a ccnb-encoded message containing the name prefix somewhere. | |
comps | contains the delimiting offsets for the name components in msg. | |
ncomps | is the number of relevant components. | |
faceid | indicates which face to forward to. | |
flags | are the forwarding entry flags (CCN_FORW_...), -1 for defaults. | |
expires | tells the remaining lifetime, in seconds. |
Definition at line 2199 of file ccnd.c.
Referenced by ccnd_reg_uri(), and ccnd_req_prefix_or_self_reg().
int ccnd_reg_uri | ( | struct ccnd_handle * | h, | |
const char * | uri, | |||
unsigned | faceid, | |||
int | flags, | |||
int | expires | |||
) |
Register a prefix, expressed in the form of a URI.
Definition at line 2267 of file ccnd.c.
Referenced by ccnd_internal_client_start(), ccnd_reg_ccnx_ccndid(), ccnd_reg_uri_list(), and ccnd_uri_listen().
void ccnd_reg_uri_list | ( | struct ccnd_handle * | h, | |
struct ccn_charbuf * | uris, | |||
unsigned | faceid, | |||
int | flags, | |||
int | expires | |||
) |
Register prefixes, expressed in the form of a list of URIs.
The URIs in the charbuf are each terminated by nul.
Definition at line 2302 of file ccnd.c.
Referenced by register_new_face().
int ccnd_req_destroyface | ( | struct ccnd_handle * | h, | |
const unsigned char * | msg, | |||
size_t | size, | |||
struct ccn_charbuf * | reply_body | |||
) |
Process a destroyface request for the ccnd internal client.
h | is the ccnd handle | |
msg | points to a ccnd-encoded ContentObject containing a FaceInstance in its Content. | |
size | is its size in bytes | |
reply_body | is a buffer to hold the Content of the reply, as a FaceInstance including faceid |
Definition at line 2541 of file ccnd.c.
Referenced by ccnd_answer_req().
int ccnd_req_newface | ( | struct ccnd_handle * | h, | |
const unsigned char * | msg, | |||
size_t | size, | |||
struct ccn_charbuf * | reply_body | |||
) |
Process a newface request for the ccnd internal client.
h | is the ccnd handle | |
msg | points to a ccnd-encoded ContentObject containing a FaceInstance in its Content. | |
size | is its size in bytes | |
reply_body | is a buffer to hold the Content of the reply, as a FaceInstance including faceid |
Definition at line 2394 of file ccnd.c.
Referenced by ccnd_answer_req().
static int ccnd_req_prefix_or_self_reg | ( | struct ccnd_handle * | h, | |
const unsigned char * | msg, | |||
size_t | size, | |||
int | selfreg, | |||
struct ccn_charbuf * | reply_body | |||
) | [static] |
Worker bee for two very similar public functions.
Definition at line 2599 of file ccnd.c.
Referenced by ccnd_req_prefixreg(), and ccnd_req_selfreg().
int ccnd_req_prefixreg | ( | struct ccnd_handle * | h, | |
const unsigned char * | msg, | |||
size_t | size, | |||
struct ccn_charbuf * | reply_body | |||
) |
Process a prefixreg request for the ccnd internal client.
h | is the ccnd handle | |
msg | points to a ccnd-encoded ContentObject containing a ForwardingEntry in its Content. | |
size | is its size in bytes | |
reply_body | is a buffer to hold the Content of the reply, as a FaceInstance including faceid |
Definition at line 2698 of file ccnd.c.
Referenced by ccnd_answer_req().
int ccnd_req_selfreg | ( | struct ccnd_handle * | h, | |
const unsigned char * | msg, | |||
size_t | size, | |||
struct ccn_charbuf * | reply_body | |||
) |
Process a selfreg request for the ccnd internal client.
h | is the ccnd handle | |
msg | points to a ccnd-encoded ContentObject containing a ForwardingEntry in its Content. | |
size | is its size in bytes | |
reply_body | is a buffer to hold the Content of the reply, as a ccnb-encoded ForwardingEntry |
Definition at line 2718 of file ccnd.c.
Referenced by ccnd_answer_req().
int ccnd_req_unreg | ( | struct ccnd_handle * | h, | |
const unsigned char * | msg, | |||
size_t | size, | |||
struct ccn_charbuf * | reply_body | |||
) |
Process an unreg request for the ccnd internal client.
h | is the ccnd handle | |
msg | points to a ccnd-encoded ContentObject containing a ForwardingEntry in its Content. | |
size | is its size in bytes | |
reply_body | is a buffer to hold the Content of the reply, as a ccnb-encoded ForwardingEntry |
Definition at line 2738 of file ccnd.c.
Referenced by ccnd_answer_req().
static void ccnd_reseed | ( | struct ccnd_handle * | h | ) | [static] |
void ccnd_run | ( | struct ccnd_handle * | h | ) |
Run the main loop of the ccnd.
Definition at line 4456 of file ccnd.c.
Referenced by main(), and start_ccnd().
void ccnd_send | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
const void * | data, | |||
size_t | size | |||
) |
Send data to the face.
No direct error result is provided; the face state is updated as needed.
Definition at line 4325 of file ccnd.c.
Referenced by ccnd_stats_handle_http_connection(), send_http_response(), and stuff_and_send().
void ccnd_setsockopt_v6only | ( | struct ccnd_handle * | h, | |
int | fd | |||
) |
Definition at line 4542 of file ccnd.c.
Referenced by ccnd_listen_on_address(), and ccnd_listen_on_wildcards().
static void ccnd_shutdown_listeners | ( | struct ccnd_handle * | h | ) | [static] |
Shutdown listeners and bound datagram sockets, leaving connected streams.
Definition at line 4937 of file ccnd.c.
Referenced by ccnd_destroy().
static struct ccn_charbuf* charbuf_obtain | ( | struct ccnd_handle * | h | ) | [static, read] |
Definition at line 159 of file ccnd.c.
Referenced by process_incoming_content(), propagate_interest(), and stuff_and_send().
static void charbuf_release | ( | struct ccnd_handle * | h, | |
struct ccn_charbuf * | c | |||
) | [static] |
Definition at line 170 of file ccnd.c.
Referenced by process_incoming_content(), propagate_interest(), and stuff_and_send().
static int check_ccndid | ( | struct ccnd_handle * | h, | |
const void * | p, | |||
size_t | sz, | |||
struct ccn_charbuf * | reply_body | |||
) | [static] |
Check that indicated ccndid matches ours.
Definition at line 2355 of file ccnd.c.
Referenced by check_face_instance_ccndid(), and check_forwarding_entry_ccndid().
static void check_comm_file | ( | struct ccnd_handle * | h | ) | [static] |
Definition at line 1919 of file ccnd.c.
Referenced by process_input(), reap(), and shutdown_client_fd().
static int check_dgram_faces | ( | struct ccnd_handle * | h | ) | [static] |
static int check_face_instance_ccndid | ( | struct ccnd_handle * | h, | |
struct ccn_face_instance * | f, | |||
struct ccn_charbuf * | reply_body | |||
) | [static] |
Definition at line 2364 of file ccnd.c.
Referenced by ccnd_req_destroyface(), and ccnd_req_newface().
static void check_forward_to | ( | struct ccnd_handle * | h, | |
struct nameprefix_entry * | npe | |||
) | [static] |
Remove expired faces from npe->forward_to.
Definition at line 1831 of file ccnd.c.
Referenced by check_nameprefix_entries().
static int check_forwarding_entry_ccndid | ( | struct ccnd_handle * | h, | |
struct ccn_forwarding_entry * | f, | |||
struct ccn_charbuf * | reply_body | |||
) | [static] |
static int check_nameprefix_entries | ( | struct ccnd_handle * | h | ) | [static] |
static int check_propagating | ( | struct ccnd_handle * | h | ) | [static] |
static enum cq_delay_class choose_content_delay_class | ( | struct ccnd_handle * | h, | |
unsigned | faceid, | |||
int | content_flags | |||
) | [static] |
Definition at line 1155 of file ccnd.c.
Referenced by face_send_queue_insert(), and r_sendq_face_send_queue_insert().
static int choose_face_delay | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
enum cq_delay_class | c | |||
) | [static] |
static int clean_deamon | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
static void clean_needed | ( | struct ccnd_handle * | h | ) | [static] |
static int cleanout_empties | ( | struct ccnd_handle * | h | ) | [static] |
static void cleanout_stragglers | ( | struct ccnd_handle * | h | ) | [static] |
static void cleanup_at_exit | ( | void | ) | [static] |
static void close_fd | ( | int * | pfd | ) | [static] |
Close an open file descriptor quietly.
Definition at line 329 of file ccnd.c.
Referenced by accept_connection(), r_io_accept_connection(), and r_io_open_repo_data_file().
static int comm_file_ok | ( | void | ) | [static] |
static void consume | ( | struct ccnd_handle * | h, | |
struct propagating_entry * | pe | |||
) | [static] |
Definition at line 724 of file ccnd.c.
Referenced by consume_matching_interests(), do_propagate(), finalize_nameprefix(), and finalize_propagating().
static int consume_matching_interests | ( | struct ccnd_handle * | h, | |
struct nameprefix_entry * | npe, | |||
struct content_entry * | content, | |||
struct ccn_parsed_ContentObject * | pc, | |||
struct face * | face | |||
) | [static] |
Consume matching interests given a nameprefix_entry and a piece of content.
If face is not NULL, pay attention only to interests from that face. It is allowed to pass NULL for pc, but if you have a (valid) one it will avoid a re-parse.
Definition at line 1354 of file ccnd.c.
Referenced by match_interests().
static struct content_entry* content_from_accession | ( | struct ccnd_handle * | h, | |
ccn_accession_t | accession | |||
) | [static, read] |
Definition at line 395 of file ccnd.c.
Referenced by clean_deamon(), content_sender(), content_skiplist_findbefore(), expire_content(), find_first_match_candidate(), next_child_at_level(), process_incoming_content(), and process_incoming_interest().
static int content_matches_interest_prefix | ( | struct ccnd_handle * | h, | |
struct content_entry * | content, | |||
const unsigned char * | interest_msg, | |||
struct ccn_indexbuf * | comps, | |||
int | prefix_comps | |||
) | [static] |
static struct content_queue* content_queue_create | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
enum cq_delay_class | c | |||
) | [static, read] |
Definition at line 288 of file ccnd.c.
Referenced by face_send_queue_insert(), and r_sendq_face_send_queue_insert().
static void content_queue_destroy | ( | struct ccnd_handle * | h, | |
struct content_queue ** | pq | |||
) | [static] |
static int content_sender | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
Definition at line 1186 of file ccnd.c.
Referenced by face_send_queue_insert(), and r_sendq_face_send_queue_insert().
static int content_skiplist_findbefore | ( | struct ccnd_handle * | h, | |
const unsigned char * | key, | |||
size_t | keysize, | |||
struct content_entry * | wanted_old, | |||
struct ccn_indexbuf ** | ans | |||
) | [static] |
Definition at line 542 of file ccnd.c.
Referenced by content_skiplist_insert(), content_skiplist_remove(), find_first_match_candidate(), and next_child_at_level().
static void content_skiplist_insert | ( | struct ccnd_handle * | h, | |
struct content_entry * | content | |||
) | [static] |
static ccn_accession_t content_skiplist_next | ( | struct ccnd_handle * | h, | |
struct content_entry * | content | |||
) | [static] |
Definition at line 714 of file ccnd.c.
Referenced by next_child_at_level(), and process_incoming_interest().
static void content_skiplist_remove | ( | struct ccnd_handle * | h, | |
struct content_entry * | content | |||
) | [static] |
static int create_local_listener | ( | struct ccnd_handle * | h, | |
const char * | sockname, | |||
int | backlog | |||
) | [static] |
static void do_deferred_write | ( | struct ccnd_handle * | h, | |
int | fd | |||
) | [static] |
static int do_propagate | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
static void enroll_content | ( | struct ccnd_handle * | h, | |
struct content_entry * | content | |||
) | [static] |
static int enroll_face | ( | struct ccnd_handle * | h, | |
struct face * | face | |||
) | [static] |
Assigns the faceid for a nacent face, calls register_new_face() if successful.
Definition at line 230 of file ccnd.c.
Referenced by ccnd_create(), get_dgram_source(), and record_connection().
static int establish_min_recv_bufsize | ( | struct ccnd_handle * | h, | |
int | fd, | |||
int | minsize | |||
) | [static] |
static int expire_content | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
Scheduled event that makes content stale when its FreshnessSeconds has exported.
May actually remove the content if we are over quota.
Definition at line 3719 of file ccnd.c.
Referenced by r_store_set_content_timer(), and set_content_timer().
static struct face* face_from_faceid | ( | struct ccnd_handle * | h, | |
unsigned | faceid | |||
) | [static, read] |
Looks up a face based on its faceid (private).
Definition at line 204 of file ccnd.c.
Referenced by adjust_outbound_for_existing_interests(), age_forwarding(), ccnd_destroy_face(), ccnd_face_from_faceid(), ccnd_reg_prefix(), ccnd_req_destroyface(), ccnd_req_newface(), ccnd_req_prefix_or_self_reg(), ccnd_req_unreg(), check_forward_to(), choose_content_delay_class(), consume(), consume_matching_interests(), content_sender(), do_propagate(), get_outbound_faces(), pe_next_usec(), replan_propagation(), sending_fd(), and update_forward_to().
static int face_send_queue_insert | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
struct content_entry * | content | |||
) | [static] |
Definition at line 1279 of file ccnd.c.
Referenced by consume_matching_interests(), and process_incoming_interest().
static unsigned faceid_from_fd | ( | struct ccnd_handle * | h, | |
int | fd | |||
) | [static] |
static void finalize_content | ( | struct hashtb_enumerator * | content_enumerator | ) | [static] |
static void finalize_face | ( | struct hashtb_enumerator * | e | ) | [static] |
static void finalize_nameprefix | ( | struct hashtb_enumerator * | e | ) | [static] |
static void finalize_propagating | ( | struct hashtb_enumerator * | e | ) | [static] |
static struct content_entry* find_first_match_candidate | ( | struct ccnd_handle * | h, | |
const unsigned char * | interest_msg, | |||
const struct ccn_parsed_interest * | pi | |||
) | [static, read] |
static struct face * get_dgram_source | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
struct sockaddr * | addr, | |||
socklen_t | addrlen, | |||
int | why | |||
) | [static, read] |
static struct ccn_indexbuf* get_outbound_faces | ( | struct ccnd_handle * | h, | |
struct face * | from, | |||
unsigned char * | msg, | |||
struct ccn_parsed_interest * | pi, | |||
struct nameprefix_entry * | npe | |||
) | [static, read] |
This is where we consult the interest forwarding table.
h | is the ccnd handle | |
from | is the handle for the originating face (may be NULL). | |
msg | points to the ccnb-encoded interest message | |
pi | must be the parse information for msg | |
npe | should be the result of the prefix lookup |
Definition at line 2903 of file ccnd.c.
Referenced by propagate_interest().
static void handle_fatal_signal | ( | int | sig | ) | [static] |
static int handle_send_error | ( | struct ccnd_handle * | h, | |
int | errnum, | |||
struct face * | face, | |||
const void * | data, | |||
size_t | size | |||
) | [static] |
Handle errors after send() or sendto().
Definition at line 4270 of file ccnd.c.
Referenced by ccnd_send(), and r_io_send().
static struct ccn_indexbuf* indexbuf_obtain | ( | struct ccnd_handle * | h | ) | [static, read] |
Definition at line 180 of file ccnd.c.
Referenced by process_incoming_content(), and process_incoming_interest().
static void indexbuf_release | ( | struct ccnd_handle * | h, | |
struct ccn_indexbuf * | c | |||
) | [static] |
Definition at line 191 of file ccnd.c.
Referenced by process_incoming_content(), and process_incoming_interest().
static void init_face_flags | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
int | setflags | |||
) | [static] |
Initialize the face flags based upon the addr information and the provided explicit setflags.
Definition at line 842 of file ccnd.c.
Referenced by get_dgram_source(), r_io_record_fd(), and record_connection().
static int is_duplicate_flooded | ( | struct ccnd_handle * | h, | |
unsigned char * | msg, | |||
struct ccn_parsed_interest * | pi, | |||
unsigned | faceid | |||
) | [static] |
Checks whether this Interest message has been seen before by using its Nonce, recording it in the process.
Also, if it has been seen and the original is still propagating, remove the face that the duplicate arrived on from the outbound set of the original.
Definition at line 3388 of file ccnd.c.
Referenced by process_incoming_interest().
static void link_propagating_interest_to_nameprefix | ( | struct ccnd_handle * | h, | |
struct propagating_entry * | pe, | |||
struct nameprefix_entry * | npe | |||
) | [static] |
static struct face* make_connection | ( | struct ccnd_handle * | h, | |
struct sockaddr * | who, | |||
socklen_t | wholen, | |||
int | setflags | |||
) | [static, read] |
Make an outbound stream connection.
Definition at line 945 of file ccnd.c.
Referenced by ccnd_req_newface().
static void mark_stale | ( | struct ccnd_handle * | h, | |
struct content_entry * | content | |||
) | [static] |
Mark content as stale.
Definition at line 3696 of file ccnd.c.
Referenced by clean_deamon(), expire_content(), and process_incoming_interest().
static int match_interests | ( | struct ccnd_handle * | h, | |
struct content_entry * | content, | |||
struct ccn_parsed_ContentObject * | pc, | |||
struct face * | face, | |||
struct face * | from_face | |||
) | [static] |
Find and consume interests that match given content.
Schedules the sending of the content. If face is not NULL, pay attention only to interests from that face. It is allowed to pass NULL for pc, but if you have a (valid) one it will avoid a re-parse. For new content, from_face is the source; for old content, from_face is NULL.
Definition at line 1481 of file ccnd.c.
Referenced by process_incoming_content(), and process_incoming_interest().
static struct nameprefix_entry * nameprefix_for_pe | ( | struct ccnd_handle * | h, | |
struct propagating_entry * | pe | |||
) | [static, read] |
Definition at line 3319 of file ccnd.c.
Referenced by adjust_predicted_response(), do_propagate(), and replan_propagation().
int nameprefix_longest_match | ( | struct ccnd_handle * | h, | |
const unsigned char * | msg, | |||
struct ccn_indexbuf * | comps, | |||
int | ncomps | |||
) |
static int nameprefix_seek | ( | struct ccnd_handle * | h, | |
struct hashtb_enumerator * | e, | |||
const unsigned char * | msg, | |||
struct ccn_indexbuf * | comps, | |||
int | ncomps | |||
) | [static] |
Creates a nameprefix entry if it does not already exist, together with all of its parents.
Definition at line 3442 of file ccnd.c.
Referenced by ccnd_reg_prefix(), and process_incoming_interest().
static struct content_entry* next_child_at_level | ( | struct ccnd_handle * | h, | |
struct content_entry * | content, | |||
int | level | |||
) | [static, read] |
static void note_content_from | ( | struct ccnd_handle * | h, | |
struct nameprefix_entry * | npe, | |||
unsigned | from_faceid, | |||
int | prefix_comps | |||
) | [static] |
Keep a little history about where matching content comes from.
Definition at line 1425 of file ccnd.c.
Referenced by match_interests().
static int pe_next_usec | ( | struct ccnd_handle * | h, | |
struct propagating_entry * | pe, | |||
int | next_delay, | |||
int | lineno | |||
) | [static] |
static void prepare_poll_fds | ( | struct ccnd_handle * | h | ) | [static] |
Set up the array of fd descriptors for the poll(2) call.
Arrange the array so that multicast receivers are early, so that if the same packet arrives on both a multicast socket and a normal socket, we will count is as multicast.
Definition at line 4425 of file ccnd.c.
Referenced by ccnd_run().
static void process_incoming_content | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
unsigned char * | wire_msg, | |||
size_t | wire_size | |||
) | [static] |
Definition at line 3783 of file ccnd.c.
Referenced by process_input_message(), r_init_map_and_process_file(), r_proto_expect_content(), r_sync_local_store(), and r_sync_upcall_store().
static void process_incoming_interest | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
unsigned char * | msg, | |||
size_t | size | |||
) | [static] |
static int process_incoming_link_message | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
enum ccn_dtag | dtag, | |||
unsigned char * | msg, | |||
size_t | size | |||
) | [static] |
static void process_input | ( | struct ccnd_handle * | h, | |
int | fd | |||
) | [static] |
Process the input from a socket.
The socket has been found ready for input by the poll call. Decide what face it corresponds to, and after checking for exceptional cases, receive data, parse it into ccnb-encoded messages, and call process_input_message for each one.
Definition at line 4148 of file ccnd.c.
Referenced by ccnd_run().
static void process_input_buffer | ( | struct ccnd_handle * | h, | |
struct face * | face | |||
) | [static] |
Break up data in a face's input buffer buffer into individual messages, and call process_input_message on each one.
This is used to handle things originating from the internal client - its output is input for face 0.
Definition at line 4112 of file ccnd.c.
Referenced by process_internal_client_buffer(), and r_dispatch_process_internal_client_buffer().
static void process_input_message | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
unsigned char * | msg, | |||
size_t | size, | |||
int | pdu_ok | |||
) | [static] |
Definition at line 3943 of file ccnd.c.
Referenced by process_input(), process_input_buffer(), and r_dispatch_process_input().
static void process_internal_client_buffer | ( | struct ccnd_handle * | h | ) | [static] |
static int promote_outbound | ( | struct propagating_entry * | pe, | |
unsigned | faceid | |||
) | [static] |
If the pe interest is slated to be sent to the given faceid, promote the faceid to the front of the list, preserving the order of the others.
Definition at line 1326 of file ccnd.c.
Referenced by ccn_stuff_interest(), is_duplicate_flooded(), and reorder_outbound_using_history().
static int propagate_interest | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
unsigned char * | msg, | |||
struct ccn_parsed_interest * | pi, | |||
struct nameprefix_entry * | npe | |||
) | [static] |
Schedules the propagation of an Interest message.
Definition at line 3198 of file ccnd.c.
Referenced by process_incoming_interest().
static unsigned randomize_content_delay | ( | struct ccnd_handle * | h, | |
struct content_queue * | q | |||
) | [static] |
Definition at line 1170 of file ccnd.c.
Referenced by content_sender(), face_send_queue_insert(), and r_sendq_face_send_queue_insert().
static int reap | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
Scheduled reap event for retiring expired structures.
Definition at line 1932 of file ccnd.c.
Referenced by reap_needed().
static void reap_needed | ( | struct ccnd_handle * | h, | |
int | init_delay_usec | |||
) | [static] |
Definition at line 1953 of file ccnd.c.
Referenced by do_propagate(), get_dgram_source(), and shutdown_client_fd().
static struct face * record_connection | ( | struct ccnd_handle * | h, | |
int | fd, | |||
struct sockaddr * | who, | |||
socklen_t | wholen, | |||
int | setflags | |||
) | [static, read] |
Make a new face entered in the faces_by_fd table.
Definition at line 881 of file ccnd.c.
Referenced by accept_connection(), ccnd_getboundsocket(), ccnd_listen_on_address(), ccnd_listen_on_wildcards(), create_local_listener(), make_connection(), and setup_multicast().
static void register_new_face | ( | struct ccnd_handle * | h, | |
struct face * | face | |||
) | [static] |
Called when a face is first created, and (perhaps) a second time in the case that a face transitions from the undecided state.
Definition at line 2320 of file ccnd.c.
Referenced by enroll_face(), and process_input_message().
static int remove_content | ( | struct ccnd_handle * | h, | |
struct content_entry * | content | |||
) | [static] |
Definition at line 1960 of file ccnd.c.
Referenced by clean_deamon(), expire_content(), and process_incoming_content().
static int reorder_outbound_using_history | ( | struct ccnd_handle * | h, | |
struct nameprefix_entry * | npe, | |||
struct propagating_entry * | pe | |||
) | [static] |
Use the history to reorder the interest forwarding.
Definition at line 1449 of file ccnd.c.
Referenced by propagate_interest().
static void replan_propagation | ( | struct ccnd_handle * | h, | |
struct propagating_entry * | pe | |||
) | [static] |
static struct sockaddr* scrub_sockaddr | ( | struct sockaddr * | addr, | |
socklen_t | addrlen, | |||
struct sockaddr_in6 * | space | |||
) | [static, read] |
Since struct sockaddr_in6 may contain fields that should not participate in comparison / hash, ensure the undesired fields are zero.
Per RFC 3493, sin6_flowinfo is zeroed.
addr | is the sockaddr (any family) | |
addrlen | is its length | |
space | points to a buffer that may be used for the result. |
Definition at line 4044 of file ccnd.c.
Referenced by get_dgram_source().
static struct ccn_forwarding* seek_forwarding | ( | struct ccnd_handle * | h, | |
struct nameprefix_entry * | npe, | |||
unsigned | faceid | |||
) | [static, read] |
static void send_content | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
struct content_entry * | content | |||
) | [static] |
static int sending_fd | ( | struct ccnd_handle * | h, | |
struct face * | face | |||
) | [static] |
static void set_content_timer | ( | struct ccnd_handle * | h, | |
struct content_entry * | content, | |||
struct ccn_parsed_ContentObject * | pco | |||
) | [static] |
Schedules content expiration based on its FreshnessSeconds.
Definition at line 3751 of file ccnd.c.
Referenced by process_incoming_content().
static struct face* setup_multicast | ( | struct ccnd_handle * | h, | |
struct ccn_face_instance * | face_instance, | |||
struct sockaddr * | who, | |||
socklen_t | wholen | |||
) | [static, read] |
static void shutdown_client_fd | ( | struct ccnd_handle * | h, | |
int | fd | |||
) | [static] |
Definition at line 1101 of file ccnd.c.
Referenced by ccnd_destroy_face(), ccnd_run(), do_deferred_write(), and process_input().
static void stuff_and_send | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
const unsigned char * | data1, | |||
size_t | size1, | |||
const unsigned char * | data2, | |||
size_t | size2 | |||
) | [static] |
Send a message in a PDU, possibly stuffing other interest messages into it.
The message may be in two pieces.
Definition at line 1520 of file ccnd.c.
Referenced by do_propagate(), and send_content().
static int stuff_link_check | ( | struct ccnd_handle * | h, | |
struct face * | face, | |||
struct ccn_charbuf * | c | |||
) | [static] |
Append a link-check interest if appropriate.
Definition at line 1562 of file ccnd.c.
Referenced by ccn_stuff_interest().
static void unlink_at_exit | ( | const char * | path | ) | [static] |
static void update_forward_to | ( | struct ccnd_handle * | h, | |
struct nameprefix_entry * | npe | |||
) | [static] |
Recompute the contents of npe->forward_to and npe->flags from forwarding lists of npe and all of its ancestors.
Definition at line 2838 of file ccnd.c.
Referenced by get_outbound_faces(), match_interests(), and replan_propagation().
const char* unlink_this_at_exit = NULL [static] |
Definition at line 93 of file ccnd.c.
Referenced by check_comm_file(), cleanup_at_exit(), comm_file_ok(), and unlink_at_exit().