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

Logging support for ccnr. More...

#include <stdio.h>
#include <sys/time.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <unistd.h>
#include <ccn/ccn.h>
#include <ccn/charbuf.h>
#include <ccn/uri.h>
#include "ccnr_private.h"
#include "ccnr_msg.h"

Functions

int ccnr_msg_level_from_string (const char *s)
void ccnr_msg (struct ccnr_handle *h, const char *fmt,...)
 Produce ccnr debug output.
void ccnr_debug_ccnb (struct ccnr_handle *h, int lineno, const char *msg, struct fdholder *fdholder, const unsigned char *ccnb, size_t ccnb_size)
 Produce a ccnr debug trace entry.

Variables

const char * ccnr_usage_message
 CCNR Usage message.


Detailed Description

Logging support for ccnr.

Part of ccnr - CCNx Repository Daemon.


Function Documentation

void ccnr_debug_ccnb ( struct ccnr_handle *  h,
int  lineno,
const char *  msg,
struct fdholder *  fdholder,
const unsigned char *  ccnb,
size_t  ccnb_size 
)

Produce a ccnr debug trace entry.

Output is produced by calling ccnr_msg.

Parameters:
h the ccnr handle
lineno caller's source line number (usually __LINE__)
msg a short text tag to identify the entry
fdholder handle of associated fdholder; may be NULL
ccnb points to ccnb-encoded Interest or ContentObject
ccnb_size is in bytes

void ccnr_msg ( struct ccnr_handle *  h,
const char *  fmt,
  ... 
)

Produce ccnr 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.

Parameters:
h the ccnr handle
fmt printf-like format string


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