diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-01 19:09:18 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-01 19:09:18 -0700 |
commit | 1f28ce398078eff39081ef25e7c1e234dd6f8fc2 (patch) | |
tree | 993a595474612d930a28a7a3d5b1a6675748db2d /include | |
parent | 49349470a059a54177b0831ea256492d9b30712f (diff) | |
download | infinitytier-1f28ce398078eff39081ef25e7c1e234dd6f8fc2.tar.gz infinitytier-1f28ce398078eff39081ef25e7c1e234dd6f8fc2.zip |
Tons more refactoring: simplify Network, move explicit management of Tap out, redo COM serialization, etc.
Diffstat (limited to 'include')
-rw-r--r-- | include/ZeroTierOne.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h index e4a0996d..f7e95296 100644 --- a/include/ZeroTierOne.h +++ b/include/ZeroTierOne.h @@ -526,14 +526,19 @@ typedef long (*ZT1_DataStoreGetFunction)(ZT1_Node *,const char *,void *,unsigned /** * Function to store an object in the data store * - * Parameters: (1) node, (2) object name, (3) object data, (4) object size. + * Parameters: (1) node, (2) object name, (3) object data, (4) object size, + * and (5) secure? (bool). If secure is true, the file should be set readable + * and writable only to the user running ZeroTier One. What this means is + * platform-specific. + * * Name semantics are the same as the get function. This must return zero on * success. You can return any OS-specific error code on failure, as these * may be visible in logs or error messages and might aid in debugging. * - * A call to write 0 bytes can safely be interpreted as a delete operation. + * A call to write 0 bytes with a null data pointer should be interpreted + * as a delete operation. The secure flag is not meaningful in this case. */ -typedef int (*ZT1_DataStorePutFunction)(ZT1_Node *,const char *,const void *,unsigned long); +typedef int (*ZT1_DataStorePutFunction)(ZT1_Node *,const char *,const void *,unsigned long,int); /** * Function to send a ZeroTier packet out over the wire @@ -570,6 +575,7 @@ typedef void (*ZT1_VirtualNetworkFrameFunction)(ZT1_Node *,uint64_t,uint64_t,uin * will generate an identity. * * @param node Result: pointer is set to new node instance on success + * @param now Current clock in milliseconds * @param dataStoreGetFunction Function called to get objects from persistent storage * @param dataStorePutFunction Function called to put objects in persistent storage * @param virtualNetworkConfigCallback Function to be called when virtual LANs are created, deleted, or their config parameters change @@ -578,6 +584,7 @@ typedef void (*ZT1_VirtualNetworkFrameFunction)(ZT1_Node *,uint64_t,uint64_t,uin */ enum ZT1_ResultCode ZT1_Node_new( ZT1_Node **node, + uint64_t now, ZT1_DataStoreGetFunction *dataStoreGetFunction, ZT1_DataStorePutFunction *dataStorePutFunction, ZT1_WirePacketSendFunction *wirePacketSendFunction, @@ -644,7 +651,7 @@ enum ZT1_ResultCode ZT1_Node_processVirtualNetworkFrame( * @param nextCallDeadline Result: set to deadline for next call to one of the three processXXX() methods * @return OK (0) or error code if a fatal error condition has occurred */ -enum ZT1_Resultcode ZT1_Node_processNothing(ZT1_Node *node,uint64_t now,uint64_t *nextCallDeadline); +enum ZT1_ResultCode ZT1_Node_processNothing(ZT1_Node *node,uint64_t now,uint64_t *nextCallDeadline); /** * Join a network |