CCNx-Android-Services/jni/csrc/ccnr/ccnr_dispatch.c File Reference

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

#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <netdb.h>
#include <poll.h>
#include <signal.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <ccn/bloom.h>
#include <ccn/ccn.h>
#include <ccn/ccn_private.h>
#include <ccn/charbuf.h>
#include <ccn/face_mgmt.h>
#include <ccn/hashtb.h>
#include <ccn/indexbuf.h>
#include <ccn/schedule.h>
#include <ccn/reg_mgmt.h>
#include <ccn/uri.h>
#include <sync/SyncBase.h>
#include "ccnr_private.h"
#include "ccnr_dispatch.h"
#include "ccnr_forwarding.h"
#include "ccnr_io.h"
#include "ccnr_link.h"
#include "ccnr_match.h"
#include "ccnr_msg.h"
#include "ccnr_proto.h"
#include "ccnr_sendq.h"
#include "ccnr_stats.h"
#include "ccnr_store.h"
#include "ccnr_sync.h"
#include "ccnr_util.h"

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.


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.

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.


Generated on Thu Feb 16 00:45:12 2012 for CCNx for Android by  doxygen 1.5.6