From d6f0f1a82ad78c033d2a772b3a1655b9c6c48e3c Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 12 Jan 2016 11:34:22 -0800 Subject: Use network user ptr in lookup for Ethernet frame handling to eliminate map lookup. --- include/ZeroTierOne.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h index e10b2c04..cfbecf16 100644 --- a/include/ZeroTierOne.h +++ b/include/ZeroTierOne.h @@ -981,7 +981,7 @@ typedef int (*ZT_VirtualNetworkConfigFunction)( ZT_Node *, /* Node */ void *, /* User ptr */ uint64_t, /* Network ID */ - void *, /* Network user ptr (set w/join) */ + void **, /* Modifiable network user PTR */ enum ZT_VirtualNetworkConfigOperation, /* Config operation */ const ZT_VirtualNetworkConfig *); /* Network configuration */ @@ -996,7 +996,7 @@ typedef void (*ZT_VirtualNetworkFrameFunction)( ZT_Node *, /* Node */ void *, /* User ptr */ uint64_t, /* Network ID */ - void *, /* Network user PTR (set w/join) */ + void **, /* Modifiable network user PTR */ uint64_t, /* Source MAC */ uint64_t, /* Destination MAC */ unsigned int, /* Ethernet type */ @@ -1247,10 +1247,10 @@ enum ZT_ResultCode ZT_Node_processBackgroundTasks(ZT_Node *node,uint64_t now,vol * * @param node Node instance * @param nwid 64-bit ZeroTier network ID - * @param uptr An arbitrary pointer to associate with this network + * @param uptr An arbitrary pointer to associate with this network (default: NULL) * @return OK (0) or error code if a fatal error condition has occurred */ -enum ZT_ResultCode ZT_Node_join(ZT_Node *node,uint64_t nwid,void *uptr); +enum ZT_ResultCode ZT_Node_join(ZT_Node *node,uint64_t nwid,void *uptr = (void *)0); /** * Leave a network -- cgit v1.2.3