ccnr_dispatch.c File Reference

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

Go to the source code of this file.

Functions

static void process_input_message (struct ccnr_handle *h, struct fdholder *fdholder, unsigned char *msg, size_t size, int pdu_ok, off_t *offsetp)
static void process_input_buffer (struct ccnr_handle *h, struct fdholder *fdholder)
 Break up data in a face's input buffer buffer into individual messages, and call process_input_message on each one.
PUBLIC void r_dispatch_process_input (struct ccnr_handle *h, int fd)
 Process the input from a socket or file.
PUBLIC void r_dispatch_process_internal_client_buffer (struct ccnr_handle *h)
PUBLIC void r_dispatch_run (struct ccnr_handle *h)
 Run the main loop of the ccnr.


Detailed Description

Part of ccnr - CCNx Repository Daemon.

Definition in file ccnr_dispatch.c.


Function Documentation

static void process_input_buffer ( struct ccnr_handle h,
struct fdholder fdholder 
) [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 fdholder 0.

Definition at line 126 of file ccnr_dispatch.c.

static void process_input_message ( struct ccnr_handle h,
struct fdholder fdholder,
unsigned char *  msg,
size_t  size,
int  pdu_ok,
off_t *  offsetp 
) [static]

Definition at line 74 of file ccnr_dispatch.c.

PUBLIC void r_dispatch_process_input ( struct ccnr_handle h,
int  fd 
)

Process the input from a socket or file.

The fd has been found ready for input by the poll call. Decide what fdholder 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 162 of file ccnr_dispatch.c.

Referenced by r_dispatch_run(), and r_init_create().

PUBLIC void r_dispatch_process_internal_client_buffer ( struct ccnr_handle h  ) 

Definition at line 276 of file ccnr_dispatch.c.

Referenced by r_dispatch_run(), and r_io_send().

PUBLIC void r_dispatch_run ( struct ccnr_handle h  ) 

Run the main loop of the ccnr.

Definition at line 292 of file ccnr_dispatch.c.

Referenced by main(), and start_ccnr().


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