mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-31 00:23:58 +00:00
Added implemenation for node.address()
Signed-off-by: Grant Limberg <glimberg@gmail.com>
This commit is contained in:
parent
3ccaef88b7
commit
34028aa7c8
@ -641,6 +641,24 @@ JNIEXPORT jobject JNICALL Java_com_zerotierone_sdk_Node_multicastUnsubscribe
|
||||
|
||||
/*
|
||||
* Class: com_zerotierone_sdk_Node
|
||||
* Method: address
|
||||
* Signature: (J)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_com_zerotierone_sdk_Node_address
|
||||
(JNIEnv *env , jobject obj, jlong id)
|
||||
{
|
||||
uint64_t nodeId = (uint64_t) id;
|
||||
ZT1_Node *node = findNode(nodeId);
|
||||
if(node == NULL)
|
||||
{
|
||||
// cannot find valid node. We should never get here.
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t address = ZT1_Node_address(node);
|
||||
return (jlong)address;
|
||||
}
|
||||
|
||||
* Method: version
|
||||
* Signature: (J)Lcom/zerotierone/sdk/Version;
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user