Adam Ierymenko
f69454ec98
(1) Make ZT_ naming convention consistent (get rid of ZT1_), (2) Make local interface a full sockaddr_storage instead of an int identifier, which turns out to be better for multi-homing and other uses.
11 years ago
Grant Limberg
fb0bf52b1b
Fixed sending a port number of 0 to ZT1.
...
Fixed VirtualNetworkConfigFunction (creating array to send to Java)
Fixed the creating InetAddress instead of InetSocketAddress in virtual network config callback
11 years ago
Grant Limberg
74f7d5377d
Enable ZT_TRACE and more verbose build output
11 years ago
Grant Limberg
5015c0ae78
more logging
11 years ago
Grant Limberg
b6196a53de
Fix DataStoreGetFunction.
11 years ago
Grant Limberg
58ca657da6
Use object arrays rather than ArrayList. JNI side
11 years ago
Grant Limberg
7822616966
Replace ArrayList instances with []
11 years ago
Grant Limberg
4c680e3126
LOTS more error checking and logging.
...
Running into a wall attempting to add items to an ArrayList from the JNI side
11 years ago
Grant Limberg
09631ad382
fix datastore get call in JNI
...
Just delete the local reference rather than do an array delete. Array delete was causing a crash on loading network config files. Deleting the local ref works fine, though, as it still lets the JVM garbage collecter know that the native code is done with the array
11 years ago
Grant Limberg
2d67196667
added the android verbose log level and moved most jni debug messages to verbose
11 years ago
Grant Limberg
9755dad7ff
add a missing break from a switch
11 years ago
Grant Limberg
adaf9cf32b
still getting re-used to all the places you have to put access modifiers in Java
11 years ago
Grant Limberg
6e998efd15
fixing up data store stuff
11 years ago
Grant Limberg
1e043a3f66
Remove link desperation from java API
11 years ago
Kees Bos
a425bbc673
Renamed supernode to rootserver
11 years ago
Grant Limberg
e28712555d
build & package libZeroTierOneSDK.jnilib on Mac oS
...
Signed-off-by: Grant Limberg <glimberg@gmail.com>
11 years ago
Grant Limberg
7054c365f2
put a read timeout on the socket
11 years ago
Grant Limberg
06ab338ecc
added naive OneService implementation.
...
Does nothing but send packets to master nodes and listen for packets back.
11 years ago
Grant Limberg
ad6ec22857
DataStore now works
11 years ago
Grant Limberg
a9307693a6
Adding Data Store implementations for Android and normal Java
11 years ago
Grant Limberg
742c59a7c7
Refactor package name from com.zerotierone.sdk to com.zerotier.sdk
11 years ago
Grant Limberg
e79a6915ff
ensure java is compiled for JVM 1.7. Android cant read .class files compiled for 1.8
11 years ago
Grant Limberg
818339f966
replace old direct calls to FindClass, GetMethodID, etc with calls that use the cache
11 years ago
Grant Limberg
079d248eab
added a JniCache objectet for caching jclass, jmethodID, and jfieldID objects
11 years ago
Grant Limberg
9f2732d661
add the basedir to the ant buildfile
11 years ago
Grant Limberg
fb6b56a85f
clean up unused imports
11 years ago
Grant Limberg
02b33e3763
Yeah it helps to byte swap the port back to little-endian before sending the port off to Java
11 years ago
Grant Limberg
0a15eae00f
Setup native build for Windows Java.
...
Still need to do Mac & Linux
11 years ago
Grant Limberg
75d7137025
added a class I found to load JNI code from within JAR files on non-android platforms.
...
That doesn't come for free, unlike android.
11 years ago
Grant Limberg
9464504e4a
DataStoreGet and Put and EventListener appear to work
11 years ago
Grant Limberg
7e0cc28a89
Fixes for bugs pointed out by updating warnings
11 years ago
Grant Limberg
9bf9670ff9
add more warnings to the JNI build
11 years ago
Grant Limberg
5983b4367b
jclass pointers aren't as cacheable as originally thought.
...
There is a way to do it. We can try it later if we determine it's needed for performance reasons. Otherwise, don't use static to cache them
11 years ago
Grant Limberg
d1ed269537
Switch to InetSockAddress instead of InetAddress so we can send the port # to java as well
11 years ago
Grant Limberg
4c71e92a67
It's now possible to actually create a Node object in Java/Android!!!
11 years ago
Grant Limberg
3bdbc6390f
Added logging to Android logcat
11 years ago
Grant Limberg
8a09e0ec3c
added NodeException
11 years ago
Grant Limberg
db80070ccb
fix strings pointing to enum fields in ResultCode java class
11 years ago
Grant Limberg
042f914dc5
If we could not recursively add ZeroTierOneSDK.jar to ZeroTierOneSDK.jar, that would be greeeaaaaat
11 years ago
Grant Limberg
a86a0ab2b1
Package the Android native libraries right in the .jar file
11 years ago
Grant Limberg
29bb2a9004
fix for a previously renamed class
11 years ago
Grant Limberg
56f8160af8
generate javadocs for the Java SDK
11 years ago
Grant Limberg
0d4283a3fa
Cache jclass and jmethod instances for callbacks on the JniRef struct.
...
This is safe to cache as none of the instantiated callback interfaces can be changed once a Node object is created.
11 years ago
Grant Limberg
9c62ce9e6f
implemented EventCallback
...
All callback methods are now implemented
11 years ago
Grant Limberg
f2eed5a65f
implemented WirePacketSendFunction
11 years ago
Grant Limberg
5e1fb4e253
Realized that the jclass and jmethodID variables in the callbacks cannot be static
...
There's no guarantee that ALL calls to the callbacks will be on the same class as they're just interfaces and user defined
11 years ago
Grant Limberg
dc00ce4f44
added DataStorePutFunction implementation
...
updated DataStorePutListener to also have an onDelete() method
11 years ago
Grant Limberg
53ebd5a9a5
don't need to pass buffer size because java arrays have a .length member
11 years ago
Grant Limberg
d5fc2b39aa
implemented DataStoreGetFunction callback
11 years ago
Grant Limberg
4137246653
implemented VirtualNetworkFrameFunctionCallback
11 years ago