Go to the source code of this file.
Defines | |
#define | SET_ERR(d) SyncSetDecodeErr(d, -__LINE__) |
Functions | |
void | SyncNoteErr (const char *msg) |
int | SyncSetDecodeErr (struct ccn_buf_decoder *d, int val) |
int | SyncCheckDecodeErr (struct ccn_buf_decoder *d) |
sync_time | SyncCurrentTime (void) |
int64_t | SyncDeltaTime (sync_time mt1, sync_time 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) |
compare two names advances both decoders, but early exit may leave them not fully over the names decoder error flags may be useful, though, if any errors occur | |
int | SyncCmpNames (const struct ccn_charbuf *cbx, const struct ccn_charbuf *cby) |
int | SyncIsName (const struct ccn_charbuf *cb) |
tests to see if charbuf refers to a name | |
int | SyncComponentCount (const struct ccn_charbuf *name) |
int | SyncPatternMatch (const struct ccn_charbuf *pattern, const struct ccn_charbuf *name, int start) |
simple pattern matching, where the pattern may contain components with a single 255 byte to match a single name component | |
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) |
finds the bytes for a component (not including the tag) src must be a name, comp the component index | |
int | SyncAppendAllComponents (struct ccn_charbuf *dst, const struct ccn_charbuf *src) |
appends components from src to dst (both must be names) | |
struct ccn_charbuf * | SyncNameForIndexbuf (const unsigned char *buf, struct ccn_indexbuf *comps) |
Convenience routine to make a name from a ccn_indexbuf. | |
struct ccn_charbuf * | SyncUriForName (struct ccn_charbuf *name) |
Convenience routine to make a uri for a name. | |
void | SyncGetHashPtr (const struct ccn_buf_decoder *hd, const unsigned char **xp, ssize_t *xs) |
finds the hash code, storing the pointer to *xp and the length to *xs if the hash is valid (test for *xs != 0 to be sure) a hash code may be a ContentHash, or the last component of a Name (for convenience, a Component may also be used) non-destructive to the decoder no error codes, but a pointer is set only for valid cases | |
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) |
frees the name accum, but not the names | |
struct SyncNameAccum * | SyncFreeNameAccumAndNames (struct SyncNameAccum *na) |
frees the name accum and all of the names | |
int | SyncNameAccumSorter (IndexSorter_Base base, IndexSorter_Index x, IndexSorter_Index y) |
default sorter callback for a name accum uses CCN standard name order | |
int | SyncNameAccumAppend (struct SyncNameAccum *na, struct ccn_charbuf *name, intmax_t data) |
appends a new name with associated data important: the name is not copied! | |
struct ccn_charbuf * | SyncNameAccumCanon (struct SyncNameAccum *na, const struct ccn_charbuf *name) |
canonicalizes a name with respect to the given name accum should be used for relatively small canon sets | |
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) |
given a spec for the desired fields (scope, lifetime, maxSuffix, child are omitted if negative) | |
struct ccn_charbuf * | SyncNameForLocalNode (struct SyncRootStruct *root, struct ccn_charbuf *hash) |
given a sync node hash, | |
int | SyncPointerToContent (struct ccn_charbuf *cb, struct ccn_parsed_ContentObject *pco, const unsigned char **xp, size_t *xs) |
given a charbuf cb for a content object, with optional parsing offsets in pco, sets *xp and *xs with the pointer and length of the actual content bytes | |
struct ccn_charbuf * | SyncSignBuf (struct SyncBaseStruct *base, struct ccn_charbuf *cb, struct ccn_charbuf *name, long fresh, int flags) |
given a charbuf cb and name for a content object, signs the bytes and | |
int | SyncLocalRepoStore (struct SyncBaseStruct *base, struct ccn_charbuf *name, struct ccn_charbuf *content, int flags) |
given a sync node hash, | |
int | SyncLocalRepoFetch (struct SyncBaseStruct *base, struct ccn_charbuf *name, struct ccn_charbuf *cb, struct ccn_parsed_ContentObject *pco) |
given a local repo name and a buffer to fill, fills cb with the content object (note: not the content itself) pco is filled as a useful side effect, but may be NULL | |
Variables | |
static int | freshLimit = 30 |
Copyright (C) 2011 Palo Alto Research Center, Inc.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Definition in file SyncUtil.c.
#define SET_ERR | ( | d | ) | SyncSetDecodeErr(d, -__LINE__) |
Definition at line 43 of file SyncUtil.c.
Referenced by SyncCmpNamesInner(), SyncInitDecoderFromCharbufRange(), SyncParseName(), and SyncParseUnsigned().
static int appendExclusions | ( | struct ccn_charbuf * | cb, | |
struct SyncNameAccum * | excl | |||
) | [static] |
static int appendLifetime | ( | struct ccn_charbuf * | cb, | |
int | lifetime | |||
) | [static] |
void SyncAccumHash | ( | struct SyncLongHashStruct * | hp, | |
const struct ccn_charbuf * | cb | |||
) |
Definition at line 619 of file SyncUtil.c.
Referenced by MakeNodeFromNames(), SyncNodeAddName(), and testReadBuilder().
void SyncAccumHashInner | ( | struct SyncLongHashStruct * | hp, | |
const struct ccn_buf_decoder * | d | |||
) |
void SyncAccumHashRaw | ( | struct SyncLongHashStruct * | hp, | |
const unsigned char * | xp, | |||
size_t | xs | |||
) |
void SyncAccumNode | ( | struct SyncNodeAccum * | na, | |
struct SyncNodeComposite * | nc | |||
) |
struct SyncNameAccum* SyncAllocNameAccum | ( | int | lim | ) | [read] |
Definition at line 831 of file SyncUtil.c.
Referenced by addNameFromCompare(), copyFilter(), exclusionsFromHashList(), readAndAccumNames(), sortNames(), SyncAddRoot(), SyncNewBase(), SyncRootDecodeAndAdd(), SyncUpdateRoot(), testRootBasic(), and UpdateAction().
struct SyncNodeAccum* SyncAllocNodeAccum | ( | int | lim | ) | [read] |
int SyncAppendAllComponents | ( | struct ccn_charbuf * | dst, | |
const struct ccn_charbuf * | src | |||
) |
appends components from src to dst (both must be names)
the number of components copied otherwise
Definition at line 466 of file SyncUtil.c.
Referenced by constructCommandPrefix(), and existingRootOp().
int SyncAppendElement | ( | struct ccn_charbuf * | dst, | |
const struct ccn_charbuf * | src | |||
) |
int SyncAppendElementInner | ( | struct ccn_charbuf * | cb, | |
struct ccn_buf_decoder * | d | |||
) |
Definition at line 717 of file SyncUtil.c.
Referenced by extractBuf(), printTreeInner(), SyncAppendElement(), SyncExtractName(), and SyncTreeGenerateNames().
int SyncAppendRandomBytes | ( | struct ccn_charbuf * | cb, | |
int | n | |||
) |
Definition at line 664 of file SyncUtil.c.
Referenced by SyncAppendRandomHash(), and SyncAppendRandomName().
int SyncAppendRandomHash | ( | struct ccn_charbuf * | cb, | |
int | n | |||
) |
Definition at line 680 of file SyncUtil.c.
int SyncAppendRandomName | ( | struct ccn_charbuf * | cb, | |
int | nComp, | |||
int | maxCompLen | |||
) |
int SyncAppendTaggedNumber | ( | struct ccn_charbuf * | cb, | |
enum ccn_dtag | dtag, | |||
unsigned | val | |||
) |
Definition at line 655 of file SyncUtil.c.
Referenced by sendSlice(), SyncEndComposite(), SyncResetComposite(), SyncRootAppendSlice(), and testRootBasic().
int SyncCheckDecodeErr | ( | struct ccn_buf_decoder * | d | ) |
Definition at line 64 of file SyncUtil.c.
Referenced by SyncAppendAllComponents(), SyncAppendElementInner(), SyncCmpNames(), SyncCmpNamesInner(), SyncComponentCount(), SyncComponentMatch(), SyncGetComponentPtr(), SyncGetHashPtr(), SyncIsName(), SyncParseComposite(), SyncParseUnsigned(), SyncPatternMatch(), SyncPrefixMatch(), and SyncRootDecodeAndAdd().
ssize_t SyncCmpHashesRaw | ( | const unsigned char * | xp, | |
ssize_t | xs, | |||
const unsigned char * | yp, | |||
ssize_t | ys | |||
) |
int SyncCmpNames | ( | const struct ccn_charbuf * | cbx, | |
const struct ccn_charbuf * | cby | |||
) |
Definition at line 225 of file SyncUtil.c.
Referenced by canonFilter(), doComparison(), sortNames(), SyncAddName(), SyncNameAccumCanon(), SyncNameAccumSorter(), SyncNodeCompareMinMax(), SyncNodeMaintainMinMax(), SyncTreeMergeNames(), and testReader().
int SyncCmpNamesInner | ( | struct ccn_buf_decoder * | xx, | |
struct ccn_buf_decoder * | yy | |||
) |
compare two names advances both decoders, but early exit may leave them not fully over the names decoder error flags may be useful, though, if any errors occur
Definition at line 183 of file SyncUtil.c.
Referenced by SyncCmpNames(), and SyncNodeCompareLeaf().
int SyncComponentCount | ( | const struct ccn_charbuf * | name | ) |
Definition at line 247 of file SyncUtil.c.
Referenced by SyncRegisterInterest(), SyncRootLookupName(), SyncSendRootAdviseInterest(), and SyncStartNodeFetch().
int SyncComponentMatch | ( | const struct ccn_charbuf * | x, | |
const struct ccn_charbuf * | y | |||
) |
-1 if there is a parsing error
Definition at line 405 of file SyncUtil.c.
Referenced by TryNodeSplit().
struct ccn_charbuf* SyncCopyName | ( | const struct ccn_charbuf * | name | ) | [read] |
Definition at line 779 of file SyncUtil.c.
Referenced by addNameFromCompare(), AddUpdateName(), fetchStablePoint(), storeHandler(), storeStablePoint(), SyncAddName(), and SyncInterestArrived().
sync_time SyncCurrentTime | ( | void | ) |
Definition at line 69 of file SyncUtil.c.
Referenced by chooseRemoteHash(), CompareAction(), formatStats(), HeartbeatAction(), newActionData(), noteRemoteHash(), purgeOldEntries(), SyncAddRoot(), SyncHashEnter(), SyncNewBase(), SyncRemoteFetchResponse(), SyncRootAdviseResponse(), SyncSendRootAdviseInterest(), SyncStartCompareAction(), SyncTreeMergeNames(), SyncUpdateRoot(), testReader(), and UpdateAction().
int SyncDecodeHexDigit | ( | char | c | ) |
int SyncDecodeUriChar | ( | char | c | ) |
Definition at line 77 of file SyncUtil.c.
Referenced by chooseRemoteHash(), CompareAction(), formatStats(), HeartbeatAction(), purgeOldEntries(), SyncRemoteFetchResponse(), SyncRootAdviseResponse(), SyncTreeMergeNames(), testReader(), and UpdateAction().
struct ccn_charbuf* SyncExtractName | ( | struct ccn_buf_decoder * | d | ) | [read] |
Definition at line 763 of file SyncUtil.c.
Referenced by SyncParseComposite(), and SyncRootDecodeAndAdd().
struct SyncNameAccum* SyncFreeNameAccum | ( | struct SyncNameAccum * | na | ) | [read] |
frees the name accum, but not the names
Definition at line 840 of file SyncUtil.c.
Referenced by exclusionsFromHashList(), testReadBuilder(), testReader(), and testRootBasic().
struct SyncNameAccum* SyncFreeNameAccumAndNames | ( | struct SyncNameAccum * | na | ) | [read] |
frees the name accum and all of the names
Definition at line 849 of file SyncUtil.c.
Referenced by destroyCompareData(), SyncFreeBase(), SyncRemRoot(), SyncRootDecodeAndAdd(), SyncSendRootAdviseInterest(), SyncStartCompareAction(), and UpdateAction().
struct SyncNodeAccum* SyncFreeNodeAccum | ( | struct SyncNodeAccum * | na | ) | [read] |
struct ccn_charbuf* SyncGenInterest | ( | struct ccn_charbuf * | name, | |
int | scope, | |||
int | lifetime, | |||
int | maxSuffix, | |||
int | childPref, | |||
struct SyncNameAccum * | excl | |||
) | [read] |
given a spec for the desired fields (scope, lifetime, maxSuffix, child are omitted if negative)
Definition at line 1020 of file SyncUtil.c.
Referenced by existingRootOp(), fetchStablePoint(), getFile(), putFile(), SyncHandleSlice(), SyncLocalRepoFetch(), SyncSendRootAdviseInterest(), SyncStartContentFetch(), SyncStartHeartbeat(), SyncStartNodeFetch(), and SyncStartSliceEnum().
int SyncGetComponentPtr | ( | const struct ccn_charbuf * | src, | |
int | comp, | |||
const unsigned char ** | xp, | |||
ssize_t * | xs | |||
) |
finds the bytes for a component (not including the tag) src must be a name, comp the component index
Definition at line 442 of file SyncUtil.c.
Referenced by SyncHandleSlice().
void SyncGetHashPtr | ( | const struct ccn_buf_decoder * | hd, | |
const unsigned char ** | xp, | |||
ssize_t * | xs | |||
) |
finds the hash code, storing the pointer to *xp and the length to *xs if the hash is valid (test for *xs != 0 to be sure) a hash code may be a ContentHash, or the last component of a Name (for convenience, a Component may also be used) non-destructive to the decoder no error codes, but a pointer is set only for valid cases
Definition at line 529 of file SyncUtil.c.
Referenced by cacheEntryForElem(), SyncAccumHashInner(), and SyncTreeWorkerPush().
char* SyncHexStr | ( | const unsigned char * | cp, | |
size_t | sz | |||
) |
Definition at line 123 of file SyncUtil.c.
Referenced by abortCompare(), findAndDeleteRoot(), formatStats(), MakeNodeFromNames(), newNodeCommon(), noteRemoteHash(), printTreeInner(), purgeOldEntries(), reportExclude(), setCovered(), SyncHandleSlice(), SyncInterestArrived(), SyncRegisterInterests(), SyncRemoteFetchResponse(), SyncRootAdviseResponse(), SyncStartCompareAction(), SyncStartNodeFetch(), SyncUpdateRoot(), testReadBuilder(), and UpdateAction().
struct ccn_buf_decoder* SyncInitDecoderFromCharbuf | ( | struct ccn_buf_decoder * | d, | |
const struct ccn_charbuf * | cb, | |||
ssize_t | start | |||
) | [read] |
Definition at line 96 of file SyncUtil.c.
Referenced by appendExclusions(), SyncAccumHash(), SyncAppendAllComponents(), SyncAppendElement(), SyncCmpNames(), SyncComponentCount(), SyncComponentMatch(), SyncGetComponentPtr(), SyncIsName(), SyncNodeCompareLeaf(), SyncPatternMatch(), SyncPrefixMatch(), testEncodeDecode(), and testRootCoding().
struct ccn_buf_decoder* SyncInitDecoderFromCharbufRange | ( | struct ccn_buf_decoder * | d, | |
const struct ccn_charbuf * | cb, | |||
ssize_t | start, | |||
ssize_t | stop | |||
) | [read] |
Definition at line 82 of file SyncUtil.c.
Referenced by SyncInitDecoderFromCharbuf(), SyncInitDecoderFromElem(), SyncInitDecoderFromOffset(), and SyncNodeAddNode().
int SyncIsName | ( | const struct ccn_charbuf * | cb | ) |
tests to see if charbuf refers to a name
Definition at line 238 of file SyncUtil.c.
int SyncLocalRepoFetch | ( | struct SyncBaseStruct * | base, | |
struct ccn_charbuf * | name, | |||
struct ccn_charbuf * | cb, | |||
struct ccn_parsed_ContentObject * | pco | |||
) |
given a local repo name and a buffer to fill, fills cb with the content object (note: not the content itself) pco is filled as a useful side effect, but may be NULL
Definition at line 1154 of file SyncUtil.c.
Referenced by SyncCacheEntryFetch().
int SyncLocalRepoStore | ( | struct SyncBaseStruct * | base, | |
struct ccn_charbuf * | name, | |||
struct ccn_charbuf * | content, | |||
int | flags | |||
) |
given a sync node hash,
Definition at line 1132 of file SyncUtil.c.
Referenced by SyncCacheEntryStore().
struct ccn_charbuf* SyncLongHashToBuf | ( | const struct SyncLongHashStruct * | hp | ) | [read] |
Definition at line 626 of file SyncUtil.c.
Referenced by SyncEndComposite(), SyncParseComposite(), testReadBuilder(), and UpdateAction().
int SyncNameAccumAppend | ( | struct SyncNameAccum * | na, | |
struct ccn_charbuf * | name, | |||
intmax_t | data | |||
) |
appends a new name with associated data important: the name is not copied!
Definition at line 884 of file SyncUtil.c.
Referenced by addNameFromCompare(), AddUpdateName(), exclusionsFromHashList(), parseAndAccumName(), sortNames(), SyncAddName(), SyncNameAccumCanon(), SyncRootDecodeAndAdd(), SyncTreeGenerateNames(), and testRootBasic().
struct ccn_charbuf* SyncNameAccumCanon | ( | struct SyncNameAccum * | na, | |
const struct ccn_charbuf * | name | |||
) | [read] |
canonicalizes a name with respect to the given name accum should be used for relatively small canon sets
a copy of the name (and enters it) if no equal name was in the accum
Definition at line 909 of file SyncUtil.c.
Referenced by SyncAddRoot().
int SyncNameAccumSorter | ( | IndexSorter_Base | base, | |
IndexSorter_Index | x, | |||
IndexSorter_Index | y | |||
) |
default sorter callback for a name accum uses CCN standard name order
Definition at line 869 of file SyncUtil.c.
Referenced by sortNames(), SyncUpdateRoot(), and testReader().
struct ccn_charbuf* SyncNameForIndexbuf | ( | const unsigned char * | buf, | |
struct ccn_indexbuf * | comps | |||
) | [read] |
Convenience routine to make a name from a ccn_indexbuf.
The storage for the returned charbuf is owned by the caller.
Definition at line 495 of file SyncUtil.c.
Referenced by SyncRootAdviseResponse().
struct ccn_charbuf* SyncNameForLocalNode | ( | struct SyncRootStruct * | root, | |
struct ccn_charbuf * | hash | |||
) | [read] |
given a sync node hash,
Definition at line 1054 of file SyncUtil.c.
Referenced by SyncCacheEntryFetch(), and SyncCacheEntryStore().
void SyncNoteErr | ( | const char * | msg | ) |
Definition at line 45 of file SyncUtil.c.
Referenced by SyncAccumHashRaw(), SyncNameAccumAppend(), SyncNameAccumSorter(), SyncNameForIndexbuf(), SyncNoteFailed(), SyncSetCompErr(), and SyncSetDecodeErr().
int SyncNoteFailed | ( | struct SyncRootStruct * | root, | |
char * | where, | |||
char * | why, | |||
int | line | |||
) |
Definition at line 139 of file SyncUtil.c.
Referenced by cacheEntryForElem(), comparisonFailed(), ensureRemoteEntry(), extractNode(), newNodeCommon(), nodeFromNodes(), sortNames(), SyncHandleSlice(), SyncRegisterInterest(), SyncRemoteFetchResponse(), SyncRootAdviseResponse(), SyncStartCompareAction(), SyncStartContentFetch(), SyncStartNodeFetch(), and UpdateAction().
void SyncNoteSimple | ( | struct SyncRootStruct * | root, | |
char * | where, | |||
char * | s1 | |||
) |
Definition at line 148 of file SyncUtil.c.
Referenced by abortCompare(), CompareAction(), HeartbeatAction(), MakeNodeFromNames(), purgeOldEntries(), reportExclude(), setCovered(), SyncNotifyContent(), SyncRemoteFetchResponse(), SyncRootAdviseResponse(), SyncSendRootAdviseInterest(), SyncTreeMergeNames(), TryNodeSplit(), and UpdateAction().
void SyncNoteSimple2 | ( | struct SyncRootStruct * | root, | |
char * | where, | |||
char * | s1, | |||
char * | s2 | |||
) |
Definition at line 153 of file SyncUtil.c.
Referenced by CompareAction(), MakeNodeFromNames(), newNodeCommon(), SyncHandleSlice(), SyncInterestArrived(), SyncRemoteFetchResponse(), SyncRootAdviseResponse(), SyncStartNodeFetch(), TryNodeSplit(), and UpdateAction().
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 | |||
) |
Definition at line 163 of file SyncUtil.c.
Referenced by addNameFromCompare(), SyncAddName(), SyncCacheEntryFetch(), SyncInterestArrived(), SyncRegisterInterest(), SyncRemoteFetchResponse(), SyncRootAdviseResponse(), SyncSendRootAdviseInterest(), SyncStartContentFetch(), SyncStartSliceEnum(), SyncTreeMergeNames(), and UpdateAction().
void SyncNoteUriBase | ( | struct SyncBaseStruct * | base, | |
char * | where, | |||
char * | why, | |||
struct ccn_charbuf * | name | |||
) |
Definition at line 171 of file SyncUtil.c.
Referenced by SyncLocalRepoFetch(), and SyncLocalRepoStore().
ssize_t SyncParseHash | ( | struct ccn_buf_decoder * | d | ) |
ssize_t SyncParseName | ( | struct ccn_buf_decoder * | d | ) |
unsigned SyncParseUnsigned | ( | struct ccn_buf_decoder * | d, | |
enum ccn_dtag | dtag | |||
) |
Definition at line 790 of file SyncUtil.c.
Referenced by SyncParseComposite(), SyncRootDecodeAndAdd(), and testRootBasic().
int SyncPatternMatch | ( | const struct ccn_charbuf * | pattern, | |
const struct ccn_charbuf * | name, | |||
int | start | |||
) |
simple pattern matching, where the pattern may contain components with a single 255 byte to match a single name component
-1 if there is a parsing error or no match
Definition at line 269 of file SyncUtil.c.
Referenced by SyncRootLookupName().
int SyncPointerToContent | ( | struct ccn_charbuf * | cb, | |
struct ccn_parsed_ContentObject * | pco, | |||
const unsigned char ** | xp, | |||
size_t * | xs | |||
) |
given a charbuf cb for a content object, with optional parsing offsets in pco, sets *xp and *xs with the pointer and length of the actual content bytes
Definition at line 1070 of file SyncUtil.c.
Referenced by existingRootOp(), fetchStablePoint(), and SyncHandleSlice().
int SyncPrefixMatch | ( | const struct ccn_charbuf * | prefix, | |
const struct ccn_charbuf * | name, | |||
int | start | |||
) |
-1 if there is a parsing error or no match
Definition at line 344 of file SyncUtil.c.
Referenced by SyncHandleSlice(), SyncNotifyContent(), and SyncRootLookupName().
int SyncSetDecodeErr | ( | struct ccn_buf_decoder * | d, | |
int | val | |||
) |
struct ccn_charbuf* SyncSignBuf | ( | struct SyncBaseStruct * | base, | |
struct ccn_charbuf * | cb, | |||
struct ccn_charbuf * | name, | |||
long | fresh, | |||
int | flags | |||
) | [read] |
given a charbuf cb and name for a content object, signs the bytes and
Definition at line 1087 of file SyncUtil.c.
Referenced by storeStablePoint(), SyncInterestArrived(), and SyncLocalRepoStore().
uint32_t SyncSmallHash | ( | const unsigned char * | xp, | |
ssize_t | xs | |||
) |
struct ccn_charbuf* SyncUriForName | ( | struct ccn_charbuf * | name | ) | [read] |
Convenience routine to make a uri for a name.
The storage for the returned charbuf is owned by the caller.
Definition at line 518 of file SyncUtil.c.
Referenced by existingRootOp(), sendSlice(), SyncNoteUri(), SyncNoteUriBase(), SyncNotifyContent(), and SyncRegisterInterests().
int freshLimit = 30 [static] |