Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add Java wrapper function for setPassTOS()
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
  • Loading branch information
dlenski committed Apr 1, 2020
1 parent c391ff7 commit 4f52943
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions java/src/org/infradead/libopenconnect/LibOpenConnect.java
Expand Up @@ -128,6 +128,7 @@ public boolean isCanceled() {
public synchronized native void setCertExpiryWarning(int seconds);
public synchronized native void setDPD(int minSeconds);
public synchronized native void setTrojanInterval(int seconds);
public synchronized native void setPassTOS(boolean isEnabled);
public synchronized native int setProxyAuth(String methods);
public synchronized native int setHTTPProxy(String proxy);
public synchronized native void setXMLSHA1(String hash);
Expand Down
10 changes: 10 additions & 0 deletions jni.c
Expand Up @@ -1051,6 +1051,16 @@ JNIEXPORT void JNICALL Java_org_infradead_libopenconnect_LibOpenConnect_setTroja
openconnect_set_trojan_interval(ctx->vpninfo, arg);
}

JNIEXPORT void JNICALL Java_org_infradead_libopenconnect_LibOpenConnect_setPassTOS(
JNIEnv *jenv, jobject jobj, jboolean arg)
{
struct libctx *ctx = getctx(jenv, jobj);

if (!ctx)
return;
openconnect_set_pass_tos(ctx->vpninfo, arg);
}

JNIEXPORT void JNICALL Java_org_infradead_libopenconnect_LibOpenConnect_setPFS(
JNIEnv *jenv, jobject jobj, jboolean arg)
{
Expand Down

0 comments on commit 4f52943

Please sign in to comment.