mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-21 22:07:49 +00:00
added ttl parameter to WirePacketSendFunction
This commit is contained in:
parent
0d9f33dc4f
commit
0508a41afd
@ -427,7 +427,8 @@ namespace {
|
|||||||
const struct sockaddr_storage *localAddress,
|
const struct sockaddr_storage *localAddress,
|
||||||
const struct sockaddr_storage *remoteAddress,
|
const struct sockaddr_storage *remoteAddress,
|
||||||
const void *buffer,
|
const void *buffer,
|
||||||
unsigned int bufferSize)
|
unsigned int bufferSize,
|
||||||
|
unsigned int ttl)
|
||||||
{
|
{
|
||||||
LOGV("WirePacketSendFunction(%p, %p, %p, %d)", localAddress, remoteAddress, buffer, bufferSize);
|
LOGV("WirePacketSendFunction(%p, %p, %p, %d)", localAddress, remoteAddress, buffer, bufferSize);
|
||||||
JniRef *ref = (JniRef*)userData;
|
JniRef *ref = (JniRef*)userData;
|
||||||
@ -445,7 +446,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jmethodID packetSenderCallbackMethod = lookup.findMethod(packetSenderClass,
|
jmethodID packetSenderCallbackMethod = lookup.findMethod(packetSenderClass,
|
||||||
"onSendPacketRequested", "(Ljava/net/InetSocketAddress;Ljava/net/InetSocketAddress;[B)I");
|
"onSendPacketRequested", "(Ljava/net/InetSocketAddress;Ljava/net/InetSocketAddress;[BI)I");
|
||||||
if(packetSenderCallbackMethod == NULL)
|
if(packetSenderCallbackMethod == NULL)
|
||||||
{
|
{
|
||||||
LOGE("Couldn't find onSendPacketRequested method");
|
LOGE("Couldn't find onSendPacketRequested method");
|
||||||
|
@ -45,5 +45,6 @@ public interface PacketSender {
|
|||||||
public int onSendPacketRequested(
|
public int onSendPacketRequested(
|
||||||
InetSocketAddress localAddr,
|
InetSocketAddress localAddr,
|
||||||
InetSocketAddress remoteAddr,
|
InetSocketAddress remoteAddr,
|
||||||
byte[] packetData);
|
byte[] packetData,
|
||||||
|
int ttl);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user