add net_scope_to_string java wrapper
This commit is contained in:
parent
75b83e6cf5
commit
ffd7609c12
|
@ -882,6 +882,13 @@ JNIEXPORT jstring SIGAR_JNI(NetFlags_getIfFlagsString)
|
||||||
return JENV->NewStringUTF(env, buf);
|
return JENV->NewStringUTF(env, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jstring SIGAR_JNI(NetFlags_getScopeString)
|
||||||
|
(JNIEnv *env, jclass cls, jint scope)
|
||||||
|
{
|
||||||
|
const char *buf = sigar_net_scope_to_string(scope);
|
||||||
|
return JENV->NewStringUTF(env, buf);
|
||||||
|
}
|
||||||
|
|
||||||
JNIEXPORT jobjectArray SIGAR_JNIx(getNetConnectionList)
|
JNIEXPORT jobjectArray SIGAR_JNIx(getNetConnectionList)
|
||||||
(JNIEnv *env, jobject sigar_obj, jint flags)
|
(JNIEnv *env, jobject sigar_obj, jint flags)
|
||||||
{
|
{
|
||||||
|
|
|
@ -157,6 +157,13 @@ public class NetFlags {
|
||||||
*/
|
*/
|
||||||
public static native String getIfFlagsString(long flags);
|
public static native String getIfFlagsString(long flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param network interface ipv6 address scope.
|
||||||
|
* @return String representation of ipv6 address scope.
|
||||||
|
* @see org.hyperic.sigar.NetInterfaceConfig#getScope6
|
||||||
|
*/
|
||||||
|
public static native String getScopeString(int scope);
|
||||||
|
|
||||||
public static boolean isAnyAddress(String address) {
|
public static boolean isAnyAddress(String address) {
|
||||||
return
|
return
|
||||||
(address == null) ||
|
(address == null) ||
|
||||||
|
|
Loading…
Reference in New Issue