jdk/src/java.base/unix/native/libnio/ch/Net.c
changeset 36115 0676e37a0b9c
parent 32014 262d30f45454
child 41380 c27cf95dd7e6
equal deleted inserted replaced
36114:a5ed9456c9be 36115:0676e37a0b9c
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   157 
   157 
   158 JNIEXPORT jboolean JNICALL
   158 JNIEXPORT jboolean JNICALL
   159 Java_sun_nio_ch_Net_isIPv6Available0(JNIEnv* env, jclass cl)
   159 Java_sun_nio_ch_Net_isIPv6Available0(JNIEnv* env, jclass cl)
   160 {
   160 {
   161     return (ipv6_available()) ? JNI_TRUE : JNI_FALSE;
   161     return (ipv6_available()) ? JNI_TRUE : JNI_FALSE;
       
   162 }
       
   163 
       
   164 JNIEXPORT jboolean JNICALL
       
   165 Java_sun_nio_ch_Net_isReusePortAvailable0(JNIEnv* env, jclass c1)
       
   166 {
       
   167     return (reuseport_available()) ? JNI_TRUE : JNI_FALSE;
   162 }
   168 }
   163 
   169 
   164 JNIEXPORT jint JNICALL
   170 JNIEXPORT jint JNICALL
   165 Java_sun_nio_ch_Net_isExclusiveBindAvailable(JNIEnv *env, jclass clazz) {
   171 Java_sun_nio_ch_Net_isExclusiveBindAvailable(JNIEnv *env, jclass clazz) {
   166     return -1;
   172     return -1;