Private definitions for ccnd - the CCNx daemon. More...
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 | ccn_strategy |
State for the strategy engine. More... | |
struct | ielinks |
struct | interest_entry |
The interest hash table is keyed by the interest message. More... | |
struct | pit_face_item |
Per-face PIT information. 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 | TYPICAL_NONCE_SIZE 12 |
actual allocated size may differ | |
#define | CCND_PFI_NONCESZ 0x00FF |
Mask for actual nonce size. | |
#define | CCND_PFI_UPSTREAM 0x0100 |
Tracks upstream (sent interest). | |
#define | CCND_PFI_UPENDING 0x0200 |
Has been sent upstream. | |
#define | CCND_PFI_SENDUPST 0x0400 |
Should be sent upstream. | |
#define | CCND_PFI_UPHUNGRY 0x0800 |
Upstream hungry, cupboard bare. | |
#define | CCND_PFI_DNSTREAM 0x1000 |
Tracks downstream (recvd interest). | |
#define | CCND_PFI_PENDING 0x2000 |
Pending for immediate data. | |
#define | CCND_PFI_SUPDATA 0x4000 |
Suppressed data reply. | |
#define | CCND_PFI_DCFACE 0x10000 |
This upstream is a DC face. | |
#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 uint32_t | ccn_wrappedtime |
Used for keeping track of interest expiry. | |
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 *,...) |
Produce ccnd debug output. | |
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. |
Private definitions for ccnd - the CCNx daemon.
Data structures are described here so that logging and status routines can be compiled separately.
Part of ccnd - the CCNx Daemon.
Copyright (C) 2008-2012 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 277 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 275 of file ccnd_private.h.
Referenced by choose_content_delay_class(), and process_incoming_content().
#define CCN_CONTENT_ENTRY_STALE 2 |
Definition at line 276 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 242 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 240 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 236 of file ccnd_private.h.
Referenced by ccnd_reg_prefix(), do_propagate(), and get_outbound_faces().
#define CCN_FACE_DGRAM (1 << 1) |
Datagram interface, respect packets.
Definition at line 230 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 231 of file ccnd_private.h.
Referenced by 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(), drop_nonlocal_interest(), get_dgram_source(), get_outbound_faces(), init_face_flags(), match_interests(), process_incoming_content(), process_incoming_interest(), process_input_message(), register_new_face(), stuff_link_check(), and update_npe_children().
#define CCN_FACE_INET (1 << 4) |
IPv4.
Definition at line 233 of file ccnd_private.h.
Referenced by init_face_flags(), and post_face_notice().
#define CCN_FACE_INET6 (1 << 6) |
IPv6.
Definition at line 235 of file ccnd_private.h.
Referenced by init_face_flags(), and post_face_notice().
#define CCN_FACE_LC (1 << 19) |
Definition at line 248 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 229 of file ccnd_private.h.
Referenced by 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 232 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 241 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 234 of file ccnd_private.h.
Referenced by 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 244 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 237 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 243 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 239 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 245 of file ccnd_private.h.
Referenced by ccnd_req_prefix_or_self_reg().
#define CCN_FACE_SEQOK (1 << 17) |
Definition at line 246 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 247 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 238 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 406 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 407 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 413 of file ccnd_private.h.
Referenced by age_forwarding(), and age_forwarding_needed().
#define CCN_NOFACEID (~0U) |
Definition at line 249 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_seek(), note_content_from(), record_connection(), sending_fd(), shutdown_client_fd(), strategy_callout(), and update_forward_to().
#define CCND_PFI_DCFACE 0x10000 |
This upstream is a DC face.
Definition at line 349 of file ccnd_private.h.
Referenced by do_propagate().
#define CCND_PFI_DNSTREAM 0x1000 |
Tracks downstream (recvd interest).
Definition at line 346 of file ccnd_private.h.
Referenced by do_propagate(), propagate_interest(), strategy_callout(), and update_npe_children().
#define CCND_PFI_NONCESZ 0x00FF |
Mask for actual nonce size.
Definition at line 341 of file ccnd_private.h.
Referenced by pfi_copy_nonce(), pfi_create(), pfi_nonce_matches(), pfi_set_nonce(), pfi_unique_nonce(), and send_interest().
#define CCND_PFI_PENDING 0x2000 |
Pending for immediate data.
Definition at line 347 of file ccnd_private.h.
Referenced by ccnd_collect_stats(), consume_matching_interests(), do_propagate(), finalize_interest(), is_pending_on(), pfi_destroy(), propagate_interest(), and strategy_callout().
#define CCND_PFI_SENDUPST 0x0400 |
Should be sent upstream.
Definition at line 344 of file ccnd_private.h.
Referenced by send_interest(), and strategy_callout().
#define CCND_PFI_SUPDATA 0x4000 |
Suppressed data reply.
Definition at line 348 of file ccnd_private.h.
Referenced by propagate_interest().
#define CCND_PFI_UPENDING 0x0200 |
Has been sent upstream.
Definition at line 343 of file ccnd_private.h.
Referenced by send_interest(), and update_npe_children().
#define CCND_PFI_UPHUNGRY 0x0800 |
Upstream hungry, cupboard bare.
Definition at line 345 of file ccnd_private.h.
Referenced by do_propagate(), propagate_interest(), and send_interest().
#define CCND_PFI_UPSTREAM 0x0100 |
Tracks upstream (sent interest).
Definition at line 342 of file ccnd_private.h.
Referenced by do_propagate(), propagate_interest(), strategy_callout(), and update_npe_children().
#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 459 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 460 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 171 of file ccnd_private.h.
#define MAXFACES ((1U << FACESLOTBITS) - 1) |
Definition at line 172 of file ccnd_private.h.
Referenced by enroll_face(), face_from_faceid(), and finalize_face().
#define TYPICAL_NONCE_SIZE 12 |
actual allocated size may differ
Definition at line 324 of file ccnd_private.h.
Referenced by ccnd_debug_nonce(), pfi_create(), pfi_set_nonce(), and propagate_interest().
typedef unsigned ccn_accession_t |
Definition at line 60 of file ccnd_private.h.
typedef uint32_t ccn_wrappedtime |
Used for keeping track of interest expiry.
Modulo 2**32, time units and origin are abitrary and private.
Definition at line 70 of file ccnd_private.h.
typedef int(* ccnd_logger)(void *loggerdata, const char *format, va_list ap) |
Definition at line 72 of file ccnd_private.h.
Face meter index.
Definition at line 194 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 184 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 5455 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 91 of file ccnd_msg.c.
Referenced by age_forwarding(), ccnd_answer_req(), ccnd_reg_prefix(), ccnd_req_unreg(), do_propagate(), drop_nonlocal_interest(), face_send_queue_insert(), find_first_match_candidate(), mark_stale(), next_child_at_level(), process_incoming_content(), process_incoming_interest(), remove_content(), send_content(), set_content_timer(), strategy_callout(), stuff_and_send(), 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 1973 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 296 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 * | ) |
Definition at line 586 of file ccnd_internal_client.c.
Referenced by ccnd_create().
void ccnd_internal_client_stop | ( | struct ccnd_handle * | ) |
Definition at line 635 of file ccnd_internal_client.c.
Referenced by ccnd_destroy().
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 644 of file ccnd_stats.c.
Referenced by ccnd_meter_init(), ccnd_meter_rate(), ccnd_send(), process_incoming_content(), process_incoming_interest(), process_input(), process_internal_client_buffer(), send_content(), send_interest(), 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 601 of file ccnd_stats.c.
Referenced by enroll_face().
void ccnd_meter_destroy | ( | struct ccnd_meter ** | ) |
Destroy a separately allocated meter.
Definition at line 615 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 671 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 688 of file ccnd_stats.c.
Referenced by collect_meter_xml().
void ccnd_msg | ( | struct ccnd_handle * | h, | |
const char * | fmt, | |||
... | ||||
) |
Produce ccnd debug output.
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 45 of file ccnd_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(), ie_next_usec(), main(), make_connection(), note_content_from(), pfi_set_expiry_from_lifetime(), process_incoming_content(), process_incoming_interest(), process_incoming_link_message(), process_input(), process_input_buffer(), process_input_message(), record_connection(), 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 2423 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 |
Is is an error if the face does not exist.
Definition at line 2705 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 |
Is is permitted for the face to already exist. A newly created face will have no registered prefixes, and so will not receive any traffic.
Definition at line 2558 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 2862 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 2882 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 2902 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 5039 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 4903 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 * | ||||
) |
Definition at line 96 of file ccnd_stats.c.
Referenced by process_input().
const char* ccnd_usage_message |