src/jdk.net/linux/native/libextnet/Rsocket.c
author bpb
Wed, 06 Feb 2019 12:48:01 -0800
branchrsocket-branch
changeset 57156 81e4a12fd1a4
parent 57115 512e7cc6ccce
child 57160 c502c299d41e
permissions -rw-r--r--
rsocket-branch: change recent copyright year to 2019 and new files to 2019 only
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57115
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     1
/*
57156
81e4a12fd1a4 rsocket-branch: change recent copyright year to 2019 and new files to 2019 only
bpb
parents: 57115
diff changeset
     2
 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
57115
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     4
 *
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    10
 *
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    15
 * accompanied this code).
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    16
 *
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    20
 *
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    23
 * questions.
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    24
 */
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    25
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    26
#include <Rsocket.h>
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    27
#include <dlfcn.h>
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    28
#include "jni_util.h"
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    29
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    30
static const char* nativeRdmaLib = "librdmacm.so.1";
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    31
static jboolean funcs_loaded = JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    32
 
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    33
jboolean loadRdmaFuncs(JNIEnv* env) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    34
    if (funcs_loaded)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    35
        return JNI_TRUE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    36
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    37
    if (dlopen(nativeRdmaLib, RTLD_GLOBAL | RTLD_LAZY) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    38
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    39
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    40
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    41
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    42
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    43
    if ((rs_socket = (rs_rsocket_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    44
            dlsym(RTLD_DEFAULT, "rsocket")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    45
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    46
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    47
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    48
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    49
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    50
    if ((rs_fcntl = (rs_rfcntl_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    51
            dlsym(RTLD_DEFAULT, "rfcntl")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    52
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    53
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    54
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    55
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    56
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    57
    if ((rs_listen = (rs_rlisten_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    58
            dlsym(RTLD_DEFAULT, "rlisten")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    59
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    60
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    61
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    62
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    63
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    64
    if ((rs_bind = (rs_rbind_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    65
            dlsym(RTLD_DEFAULT, "rbind")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    66
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    67
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    68
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    69
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    70
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    71
    if ((rs_connect = (rs_rconnect_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    72
            dlsym(RTLD_DEFAULT, "rconnect")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    73
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    74
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    75
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    76
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    77
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    78
    if ((rs_getsockname = (rs_rgetsockname_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    79
            dlsym(RTLD_DEFAULT, "rgetsockname")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    80
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    81
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    82
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    83
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    84
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    85
    if ((rs_getsockopt = (rs_rgetsockopt_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    86
            dlsym(RTLD_DEFAULT, "rgetsockopt")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    87
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    88
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    89
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    90
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    91
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    92
    if ((rs_setsockopt = (rs_rsetsockopt_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    93
            dlsym(RTLD_DEFAULT, "rsetsockopt")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    94
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    95
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    96
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    97
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    98
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    99
    if ((rs_shutdown = (rs_rshutdown_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   100
            dlsym(RTLD_DEFAULT, "rshutdown")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   101
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   102
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   103
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   104
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   105
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   106
    if ((rs_poll = (rs_rpoll_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   107
            dlsym(RTLD_DEFAULT, "rpoll")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   108
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   109
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   110
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   111
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   112
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   113
    if ((rs_send = (rs_rsend_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   114
            dlsym(RTLD_DEFAULT, "rsend")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   115
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   116
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   117
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   118
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   119
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   120
    if ((rs_accept = (rs_raccept_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   121
            dlsym(RTLD_DEFAULT, "raccept")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   122
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   123
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   124
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   125
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   126
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   127
    if ((rs_close = (rs_rclose_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   128
            dlsym(RTLD_DEFAULT, "rclose")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   129
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   130
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   131
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   132
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   133
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   134
    if ((rs_read = (rs_rread_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   135
            dlsym(RTLD_DEFAULT, "rread")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   136
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   137
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   138
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   139
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   140
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   141
    if ((rs_readv = (rs_rreadv_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   142
            dlsym(RTLD_DEFAULT, "rreadv")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   143
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   144
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   145
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   146
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   147
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   148
    if ((rs_write = (rs_rwrite_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   149
            dlsym(RTLD_DEFAULT, "rwrite")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   150
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   151
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   152
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   153
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   154
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   155
    if ((rs_writev = (rs_rwritev_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   156
            dlsym(RTLD_DEFAULT, "rwritev")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   157
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   158
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   159
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   160
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   161
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   162
    if ((rs_recv = (rs_rrecv_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   163
            dlsym(RTLD_DEFAULT, "rrecv")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   164
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   165
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   166
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   167
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   168
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   169
    if ((rs_recvfrom = (rs_rrecvfrom_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   170
            dlsym(RTLD_DEFAULT, "rrecvfrom")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   171
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   172
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   173
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   174
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   175
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   176
    if ((rs_sendto = (rs_rsendto_func*)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   177
            dlsym(RTLD_DEFAULT, "rsendto")) == NULL) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   178
        JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   179
              dlerror());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   180
        return JNI_FALSE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   181
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   182
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   183
    funcs_loaded = JNI_TRUE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   184
    return JNI_TRUE;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   185
}