/tilde/dkords/dev/repos/ccn-gatekeeper.git/ccnx-0.6.1/csrc/sync/SyncUtil.c File Reference

Part of CCNx Sync. More...

#include "SyncBase.h"
#include "SyncActions.h"
#include "SyncHashCache.h"
#include "SyncNode.h"
#include "SyncRoot.h"
#include "SyncUtil.h"
#include "IndexSorter.h"
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/time.h>
#include <ccnr/ccnr_msg.h>
#include <ccnr/ccnr_sync.h>
#include <ccn/ccn.h>
#include <ccn/charbuf.h>
#include <ccn/coding.h>
#include <ccn/indexbuf.h>
#include <ccn/uri.h>

Defines

#define SET_ERR(d)   SyncSetDecodeErr(d, -__LINE__)
#define UseLocalTopoPrefix   1

Functions

void SyncNoteErr (const char *msg)
int SyncSetDecodeErr (struct ccn_buf_decoder *d, int val)
int SyncCheckDecodeErr (struct ccn_buf_decoder *d)
int64_t SyncCurrentTime (void)
int64_t SyncDeltaTime (int64_t mt1, int64_t mt2)
struct ccn_buf_decoder * SyncInitDecoderFromCharbufRange (struct ccn_buf_decoder *d, const struct ccn_charbuf *cb, ssize_t start, ssize_t stop)
struct ccn_buf_decoder * SyncInitDecoderFromCharbuf (struct ccn_buf_decoder *d, const struct ccn_charbuf *cb, ssize_t start)
int SyncDecodeHexDigit (char c)
int SyncDecodeUriChar (char c)
char * SyncHexStr (const unsigned char *cp, size_t sz)
int SyncNoteFailed (struct SyncRootStruct *root, char *where, char *why, int line)
void SyncNoteSimple (struct SyncRootStruct *root, char *where, char *s1)
void SyncNoteSimple2 (struct SyncRootStruct *root, char *where, char *s1, char *s2)
void SyncNoteSimple3 (struct SyncRootStruct *root, char *where, char *s1, char *s2, char *s3)
void SyncNoteUri (struct SyncRootStruct *root, char *where, char *why, struct ccn_charbuf *name)
void SyncNoteUriBase (struct SyncBaseStruct *base, char *where, char *why, struct ccn_charbuf *name)
int SyncCmpNamesInner (struct ccn_buf_decoder *xx, struct ccn_buf_decoder *yy)
int SyncCmpNames (const struct ccn_charbuf *cbx, const struct ccn_charbuf *cby)
int SyncIsName (const struct ccn_charbuf *cb)
int SyncComponentCount (const struct ccn_charbuf *name)
int SyncPatternMatch (const struct ccn_charbuf *pattern, const struct ccn_charbuf *name, int start)
int SyncPrefixMatch (const struct ccn_charbuf *prefix, const struct ccn_charbuf *name, int start)
int SyncComponentMatch (const struct ccn_charbuf *x, const struct ccn_charbuf *y)
int SyncGetComponentPtr (const struct ccn_charbuf *src, int comp, const unsigned char **xp, ssize_t *xs)
int SyncAppendAllComponents (struct ccn_charbuf *dst, const struct ccn_charbuf *src)
struct ccn_charbuf * SyncNameForIndexbuf (const unsigned char *buf, struct ccn_indexbuf *comps)
struct ccn_charbuf * SyncUriForName (struct ccn_charbuf *name)
void SyncGetHashPtr (const struct ccn_buf_decoder *hd, const unsigned char **xp, ssize_t *xs)
ssize_t SyncCmpHashesRaw (const unsigned char *xp, ssize_t xs, const unsigned char *yp, ssize_t ys)
void SyncAccumHashRaw (struct SyncLongHashStruct *hp, const unsigned char *xp, size_t xs)
void SyncAccumHashInner (struct SyncLongHashStruct *hp, const struct ccn_buf_decoder *d)
void SyncAccumHash (struct SyncLongHashStruct *hp, const struct ccn_charbuf *cb)
struct ccn_charbuf * SyncLongHashToBuf (const struct SyncLongHashStruct *hp)
uint32_t SyncSmallHash (const unsigned char *xp, ssize_t xs)
int SyncAppendTaggedNumber (struct ccn_charbuf *cb, enum ccn_dtag dtag, unsigned val)
int SyncAppendRandomBytes (struct ccn_charbuf *cb, int n)
int SyncAppendRandomHash (struct ccn_charbuf *cb, int n)
int SyncAppendRandomName (struct ccn_charbuf *cb, int nComp, int maxCompLen)
int SyncAppendElementInner (struct ccn_charbuf *cb, struct ccn_buf_decoder *d)
int SyncAppendElement (struct ccn_charbuf *dst, const struct ccn_charbuf *src)
struct ccn_charbuf * SyncExtractName (struct ccn_buf_decoder *d)
struct ccn_charbuf * SyncCopyName (const struct ccn_charbuf *name)
unsigned SyncParseUnsigned (struct ccn_buf_decoder *d, enum ccn_dtag dtag)
ssize_t SyncParseHash (struct ccn_buf_decoder *d)
ssize_t SyncParseName (struct ccn_buf_decoder *d)
struct SyncNameAccum * SyncAllocNameAccum (int lim)
struct SyncNameAccum * SyncFreeNameAccum (struct SyncNameAccum *na)
struct SyncNameAccum * SyncFreeNameAccumAndNames (struct SyncNameAccum *na)
int SyncNameAccumSorter (IndexSorter_Base base, IndexSorter_Index x, IndexSorter_Index y)
int SyncNameAccumAppend (struct SyncNameAccum *na, struct ccn_charbuf *name, intmax_t data)
struct ccn_charbuf * SyncNameAccumCanon (struct SyncNameAccum *na, const struct ccn_charbuf *name)
struct SyncNodeAccum * SyncAllocNodeAccum (int lim)
struct SyncNodeAccum * SyncFreeNodeAccum (struct SyncNodeAccum *na)
void SyncAccumNode (struct SyncNodeAccum *na, struct SyncNodeComposite *nc)
static int appendLifetime (struct ccn_charbuf *cb, int lifetime)
static int appendExclusions (struct ccn_charbuf *cb, struct SyncNameAccum *excl)
struct ccn_charbuf * SyncGenInterest (struct ccn_charbuf *name, int scope, int lifetime, int maxSuffix, int childPref, struct SyncNameAccum *excl)
struct ccn_charbuf * SyncNameForLocalNode (struct SyncRootStruct *root, struct ccn_charbuf *hash)
int SyncPointerToContent (struct ccn_charbuf *cb, struct ccn_parsed_ContentObject *pco, const unsigned char **xp, size_t *xs)
struct ccn_charbuf * SyncSignBuf (struct SyncBaseStruct *base, struct ccn_charbuf *cb, struct ccn_charbuf *name, long fresh, int flags)
int SyncLocalRepoStore (struct SyncBaseStruct *base, struct ccn_charbuf *name, struct ccn_charbuf *content, int flags)
int SyncLocalRepoFetch (struct SyncBaseStruct *base, struct ccn_charbuf *name, struct ccn_charbuf *cb, struct ccn_parsed_ContentObject *pco)

Variables

static int freshLimit = 30

Detailed Description

Part of CCNx Sync.

Generated on Tue Aug 21 14:55:40 2012 for CCNx for Android by  doxygen 1.6.3