Go to the source code of this file.
Data Structures | |
struct | ccnd_handle |
We pass this handle almost everywhere within ccnd. More... | |
struct | content_queue |
struct | face |
One of our active faces. More... | |
struct | content_entry |
The content hash table is keyed by the initial portion of the ContentObject that contains all the parts of the complete name. More... | |
struct | sparse_straggler_entry |
The sparse_straggler hash table, keyed by accession, holds scattered entries that would otherwise bloat the direct content_by_accession table. More... | |
struct | propagating_entry |
The propagating interest hash table is keyed by Nonce. More... | |
struct | nameprefix_entry |
The nameprefix hash table is keyed by the Component elements of the Name prefix. More... | |
struct | ccn_forwarding |
Keeps track of the faces that interests matching a given name prefix may be forwarded to. More... | |
Defines | |
#define | FACESLOTBITS 18 |
Each face is referenced by a number, the faceid. | |
#define | MAXFACES ((1U << FACESLOTBITS) - 1) |
#define | CCN_FACE_LINK (1 << 0) |
face flags | |
#define | CCN_FACE_DGRAM (1 << 1) |
Datagram interface, respect packets. | |
#define | CCN_FACE_GG (1 << 2) |
Considered friendly. | |
#define | CCN_FACE_LOCAL (1 << 3) |
PF_UNIX socket. | |
#define | CCN_FACE_INET (1 << 4) |
IPv4. | |
#define | CCN_FACE_MCAST (1 << 5) |
a party line (e.g. | |
#define | CCN_FACE_INET6 (1 << 6) |
IPv6. | |
#define | CCN_FACE_DC (1 << 7) |
Direct control face. | |
#define | CCN_FACE_NOSEND (1 << 8) |
Don't send anymore. | |
#define | CCN_FACE_UNDECIDED (1 << 9) |
Might not be talking ccn. | |
#define | CCN_FACE_PERMANENT (1 << 10) |
No timeout for inactivity. | |
#define | CCN_FACE_CONNECTING (1 << 11) |
Connect in progress. | |
#define | CCN_FACE_LOOPBACK (1 << 12) |
v4 or v6 loopback address | |
#define | CCN_FACE_CLOSING (1 << 13) |
close stream when output is done | |
#define | CCN_FACE_PASSIVE (1 << 14) |
a listener or a bound dgram socket | |
#define | CCN_FACE_NORECV (1 << 15) |
use for sending only | |
#define | CCN_FACE_REGOK (1 << 16) |
Allowed to do prefix registration. | |
#define | CCN_FACE_SEQOK (1 << 17) |
#define | CCN_FACE_SEQPROBE (1 << 18) |
#define | CCN_FACE_LC (1 << 19) |
#define | CCN_NOFACEID (~0U) |
#define | CCN_CONTENT_ENTRY_SLOWSEND 1 |
content_entry flags | |
#define | CCN_CONTENT_ENTRY_STALE 2 |
#define | CCN_CONTENT_ENTRY_PRECIOUS 4 |
#define | CCN_PR_UNSENT 0x01 |
interest has not been sent anywhere yet | |
#define | CCN_PR_WAIT1 0x02 |
interest has been sent to one place | |
#define | CCN_PR_STUFFED1 0x04 |
was stuffed before sent anywhere else | |
#define | CCN_PR_TAP 0x08 |
at least one tap face is present | |
#define | CCN_PR_EQV 0x10 |
a younger similar interest exists | |
#define | CCN_PR_SCOPE0 0x20 |
interest scope is 0 | |
#define | CCN_PR_SCOPE1 0x40 |
interest scope is 1 (this host) | |
#define | CCN_PR_SCOPE2 0x80 |
interest scope is 2 (immediate neighborhood) | |
#define | CCN_FORW_PFXO (CCN_FORW_ADVERTISE | CCN_FORW_CAPTURE | CCN_FORW_LOCAL) |
#define | CCN_FORW_REFRESHED (1 << 16) |
private to ccnd | |
#define | CCN_FWU_SECS 5 |
Determines how frequently we age our forwarding entries. | |
#define | CCNDID_LOCAL_URI "ccnx:/%C1.M.S.localhost/%C1.M.SRV/ccnd/KEY" |
URIs for prefixes served by the internal client. | |
#define | CCNDID_NEIGHBOR_URI "ccnx:/%C1.M.S.neighborhood/%C1.M.SRV/ccnd/KEY" |
Typedefs | |
typedef unsigned | ccn_accession_t |
typedef int(* | ccnd_logger )(void *loggerdata, const char *format, va_list ap) |
Enumerations | |
enum | cq_delay_class { CCN_CQ_ASAP, CCN_CQ_NORMAL, CCN_CQ_SLOW, CCN_CQ_N, CCN_CQ_ASAP, CCN_CQ_NORMAL, CCN_CQ_SLOW, CCN_CQ_N } |
enum | ccnd_face_meter_index { FM_BYTI, FM_BYTO, FM_DATI, FM_INTO, FM_DATO, FM_INTI, CCND_FACE_METER_N } |
Face meter index. More... | |
Functions | |
struct ccnd_meter * | ccnd_meter_create (struct ccnd_handle *h, const char *what) |
create and initialize separately allocated meter. | |
void | ccnd_meter_destroy (struct ccnd_meter **) |
Destroy a separately allocated meter. | |
void | ccnd_meter_init (struct ccnd_handle *h, struct ccnd_meter *m, const char *what) |
Initialize a meter. | |
void | ccnd_meter_bump (struct ccnd_handle *h, struct ccnd_meter *m, unsigned amt) |
Count something (messages, packets, bytes), and roll up some kind of statistics on it. | |
unsigned | ccnd_meter_rate (struct ccnd_handle *h, struct ccnd_meter *m) |
Return the average rate (units per second) of a metered quantity. | |
uintmax_t | ccnd_meter_total (struct ccnd_meter *m) |
Return the grand total for a metered quantity. | |
int | ccnd_init_internal_keystore (struct ccnd_handle *) |
int | ccnd_internal_client_start (struct ccnd_handle *) |
void | ccnd_internal_client_stop (struct ccnd_handle *) |
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. | |
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. | |
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. | |
struct face * | ccnd_face_from_faceid (struct ccnd_handle *, unsigned) |
Looks up a face based on its faceid. | |
void | ccnd_face_status_change (struct ccnd_handle *, unsigned) |
Called by ccnd when a face undergoes a substantive status change that should be reported to interested parties. | |
int | ccnd_destroy_face (struct ccnd_handle *h, unsigned faceid) |
Destroys the face identified by faceid. | |
void | ccnd_send (struct ccnd_handle *h, struct face *face, const void *data, size_t size) |
Send data to the face. | |
int | ccnd_stats_handle_http_connection (struct ccnd_handle *, struct face *) |
void | ccnd_msg (struct ccnd_handle *, const char *,...) |
Copyright (C) 2009,2010 Palo Alto Research Center, Inc. | |
void | ccnd_debug_ccnb (struct ccnd_handle *h, int lineno, const char *msg, struct face *face, const unsigned char *ccnb, size_t ccnb_size) |
Produce a ccnd debug trace entry. | |
struct ccnd_handle * | ccnd_create (const char *, ccnd_logger, void *) |
Start a new ccnd instance. | |
void | ccnd_run (struct ccnd_handle *h) |
Run the main loop of the ccnd. | |
void | ccnd_destroy (struct ccnd_handle **) |
Destroy the ccnd instance, releasing all associated resources. | |
Variables | |
const char * | ccnd_usage_message |
CCND Usage message. |
Data structures are described here so that logging and status routines can be compiled separately.
Part of ccnd - the CCNx Daemon.
Copyright (C) 2008-2011 Palo Alto Research Center, Inc.
This work is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This work 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Definition in file ccnd_private.h.
#define CCN_CONTENT_ENTRY_PRECIOUS 4 |
Definition at line 261 of file ccnd_private.h.
Referenced by clean_deamon(), and process_incoming_content().
#define CCN_CONTENT_ENTRY_SLOWSEND 1 |
content_entry flags
Definition at line 259 of file ccnd_private.h.
Referenced by choose_content_delay_class(), and process_incoming_content().
#define CCN_CONTENT_ENTRY_STALE 2 |
Definition at line 260 of file ccnd_private.h.
Referenced by clean_deamon(), mark_stale(), process_incoming_content(), process_incoming_interest(), r_store_forget_content(), r_store_mark_stale(), and remove_content().
#define CCN_FACE_CLOSING (1 << 13) |
close stream when output is done
Definition at line 226 of file ccnd_private.h.
Referenced by ccnd_stats_handle_http_connection(), do_deferred_write(), and prepare_poll_fds().
#define CCN_FACE_CONNECTING (1 << 11) |
Connect in progress.
Definition at line 224 of file ccnd_private.h.
Referenced by ccnd_req_newface(), do_deferred_write(), make_connection(), and process_input().
#define CCN_FACE_DC (1 << 7) |
Direct control face.
Definition at line 220 of file ccnd_private.h.
Referenced by ccnd_reg_prefix(), do_propagate(), get_outbound_faces(), and replan_propagation().
#define CCN_FACE_DGRAM (1 << 1) |
Datagram interface, respect packets.
Definition at line 214 of file ccnd_private.h.
Referenced by ccn_link_state_init(), ccnd_destroy_face(), ccnd_getboundsocket(), ccnd_listen_on_address(), ccnd_listen_on_wildcards(), ccnd_send(), check_dgram_faces(), choose_content_delay_class(), choose_face_delay(), get_dgram_source(), make_connection(), process_incoming_link_message(), process_input(), setup_multicast(), and stuff_link_check().
#define CCN_FACE_GG (1 << 2) |
Considered friendly.
Definition at line 215 of file ccnd_private.h.
Referenced by adjust_outbound_for_existing_interests(), ccn_link_state_init(), ccnd_create(), ccnd_req_destroyface(), ccnd_req_newface(), ccnd_req_prefix_or_self_reg(), ccnd_req_unreg(), choose_content_delay_class(), choose_face_delay(), collect_faces_html(), get_dgram_source(), get_outbound_faces(), init_face_flags(), match_interests(), process_incoming_content(), process_incoming_interest(), process_input_message(), register_new_face(), replan_propagation(), and stuff_link_check().
#define CCN_FACE_INET (1 << 4) |
IPv4.
Definition at line 217 of file ccnd_private.h.
Referenced by init_face_flags(), and post_face_notice().
#define CCN_FACE_INET6 (1 << 6) |
IPv6.
Definition at line 219 of file ccnd_private.h.
Referenced by init_face_flags(), and post_face_notice().
#define CCN_FACE_LC (1 << 19) |
Definition at line 232 of file ccnd_private.h.
Referenced by check_dgram_faces(), and stuff_link_check().
#define CCN_FACE_LINK (1 << 0) |
face flags
Elements wrapped by CCNProtocolDataUnit
Definition at line 213 of file ccnd_private.h.
Referenced by adjust_outbound_for_existing_interests(), choose_content_delay_class(), choose_face_delay(), make_connection(), process_input_message(), setup_multicast(), and stuff_and_send().
#define CCN_FACE_LOCAL (1 << 3) |
PF_UNIX socket.
Definition at line 216 of file ccnd_private.h.
Referenced by ccnd_create(), ccnd_req_newface(), choose_content_delay_class(), choose_face_delay(), create_local_listener(), init_face_flags(), make_connection(), process_input(), and setup_multicast().
#define CCN_FACE_LOOPBACK (1 << 12) |
v4 or v6 loopback address
Definition at line 225 of file ccnd_private.h.
Referenced by ccnd_req_newface(), get_dgram_source(), init_face_flags(), and process_input_message().
#define CCN_FACE_MCAST (1 << 5) |
a party line (e.g.
multicast)
Definition at line 218 of file ccnd_private.h.
Referenced by adjust_outbound_for_existing_interests(), ccn_link_state_init(), ccnd_destroy_face(), ccnd_shutdown_listeners(), choose_content_delay_class(), choose_face_delay(), collect_faces_html(), get_dgram_source(), prepare_poll_fds(), process_incoming_link_message(), setup_multicast(), and stuff_link_check().
#define CCN_FACE_NORECV (1 << 15) |
use for sending only
Definition at line 228 of file ccnd_private.h.
Referenced by ccnd_getboundsocket(), and prepare_poll_fds().
#define CCN_FACE_NOSEND (1 << 8) |
Don't send anymore.
Definition at line 221 of file ccnd_private.h.
Referenced by ccnd_send(), ccnd_stats_handle_http_connection(), collect_faces_html(), content_sender(), do_deferred_write(), do_propagate(), face_send_queue_insert(), handle_send_error(), make_connection(), send_content(), and setup_multicast().
#define CCN_FACE_PASSIVE (1 << 14) |
a listener or a bound dgram socket
Definition at line 227 of file ccnd_private.h.
Referenced by ccn_link_state_init(), ccnd_getboundsocket(), ccnd_listen_on_address(), ccnd_listen_on_wildcards(), ccnd_shutdown_listeners(), collect_face_meter_html(), collect_faces_html(), collect_faces_xml(), create_local_listener(), process_input(), and register_new_face().
#define CCN_FACE_PERMANENT (1 << 10) |
No timeout for inactivity.
Definition at line 223 of file ccnd_private.h.
Referenced by ccnd_req_newface(), and check_dgram_faces().
#define CCN_FACE_REGOK (1 << 16) |
Allowed to do prefix registration.
Definition at line 229 of file ccnd_private.h.
Referenced by ccnd_req_prefix_or_self_reg().
#define CCN_FACE_SEQOK (1 << 17) |
Definition at line 230 of file ccnd_private.h.
Referenced by ccn_append_link_stuff(), ccn_link_state_init(), process_incoming_link_message(), and stuff_and_send().
#define CCN_FACE_SEQPROBE (1 << 18) |
Definition at line 231 of file ccnd_private.h.
Referenced by ccn_append_link_stuff(), ccn_link_state_init(), and stuff_and_send().
#define CCN_FACE_UNDECIDED (1 << 9) |
Might not be talking ccn.
Definition at line 222 of file ccnd_private.h.
Referenced by accept_connection(), collect_face_meter_html(), collect_faces_html(), collect_faces_xml(), finalize_face(), make_connection(), process_input(), process_input_message(), and register_new_face().
#define CCN_FORW_PFXO (CCN_FORW_ADVERTISE | CCN_FORW_CAPTURE | CCN_FORW_LOCAL) |
Definition at line 359 of file ccnd_private.h.
Referenced by collect_forwarding_html(), and collect_forwarding_xml().
#define CCN_FORW_REFRESHED (1 << 16) |
private to ccnd
Definition at line 360 of file ccnd_private.h.
Referenced by age_forwarding(), and ccnd_reg_prefix().
#define CCN_FWU_SECS 5 |
Determines how frequently we age our forwarding entries.
Definition at line 366 of file ccnd_private.h.
Referenced by age_forwarding(), and age_forwarding_needed().
#define CCN_NOFACEID (~0U) |
Definition at line 233 of file ccnd_private.h.
Referenced by ccnd_create(), ccnd_req_prefix_or_self_reg(), ccnd_req_unreg(), check_nameprefix_entries(), collect_faces_html(), collect_faces_xml(), faceid_from_fd(), finalize_face(), nameprefix_for_pe(), nameprefix_seek(), note_content_from(), record_connection(), reorder_outbound_using_history(), sending_fd(), shutdown_client_fd(), and update_forward_to().
#define CCN_PR_EQV 0x10 |
a younger similar interest exists
Definition at line 299 of file ccnd_private.h.
Referenced by adjust_outbound_for_existing_interests(), and replan_propagation().
#define CCN_PR_SCOPE0 0x20 |
interest scope is 0
Definition at line 300 of file ccnd_private.h.
Referenced by propagate_interest(), and replan_propagation().
#define CCN_PR_SCOPE1 0x40 |
interest scope is 1 (this host)
Definition at line 301 of file ccnd_private.h.
Referenced by propagate_interest(), and replan_propagation().
#define CCN_PR_SCOPE2 0x80 |
interest scope is 2 (immediate neighborhood)
Definition at line 302 of file ccnd_private.h.
Referenced by propagate_interest(), and replan_propagation().
#define CCN_PR_STUFFED1 0x04 |
was stuffed before sent anywhere else
Definition at line 297 of file ccnd_private.h.
Referenced by ccn_stuff_interest(), and do_propagate().
#define CCN_PR_TAP 0x08 |
at least one tap face is present
Definition at line 298 of file ccnd_private.h.
Referenced by do_propagate(), and propagate_interest().
#define CCN_PR_UNSENT 0x01 |
interest has not been sent anywhere yet
Definition at line 295 of file ccnd_private.h.
Referenced by ccn_stuff_interest(), do_propagate(), and propagate_interest().
#define CCN_PR_WAIT1 0x02 |
interest has been sent to one place
Definition at line 296 of file ccnd_private.h.
Referenced by ccn_stuff_interest(), and do_propagate().
#define CCNDID_LOCAL_URI "ccnx:/%C1.M.S.localhost/%C1.M.SRV/ccnd/KEY" |
URIs for prefixes served by the internal client.
Definition at line 412 of file ccnd_private.h.
Referenced by ccnd_answer_req().
#define CCNDID_NEIGHBOR_URI "ccnx:/%C1.M.S.neighborhood/%C1.M.SRV/ccnd/KEY" |
Definition at line 413 of file ccnd_private.h.
Referenced by ccnd_answer_req(), and stuff_link_check().
#define FACESLOTBITS 18 |
Each face is referenced by a number, the faceid.
The low-order bits (under the MAXFACES) constitute a slot number that is unique (for this ccnd) among the faces that are alive at a given time. The rest of the bits form a generation number that make the entire faceid unique over time, even for faces that are defunct.
Definition at line 155 of file ccnd_private.h.
#define MAXFACES ((1U << FACESLOTBITS) - 1) |
Definition at line 156 of file ccnd_private.h.
Referenced by enroll_face(), face_from_faceid(), and finalize_face().
typedef unsigned ccn_accession_t |
Definition at line 58 of file ccnd_private.h.
typedef int(* ccnd_logger)(void *loggerdata, const char *format, va_list ap) |
Definition at line 63 of file ccnd_private.h.
enum cq_delay_class |
CCN_CQ_ASAP | |
CCN_CQ_NORMAL | |
CCN_CQ_SLOW | |
CCN_CQ_N | |
CCN_CQ_ASAP | |
CCN_CQ_NORMAL | |
CCN_CQ_SLOW | |
CCN_CQ_N |
Definition at line 168 of file ccnd_private.h.
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_debug_ccnb | ( | struct ccnd_handle * | h, | |
int | lineno, | |||
const char * | msg, | |||
struct face * | face, | |||
const unsigned char * | ccnb, | |||
size_t | ccnb_size | |||
) |
Produce a ccnd debug trace entry.
Output is produced by calling ccnd_msg.
h | the ccnd handle | |
lineno | caller's source line number (usually __LINE__) | |
msg | a short text tag to identify the entry | |
face | handle of associated face; may be NULL | |
ccnb | points to ccnb-encoded Interest or ContentObject | |
ccnb_size | is in bytes |
Definition at line 79 of file android_msg.c.
Referenced by adjust_outbound_for_existing_interests(), age_forwarding(), ccn_stuff_interest(), ccnd_answer_req(), ccnd_reg_prefix(), ccnd_req_unreg(), consume_matching_interests(), do_propagate(), face_send_queue_insert(), find_first_match_candidate(), mark_stale(), next_child_at_level(), pe_next_usec(), process_incoming_content(), process_incoming_interest(), propagate_interest(), remove_content(), send_content(), set_content_timer(), and stuff_link_check().
void ccnd_destroy | ( | struct ccnd_handle ** | ) |
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 * | , | |
unsigned | ||||
) | [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().
void ccnd_face_status_change | ( | struct ccnd_handle * | ccnd, | |
unsigned | faceid | |||
) |
Called by ccnd when a face undergoes a substantive status change that should be reported to interested parties.
In the destroy case, this is called from the hash table finalizer, so it shouldn't do much directly. Inspecting the face is OK, though.
Definition at line 540 of file ccnd_internal_client.c.
Referenced by ccnd_start_notice(), do_deferred_write(), finalize_face(), and register_new_face().
int ccnd_init_internal_keystore | ( | struct ccnd_handle * | ) |
Definition at line 409 of file ccnd_internal_client.c.
Referenced by ccnd_create(), and ccnd_internal_client_start().
int ccnd_internal_client_start | ( | struct ccnd_handle * | ) |
void ccnd_internal_client_stop | ( | struct ccnd_handle * | ) |
void ccnd_meter_bump | ( | struct ccnd_handle * | h, | |
struct ccnd_meter * | m, | |||
unsigned | amt | |||
) |
Count something (messages, packets, bytes), and roll up some kind of statistics on it.
Definition at line 647 of file ccnd_stats.c.
Referenced by ccn_stuff_interest(), ccnd_meter_init(), ccnd_meter_rate(), ccnd_send(), do_propagate(), process_incoming_content(), process_incoming_interest(), process_input(), process_internal_client_buffer(), send_content(), and stuff_link_check().
struct ccnd_meter* ccnd_meter_create | ( | struct ccnd_handle * | h, | |
const char * | what | |||
) | [read] |
create and initialize separately allocated meter.
Definition at line 604 of file ccnd_stats.c.
Referenced by enroll_face().
void ccnd_meter_destroy | ( | struct ccnd_meter ** | ) |
Destroy a separately allocated meter.
Definition at line 618 of file ccnd_stats.c.
Referenced by finalize_face().
void ccnd_meter_init | ( | struct ccnd_handle * | h, | |
struct ccnd_meter * | m, | |||
const char * | what | |||
) |
unsigned ccnd_meter_rate | ( | struct ccnd_handle * | h, | |
struct ccnd_meter * | m | |||
) |
Return the average rate (units per second) of a metered quantity.
m may be NULL.
Definition at line 674 of file ccnd_stats.c.
Referenced by collect_face_meter_html(), and collect_meter_xml().
uintmax_t ccnd_meter_total | ( | struct ccnd_meter * | m | ) |
Return the grand total for a metered quantity.
m may be NULL.
Definition at line 691 of file ccnd_stats.c.
Referenced by collect_meter_xml().
void ccnd_msg | ( | struct ccnd_handle * | h, | |
const char * | fmt, | |||
... | ||||
) |
Copyright (C) 2009,2010 Palo Alto Research Center, Inc.
This work is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This work 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Logging support for ccnd, for Android platform Produce ccnd debug output to the Android log. Output is produced on stderr under the control of h->debug; prepends decimal timestamp and process identification. Caller should not supply newlines.
h | the ccnd handle | |
fmt | printf-like format string |
Output is produced via h->logger under the control of h->debug; prepends decimal timestamp and process identification. Caller should not supply newlines.
h | the ccnd handle | |
fmt | printf-like format string |
Definition at line 47 of file android_msg.c.
Referenced by accept_connection(), ccn_append_link_stuff(), ccnd_close_fd(), ccnd_collect_stats(), ccnd_create(), ccnd_debug_ccnb(), ccnd_getboundsocket(), ccnd_init_internal_keystore(), ccnd_listen_on_address(), ccnd_listen_on_wildcards(), ccnd_new_face_msg(), ccnd_parse_uri_list(), ccnd_req_destroyface(), ccnd_req_newface(), ccnd_run(), ccnd_send(), ccnd_setsockopt_v6only(), ccnd_start_notice(), ccnd_stats_http_set_debug(), check_comm_file(), content_sender(), create_local_listener(), do_deferred_write(), establish_min_recv_bufsize(), face_send_queue_insert(), finalize_content(), finalize_face(), get_outbound_faces(), handle_send_error(), main(), make_connection(), nameprefix_longest_match(), note_content_from(), process_incoming_content(), process_incoming_interest(), process_incoming_link_message(), process_input(), process_input_buffer(), process_input_message(), propagate_interest(), record_connection(), replan_propagation(), setup_multicast(), shutdown_client_fd(), start_ccnd(), and update_forward_to().
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().
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().
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().
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().
int ccnd_stats_handle_http_connection | ( | struct ccnd_handle * | , | |
struct face * | ||||
) |
const char* ccnd_usage_message |
CCND Usage message.
Definition at line 132 of file ccnd_msg.c.
Referenced by ccnd_usage(), and main().