1 /*
2 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
305 struct sctp_shutdown_event sn_shutdown_event;
306 struct sctp_adaptation_event sn_adaptation_event;
307 struct sctp_pdapi_event sn_pdapi_event;
308 };
309
310 #endif /* SCTP_INITMSG */
311
312 /* Function types to support dynamic linking of socket API extension functions
313 * for SCTP. This is so that there is no linkage depandancy during build or
314 * runtime for libsctp.*/
315 typedef int sctp_getladdrs_func(int sd, sctp_assoc_t id, struct sockaddr **addrs);
316 typedef int sctp_freeladdrs_func(struct sockaddr *addrs);
317 typedef int sctp_getpaddrs_func(int sd, sctp_assoc_t id, struct sockaddr **addrs);
318 typedef int sctp_freepaddrs_func(struct sockaddr *addrs);
319 typedef int sctp_bindx_func(int sd, struct sockaddr *addrs, int addrcnt, int flags);
320 typedef int sctp_peeloff_func(int sock, sctp_assoc_t id);
321
322
323 #endif /* __linux__ */
324
325 sctp_getladdrs_func* nio_sctp_getladdrs;
326 sctp_freeladdrs_func* nio_sctp_freeladdrs;
327 sctp_getpaddrs_func* nio_sctp_getpaddrs;
328 sctp_freepaddrs_func* nio_sctp_freepaddrs;
329 sctp_bindx_func* nio_sctp_bindx;
330 sctp_peeloff_func* nio_sctp_peeloff;
331
332 jboolean loadSocketExtensionFuncs(JNIEnv* env);
333
334 #endif /* !SUN_NIO_CH_SCTP_H */
|
1 /*
2 * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
305 struct sctp_shutdown_event sn_shutdown_event;
306 struct sctp_adaptation_event sn_adaptation_event;
307 struct sctp_pdapi_event sn_pdapi_event;
308 };
309
310 #endif /* SCTP_INITMSG */
311
312 /* Function types to support dynamic linking of socket API extension functions
313 * for SCTP. This is so that there is no linkage depandancy during build or
314 * runtime for libsctp.*/
315 typedef int sctp_getladdrs_func(int sd, sctp_assoc_t id, struct sockaddr **addrs);
316 typedef int sctp_freeladdrs_func(struct sockaddr *addrs);
317 typedef int sctp_getpaddrs_func(int sd, sctp_assoc_t id, struct sockaddr **addrs);
318 typedef int sctp_freepaddrs_func(struct sockaddr *addrs);
319 typedef int sctp_bindx_func(int sd, struct sockaddr *addrs, int addrcnt, int flags);
320 typedef int sctp_peeloff_func(int sock, sctp_assoc_t id);
321
322
323 #endif /* __linux__ */
324
325 extern sctp_getladdrs_func* nio_sctp_getladdrs;
326 extern sctp_freeladdrs_func* nio_sctp_freeladdrs;
327 extern sctp_getpaddrs_func* nio_sctp_getpaddrs;
328 extern sctp_freepaddrs_func* nio_sctp_freepaddrs;
329 extern sctp_bindx_func* nio_sctp_bindx;
330 extern sctp_peeloff_func* nio_sctp_peeloff;
331
332 jboolean loadSocketExtensionFuncs(JNIEnv* env);
333
334 #endif /* !SUN_NIO_CH_SCTP_H */
|