Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
60f91269
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
60f91269
编写于
2月 04, 2012
作者:
C
chegar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7041778: Move SCTP implementation out of sun.nio.ch and into its own package
Reviewed-by: alanb
上级
0aac167d
变更
43
隐藏空白更改
内联
并排
Showing
43 changed file
with
348 addition
and
314 deletion
+348
-314
make/com/sun/nio/sctp/Exportedfiles.gmk
make/com/sun/nio/sctp/Exportedfiles.gmk
+7
-7
make/com/sun/nio/sctp/FILES_java.gmk
make/com/sun/nio/sctp/FILES_java.gmk
+16
-16
make/com/sun/nio/sctp/Makefile
make/com/sun/nio/sctp/Makefile
+4
-2
make/com/sun/nio/sctp/mapfile-vers
make/com/sun/nio/sctp/mapfile-vers
+24
-24
src/share/classes/com/sun/nio/sctp/MessageInfo.java
src/share/classes/com/sun/nio/sctp/MessageInfo.java
+3
-3
src/share/classes/com/sun/nio/sctp/SctpChannel.java
src/share/classes/com/sun/nio/sctp/SctpChannel.java
+1
-1
src/share/classes/com/sun/nio/sctp/SctpMultiChannel.java
src/share/classes/com/sun/nio/sctp/SctpMultiChannel.java
+1
-1
src/share/classes/com/sun/nio/sctp/SctpServerChannel.java
src/share/classes/com/sun/nio/sctp/SctpServerChannel.java
+1
-1
src/share/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java
...e/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java
+8
-8
src/share/classes/sun/nio/ch/AbstractPollArrayWrapper.java
src/share/classes/sun/nio/ch/AbstractPollArrayWrapper.java
+7
-7
src/share/classes/sun/nio/ch/AbstractPollSelectorImpl.java
src/share/classes/sun/nio/ch/AbstractPollSelectorImpl.java
+1
-1
src/share/classes/sun/nio/ch/IOStatus.java
src/share/classes/sun/nio/ch/IOStatus.java
+12
-12
src/share/classes/sun/nio/ch/IOUtil.java
src/share/classes/sun/nio/ch/IOUtil.java
+5
-4
src/share/classes/sun/nio/ch/Net.java
src/share/classes/sun/nio/ch/Net.java
+4
-4
src/share/classes/sun/nio/ch/SelChImpl.java
src/share/classes/sun/nio/ch/SelChImpl.java
+1
-1
src/share/classes/sun/nio/ch/SelectionKeyImpl.java
src/share/classes/sun/nio/ch/SelectionKeyImpl.java
+6
-6
src/share/classes/sun/nio/ch/SelectorImpl.java
src/share/classes/sun/nio/ch/SelectorImpl.java
+2
-2
src/share/classes/sun/nio/ch/Util.java
src/share/classes/sun/nio/ch/Util.java
+4
-4
src/share/classes/sun/nio/ch/sctp/MessageInfoImpl.java
src/share/classes/sun/nio/ch/sctp/MessageInfoImpl.java
+13
-13
src/share/classes/sun/nio/ch/sctp/SctpStdSocketOption.java
src/share/classes/sun/nio/ch/sctp/SctpStdSocketOption.java
+1
-1
src/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java
src/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java
+1
-1
src/solaris/classes/sun/nio/ch/EPollSelectorImpl.java
src/solaris/classes/sun/nio/ch/EPollSelectorImpl.java
+1
-1
src/solaris/classes/sun/nio/ch/NativeThread.java
src/solaris/classes/sun/nio/ch/NativeThread.java
+4
-4
src/solaris/classes/sun/nio/ch/PollArrayWrapper.java
src/solaris/classes/sun/nio/ch/PollArrayWrapper.java
+2
-2
src/solaris/classes/sun/nio/ch/sctp/AssociationChange.java
src/solaris/classes/sun/nio/ch/sctp/AssociationChange.java
+6
-6
src/solaris/classes/sun/nio/ch/sctp/AssociationImpl.java
src/solaris/classes/sun/nio/ch/sctp/AssociationImpl.java
+5
-5
src/solaris/classes/sun/nio/ch/sctp/PeerAddrChange.java
src/solaris/classes/sun/nio/ch/sctp/PeerAddrChange.java
+3
-3
src/solaris/classes/sun/nio/ch/sctp/ResultContainer.java
src/solaris/classes/sun/nio/ch/sctp/ResultContainer.java
+17
-17
src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java
src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java
+23
-14
src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java
...solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java
+20
-11
src/solaris/classes/sun/nio/ch/sctp/SctpNet.java
src/solaris/classes/sun/nio/ch/sctp/SctpNet.java
+3
-1
src/solaris/classes/sun/nio/ch/sctp/SctpNotification.java
src/solaris/classes/sun/nio/ch/sctp/SctpNotification.java
+1
-1
src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java
...olaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java
+10
-1
src/solaris/classes/sun/nio/ch/sctp/SendFailed.java
src/solaris/classes/sun/nio/ch/sctp/SendFailed.java
+7
-7
src/solaris/classes/sun/nio/ch/sctp/Shutdown.java
src/solaris/classes/sun/nio/ch/sctp/Shutdown.java
+3
-3
src/solaris/native/sun/nio/ch/sctp/Sctp.h
src/solaris/native/sun/nio/ch/sctp/Sctp.h
+0
-0
src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c
src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c
+63
-61
src/solaris/native/sun/nio/ch/sctp/SctpNet.c
src/solaris/native/sun/nio/ch/sctp/SctpNet.c
+49
-49
src/solaris/native/sun/nio/ch/sctp/SctpServerChannelImpl.c
src/solaris/native/sun/nio/ch/sctp/SctpServerChannelImpl.c
+5
-5
src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java
src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java
+1
-1
src/windows/classes/sun/nio/ch/sctp/SctpChannelImpl.java
src/windows/classes/sun/nio/ch/sctp/SctpChannelImpl.java
+1
-1
src/windows/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java
...windows/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java
+1
-1
src/windows/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java
...indows/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java
+1
-1
未找到文件。
make/com/sun/nio/sctp/Exportedfiles.gmk
浏览文件 @
60f91269
...
...
@@ -29,11 +29,11 @@
ifneq ($(PLATFORM), windows)
FILES_export = \
sun/nio/ch/
SctpAssoc
Change.java \
sun/nio/ch/SctpChannelImpl.java \
sun/nio/ch/SctpNet.java \
sun/nio/ch/
Sctp
PeerAddrChange.java \
sun/nio/ch/
Sctp
ResultContainer.java \
sun/nio/ch/SctpServerChannelImpl.java \
sun/nio/ch/SctpStdSocketOption.java
sun/nio/ch/
sctp/Association
Change.java \
sun/nio/ch/
sctp/
SctpChannelImpl.java \
sun/nio/ch/
sctp/
SctpNet.java \
sun/nio/ch/
sctp/
PeerAddrChange.java \
sun/nio/ch/
sctp/
ResultContainer.java \
sun/nio/ch/
sctp/
SctpServerChannelImpl.java \
sun/nio/ch/
sctp/
SctpStdSocketOption.java
endif
make/com/sun/nio/sctp/FILES_java.gmk
浏览文件 @
60f91269
...
...
@@ -42,25 +42,25 @@ FILES_java = \
com/sun/nio/sctp/SendFailedNotification.java \
com/sun/nio/sctp/ShutdownNotification.java \
\
sun/nio/ch/
Sctp
MessageInfoImpl.java \
sun/nio/ch/SctpStdSocketOption.java
sun/nio/ch/
sctp/
MessageInfoImpl.java \
sun/nio/ch/
sctp/
SctpStdSocketOption.java
ifneq ($(PLATFORM), windows)
FILES_java += \
sun/nio/ch/
SctpAssoc
Change.java \
sun/nio/ch/
Sctp
AssociationImpl.java \
sun/nio/ch/
SctpChannelImpl
.java \
sun/nio/ch/
SctpMultiChannelImpl
.java \
sun/nio/ch/
SctpNet
.java \
sun/nio/ch/
SctpNotification
.java \
sun/nio/ch/
SctpPeerAddrChange
.java \
sun/nio/ch/
SctpResultContainer
.java \
sun/nio/ch/
SctpSendFailed
.java \
sun/nio/ch/
SctpServerChannelImpl
.java \
sun/nio/ch/
Sctp
Shutdown.java
sun/nio/ch/
sctp/Association
Change.java \
sun/nio/ch/
sctp/
AssociationImpl.java \
sun/nio/ch/
sctp/PeerAddrChange
.java \
sun/nio/ch/
sctp/ResultContainer
.java \
sun/nio/ch/
sctp/SctpChannelImpl
.java \
sun/nio/ch/
sctp/SctpMultiChannelImpl
.java \
sun/nio/ch/
sctp/SctpNet
.java \
sun/nio/ch/
sctp/SctpNotification
.java \
sun/nio/ch/
sctp/SctpServerChannelImpl
.java \
sun/nio/ch/
sctp/SendFailed
.java \
sun/nio/ch/
sctp/
Shutdown.java
else
FILES_java += \
sun/nio/ch/SctpChannelImpl.java \
sun/nio/ch/SctpMultiChannelImpl.java \
sun/nio/ch/SctpServerChannelImpl.java
sun/nio/ch/
sctp/
SctpChannelImpl.java \
sun/nio/ch/
sctp/
SctpMultiChannelImpl.java \
sun/nio/ch/
sctp/
SctpServerChannelImpl.java
endif
make/com/sun/nio/sctp/Makefile
浏览文件 @
60f91269
...
...
@@ -47,14 +47,16 @@ include $(BUILDDIR)/common/Library.gmk
#
# Find platform-specific C source files
#
vpath
%.c
$(PLATFORM_SRC)/native/sun/nio/ch
vpath
%.c
$(PLATFORM_SRC)/native/sun/nio/ch
/sctp
#
# Include nio.h, net_util.h, sun_nio_ch_IOStatus.h, etc
#
OTHER_INCLUDES
+=
\
-I
$(SHARE_SRC)
/native/sun/nio/ch
\
-I
$(SHARE_SRC)
/native/sun/nio/ch/sctp
\
-I
$(SHARE_SRC)
/native/java/net
\
-I
$(PLATFORM_SRC)
/native/sun/nio/ch
\
-I
$(PLATFORM_SRC)
/native/java/net
\
-I
$(CLASSHDRDIR)
/../../../../java/java.nio/nio/CClassHeaders
...
...
@@ -75,5 +77,5 @@ endif # ifneq windows
clean clobber
::
$(RM)
-r
$(CLASSDESTDIR)
/com/sun/nio/sctp
$(RM)
-r
$(CLASSDESTDIR)
/sun/nio/ch
$(RM)
-r
$(CLASSDESTDIR)
/sun/nio/ch
/sctp
make/com/sun/nio/sctp/mapfile-vers
浏览文件 @
60f91269
...
...
@@ -25,30 +25,30 @@
SUNWprivate_1.1 {
global:
Java_sun_nio_ch_SctpNet_init;
Java_sun_nio_ch_SctpNet_socket0;
Java_sun_nio_ch_SctpNet_bindx;
Java_sun_nio_ch_SctpNet_branch0;
Java_sun_nio_ch_SctpNet_listen0;
Java_sun_nio_ch_SctpNet_connect0;
Java_sun_nio_ch_SctpNet_close0;
Java_sun_nio_ch_SctpNet_preClose0;
Java_sun_nio_ch_SctpNet_getLocalAddresses0;
Java_sun_nio_ch_SctpNet_getRemoteAddresses0;
Java_sun_nio_ch_SctpNet_getPrimAddrOption0;
Java_sun_nio_ch_SctpNet_setPrimAddrOption0;
Java_sun_nio_ch_SctpNet_setPeerPrimAddrOption0;
Java_sun_nio_ch_SctpNet_getInitMsgOption0;
Java_sun_nio_ch_SctpNet_setInitMsgOption0;
Java_sun_nio_ch_SctpNet_getIntOption0;
Java_sun_nio_ch_SctpNet_setIntOption0;
Java_sun_nio_ch_SctpNet_shutdown0;
Java_sun_nio_ch_SctpChannelImpl_initIDs;
Java_sun_nio_ch_SctpChannelImpl_checkConnect;
Java_sun_nio_ch_SctpChannelImpl_receive0;
Java_sun_nio_ch_SctpChannelImpl_send0;
Java_sun_nio_ch_SctpServerChannelImpl_initIDs;
Java_sun_nio_ch_SctpServerChannelImpl_accept0;
Java_sun_nio_ch_
sctp_
SctpNet_init;
Java_sun_nio_ch_
sctp_
SctpNet_socket0;
Java_sun_nio_ch_
sctp_
SctpNet_bindx;
Java_sun_nio_ch_
sctp_
SctpNet_branch0;
Java_sun_nio_ch_
sctp_
SctpNet_listen0;
Java_sun_nio_ch_
sctp_
SctpNet_connect0;
Java_sun_nio_ch_
sctp_
SctpNet_close0;
Java_sun_nio_ch_
sctp_
SctpNet_preClose0;
Java_sun_nio_ch_
sctp_
SctpNet_getLocalAddresses0;
Java_sun_nio_ch_
sctp_
SctpNet_getRemoteAddresses0;
Java_sun_nio_ch_
sctp_
SctpNet_getPrimAddrOption0;
Java_sun_nio_ch_
sctp_
SctpNet_setPrimAddrOption0;
Java_sun_nio_ch_
sctp_
SctpNet_setPeerPrimAddrOption0;
Java_sun_nio_ch_
sctp_
SctpNet_getInitMsgOption0;
Java_sun_nio_ch_
sctp_
SctpNet_setInitMsgOption0;
Java_sun_nio_ch_
sctp_
SctpNet_getIntOption0;
Java_sun_nio_ch_
sctp_
SctpNet_setIntOption0;
Java_sun_nio_ch_
sctp_
SctpNet_shutdown0;
Java_sun_nio_ch_
sctp_
SctpChannelImpl_initIDs;
Java_sun_nio_ch_
sctp_
SctpChannelImpl_checkConnect;
Java_sun_nio_ch_
sctp_
SctpChannelImpl_receive0;
Java_sun_nio_ch_
sctp_
SctpChannelImpl_send0;
Java_sun_nio_ch_
sctp_
SctpServerChannelImpl_initIDs;
Java_sun_nio_ch_
sctp_
SctpServerChannelImpl_accept0;
JNI_OnLoad;
local:
*;
...
...
src/share/classes/com/sun/nio/sctp/MessageInfo.java
浏览文件 @
60f91269
...
...
@@ -94,7 +94,7 @@ public abstract class MessageInfo {
if
(
streamNumber
<
0
||
streamNumber
>
65536
)
throw
new
IllegalArgumentException
(
"Invalid stream number"
);
return
new
sun
.
nio
.
ch
.
Sctp
MessageInfoImpl
(
null
,
address
,
streamNumber
);
return
new
sun
.
nio
.
ch
.
sctp
.
MessageInfoImpl
(
null
,
address
,
streamNumber
);
}
/**
* Creates a {@code MessageInfo} instance suitable for use when
...
...
@@ -133,8 +133,8 @@ public abstract class MessageInfo {
if
(
streamNumber
<
0
||
streamNumber
>
65536
)
throw
new
IllegalArgumentException
(
"Invalid stream number"
);
return
new
sun
.
nio
.
ch
.
SctpMessageInfoImpl
(
association
,
address
,
streamNumber
);
return
new
sun
.
nio
.
ch
.
sctp
.
MessageInfoImpl
(
association
,
address
,
streamNumber
);
}
/**
...
...
src/share/classes/com/sun/nio/sctp/SctpChannel.java
浏览文件 @
60f91269
...
...
@@ -162,7 +162,7 @@ public abstract class SctpChannel
*/
public
static
SctpChannel
open
()
throws
IOException
{
return
new
sun
.
nio
.
ch
.
SctpChannelImpl
((
SelectorProvider
)
null
);
return
new
sun
.
nio
.
ch
.
sctp
.
SctpChannelImpl
((
SelectorProvider
)
null
);
}
/**
...
...
src/share/classes/com/sun/nio/sctp/SctpMultiChannel.java
浏览文件 @
60f91269
...
...
@@ -162,7 +162,7 @@ public abstract class SctpMultiChannel
*/
public
static
SctpMultiChannel
open
()
throws
IOException
{
return
new
sun
.
nio
.
ch
.
SctpMultiChannelImpl
((
SelectorProvider
)
null
);
return
new
sun
.
nio
.
ch
.
sctp
.
SctpMultiChannelImpl
((
SelectorProvider
)
null
);
}
/**
...
...
src/share/classes/com/sun/nio/sctp/SctpServerChannel.java
浏览文件 @
60f91269
...
...
@@ -98,7 +98,7 @@ public abstract class SctpServerChannel
*/
public
static
SctpServerChannel
open
()
throws
IOException
{
return
new
sun
.
nio
.
ch
.
SctpServerChannelImpl
((
SelectorProvider
)
null
);
return
new
sun
.
nio
.
ch
.
sctp
.
SctpServerChannelImpl
((
SelectorProvider
)
null
);
}
/**
...
...
src/share/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java
浏览文件 @
60f91269
...
...
@@ -25,7 +25,7 @@
package
com.sun.nio.sctp
;
import
java.net.SocketAddress
;
import
sun.nio.ch.SctpStdSocketOption
;
import
sun.nio.ch.
sctp.
SctpStdSocketOption
;
/**
* SCTP channels supports the socket options defined by this class
...
...
@@ -50,7 +50,7 @@ public class SctpStandardSocketOptions {
*/
public
static
final
SctpSocketOption
<
Boolean
>
SCTP_DISABLE_FRAGMENTS
=
new
SctpStdSocketOption
<
Boolean
>(
"SCTP_DISABLE_FRAGMENTS"
,
Boolean
.
class
,
sun
.
nio
.
ch
.
SctpStdSocketOption
.
SCTP_DISABLE_FRAGMENTS
);
sun
.
nio
.
ch
.
sctp
.
SctpStdSocketOption
.
SCTP_DISABLE_FRAGMENTS
);
/**
* Enables or disables explicit message completion.
...
...
@@ -69,7 +69,7 @@ public class SctpStandardSocketOptions {
*/
public
static
final
SctpSocketOption
<
Boolean
>
SCTP_EXPLICIT_COMPLETE
=
new
SctpStdSocketOption
<
Boolean
>(
"SCTP_EXPLICIT_COMPLETE"
,
Boolean
.
class
,
sun
.
nio
.
ch
.
SctpStdSocketOption
.
SCTP_EXPLICIT_COMPLETE
);
sun
.
nio
.
ch
.
sctp
.
SctpStdSocketOption
.
SCTP_EXPLICIT_COMPLETE
);
/**
* Fragmented interleave controls how the presentation of messages occur
...
...
@@ -120,7 +120,7 @@ public class SctpStandardSocketOptions {
public
static
final
SctpSocketOption
<
Integer
>
SCTP_FRAGMENT_INTERLEAVE
=
new
SctpStdSocketOption
<
Integer
>(
"SCTP_FRAGMENT_INTERLEAVE"
,
Integer
.
class
,
sun
.
nio
.
ch
.
SctpStdSocketOption
.
SCTP_FRAGMENT_INTERLEAVE
);
sun
.
nio
.
ch
.
sctp
.
SctpStdSocketOption
.
SCTP_FRAGMENT_INTERLEAVE
);
/**
* The maximum number of streams requested by the local endpoint during
...
...
@@ -171,7 +171,7 @@ public class SctpStandardSocketOptions {
*/
public
static
final
SctpSocketOption
<
Boolean
>
SCTP_NODELAY
=
new
SctpStdSocketOption
<
Boolean
>(
"SCTP_NODELAY"
,
Boolean
.
class
,
sun
.
nio
.
ch
.
SctpStdSocketOption
.
SCTP_NODELAY
);
sun
.
nio
.
ch
.
sctp
.
SctpStdSocketOption
.
SCTP_NODELAY
);
/**
* Requests that the local SCTP stack use the given peer address as
...
...
@@ -246,7 +246,7 @@ public class SctpStandardSocketOptions {
*/
public
static
final
SctpSocketOption
<
Integer
>
SO_SNDBUF
=
new
SctpStdSocketOption
<
Integer
>(
"SO_SNDBUF"
,
Integer
.
class
,
sun
.
nio
.
ch
.
SctpStdSocketOption
.
SO_SNDBUF
);
sun
.
nio
.
ch
.
sctp
.
SctpStdSocketOption
.
SO_SNDBUF
);
/**
* The size of the socket receive buffer.
...
...
@@ -273,7 +273,7 @@ public class SctpStandardSocketOptions {
*/
public
static
final
SctpSocketOption
<
Integer
>
SO_RCVBUF
=
new
SctpStdSocketOption
<
Integer
>(
"SO_RCVBUF"
,
Integer
.
class
,
sun
.
nio
.
ch
.
SctpStdSocketOption
.
SO_RCVBUF
);
sun
.
nio
.
ch
.
sctp
.
SctpStdSocketOption
.
SO_RCVBUF
);
/**
* Linger on close if data is present.
...
...
@@ -304,7 +304,7 @@ public class SctpStandardSocketOptions {
*/
public
static
final
SctpSocketOption
<
Integer
>
SO_LINGER
=
new
SctpStdSocketOption
<
Integer
>(
"SO_LINGER"
,
Integer
.
class
,
sun
.
nio
.
ch
.
SctpStdSocketOption
.
SO_LINGER
);
sun
.
nio
.
ch
.
sctp
.
SctpStdSocketOption
.
SO_LINGER
);
/**
* This class is used to set the maximum number of inbound/outbound streams
...
...
src/share/classes/sun/nio/ch/AbstractPollArrayWrapper.java
浏览文件 @
60f91269
...
...
@@ -35,15 +35,15 @@ import sun.misc.*;
* @since 1.4
*/
abstract
class
AbstractPollArrayWrapper
{
public
abstract
class
AbstractPollArrayWrapper
{
// Event masks
static
final
short
POLLIN
=
0x0001
;
static
final
short
POLLOUT
=
0x0004
;
static
final
short
POLLERR
=
0x0008
;
static
final
short
POLLHUP
=
0x0010
;
static
final
short
POLLNVAL
=
0x0020
;
static
final
short
POLLREMOVE
=
0x0800
;
public
static
final
short
POLLIN
=
0x0001
;
public
static
final
short
POLLOUT
=
0x0004
;
public
static
final
short
POLLERR
=
0x0008
;
public
static
final
short
POLLHUP
=
0x0010
;
public
static
final
short
POLLNVAL
=
0x0020
;
public
static
final
short
POLLREMOVE
=
0x0800
;
// Miscellaneous constants
static
final
short
SIZE_POLLFD
=
8
;
...
...
src/share/classes/sun/nio/ch/AbstractPollSelectorImpl.java
浏览文件 @
60f91269
...
...
@@ -67,7 +67,7 @@ abstract class AbstractPollSelectorImpl
this
.
channelOffset
=
offset
;
}
void
putEventOps
(
SelectionKeyImpl
sk
,
int
ops
)
{
public
void
putEventOps
(
SelectionKeyImpl
sk
,
int
ops
)
{
synchronized
(
closeLock
)
{
if
(
closed
)
throw
new
ClosedSelectorException
();
...
...
src/share/classes/sun/nio/ch/IOStatus.java
浏览文件 @
60f91269
...
...
@@ -28,16 +28,16 @@ package sun.nio.ch;
// Constants for reporting I/O status
final
class
IOStatus
{
public
final
class
IOStatus
{
private
IOStatus
()
{
}
static
final
int
EOF
=
-
1
;
// End of file
static
final
int
UNAVAILABLE
=
-
2
;
// Nothing available (non-blocking)
static
final
int
INTERRUPTED
=
-
3
;
// System call interrupted
static
final
int
UNSUPPORTED
=
-
4
;
// Operation not supported
static
final
int
THROWN
=
-
5
;
// Exception thrown in JNI code
static
final
int
UNSUPPORTED_CASE
=
-
6
;
// This case not supported
public
static
final
int
EOF
=
-
1
;
// End of file
public
static
final
int
UNAVAILABLE
=
-
2
;
// Nothing available (non-blocking)
public
static
final
int
INTERRUPTED
=
-
3
;
// System call interrupted
public
static
final
int
UNSUPPORTED
=
-
4
;
// Operation not supported
public
static
final
int
THROWN
=
-
5
;
// Exception thrown in JNI code
public
static
final
int
UNSUPPORTED_CASE
=
-
6
;
// This case not supported
// The following two methods are for use in try/finally blocks where a
// status value needs to be normalized before being returned to the invoker
...
...
@@ -55,28 +55,28 @@ final class IOStatus {
// }
//
static
int
normalize
(
int
n
)
{
public
static
int
normalize
(
int
n
)
{
if
(
n
==
UNAVAILABLE
)
return
0
;
return
n
;
}
static
boolean
check
(
int
n
)
{
public
static
boolean
check
(
int
n
)
{
return
(
n
>=
UNAVAILABLE
);
}
static
long
normalize
(
long
n
)
{
public
static
long
normalize
(
long
n
)
{
if
(
n
==
UNAVAILABLE
)
return
0
;
return
n
;
}
static
boolean
check
(
long
n
)
{
public
static
boolean
check
(
long
n
)
{
return
(
n
>=
UNAVAILABLE
);
}
// Return true iff n is not one of the IOStatus values
static
boolean
checkAll
(
long
n
)
{
public
static
boolean
checkAll
(
long
n
)
{
return
((
n
>
EOF
)
||
(
n
<
UNSUPPORTED_CASE
));
}
...
...
src/share/classes/sun/nio/ch/IOUtil.java
浏览文件 @
60f91269
...
...
@@ -34,7 +34,7 @@ import java.nio.ByteBuffer;
* File-descriptor based I/O utilities that are shared by NIO classes.
*/
class
IOUtil
{
public
class
IOUtil
{
private
IOUtil
()
{
}
// No instantiation
...
...
@@ -309,7 +309,7 @@ class IOUtil {
}
}
static
FileDescriptor
newFD
(
int
i
)
{
public
static
FileDescriptor
newFD
(
int
i
)
{
FileDescriptor
fd
=
new
FileDescriptor
();
setfdVal
(
fd
,
i
);
return
fd
;
...
...
@@ -326,10 +326,11 @@ class IOUtil {
static
native
boolean
drain
(
int
fd
)
throws
IOException
;
static
native
void
configureBlocking
(
FileDescriptor
fd
,
boolean
blocking
)
public
static
native
void
configureBlocking
(
FileDescriptor
fd
,
boolean
blocking
)
throws
IOException
;
static
native
int
fdVal
(
FileDescriptor
fd
);
public
static
native
int
fdVal
(
FileDescriptor
fd
);
static
native
void
setfdVal
(
FileDescriptor
fd
,
int
value
);
...
...
src/share/classes/sun/nio/ch/Net.java
浏览文件 @
60f91269
...
...
@@ -33,7 +33,7 @@ import java.security.AccessController;
import
java.security.PrivilegedAction
;
class
Net
{
// package-private
public
class
Net
{
private
Net
()
{
}
...
...
@@ -75,7 +75,7 @@ class Net { // package-private
return
canJoin6WithIPv4Group0
();
}
static
InetSocketAddress
checkAddress
(
SocketAddress
sa
)
{
public
static
InetSocketAddress
checkAddress
(
SocketAddress
sa
)
{
if
(
sa
==
null
)
throw
new
NullPointerException
();
if
(!(
sa
instanceof
InetSocketAddress
))
...
...
@@ -330,7 +330,7 @@ class Net { // package-private
// Due to oddities SO_REUSEADDR on windows reuse is ignored
private
static
native
int
socket0
(
boolean
preferIPv6
,
boolean
stream
,
boolean
reuse
);
static
void
bind
(
FileDescriptor
fd
,
InetAddress
addr
,
int
port
)
public
static
void
bind
(
FileDescriptor
fd
,
InetAddress
addr
,
int
port
)
throws
IOException
{
bind
(
UNSPEC
,
fd
,
addr
,
port
);
...
...
@@ -383,7 +383,7 @@ class Net { // package-private
private
static
native
InetAddress
localInetAddress
(
FileDescriptor
fd
)
throws
IOException
;
static
InetSocketAddress
localAddress
(
FileDescriptor
fd
)
public
static
InetSocketAddress
localAddress
(
FileDescriptor
fd
)
throws
IOException
{
return
new
InetSocketAddress
(
localInetAddress
(
fd
),
localPort
(
fd
));
...
...
src/share/classes/sun/nio/ch/SelChImpl.java
浏览文件 @
60f91269
...
...
@@ -36,7 +36,7 @@ import java.io.IOException;
* @since 1.4
*/
interface
SelChImpl
extends
Channel
{
public
interface
SelChImpl
extends
Channel
{
FileDescriptor
getFD
();
...
...
src/share/classes/sun/nio/ch/SelectionKeyImpl.java
浏览文件 @
60f91269
...
...
@@ -34,12 +34,12 @@ import java.nio.channels.spi.*;
* An implementation of SelectionKey for Solaris.
*/
class
SelectionKeyImpl
public
class
SelectionKeyImpl
extends
AbstractSelectionKey
{
final
SelChImpl
channel
;
// package-private
final
SelectorImpl
selector
;
// package-private
public
final
SelectorImpl
selector
;
// Index for a pollfd array in Selector that this key is registered with
private
int
index
;
...
...
@@ -91,15 +91,15 @@ class SelectionKeyImpl
// The nio versions of these operations do not care if a key
// has been invalidated. They are for internal use by nio code.
void
nioReadyOps
(
int
ops
)
{
// package-private
public
void
nioReadyOps
(
int
ops
)
{
readyOps
=
ops
;
}
int
nioReadyOps
()
{
// package-private
public
int
nioReadyOps
()
{
return
readyOps
;
}
SelectionKey
nioInterestOps
(
int
ops
)
{
// package-private
public
SelectionKey
nioInterestOps
(
int
ops
)
{
if
((
ops
&
~
channel
().
validOps
())
!=
0
)
throw
new
IllegalArgumentException
();
channel
.
translateAndSetInterestOps
(
ops
,
this
);
...
...
@@ -107,7 +107,7 @@ class SelectionKeyImpl
return
this
;
}
int
nioInterestOps
()
{
// package-private
public
int
nioInterestOps
()
{
return
interestOps
;
}
...
...
src/share/classes/sun/nio/ch/SelectorImpl.java
浏览文件 @
60f91269
...
...
@@ -36,7 +36,7 @@ import java.util.*;
* Base Selector implementation class.
*/
abstract
class
SelectorImpl
public
abstract
class
SelectorImpl
extends
AbstractSelector
{
...
...
@@ -118,7 +118,7 @@ abstract class SelectorImpl
protected
abstract
void
implClose
()
throws
IOException
;
void
putEventOps
(
SelectionKeyImpl
sk
,
int
ops
)
{
}
public
void
putEventOps
(
SelectionKeyImpl
sk
,
int
ops
)
{
}
protected
final
SelectionKey
register
(
AbstractSelectableChannel
ch
,
int
ops
,
...
...
src/share/classes/sun/nio/ch/Util.java
浏览文件 @
60f91269
...
...
@@ -40,7 +40,7 @@ import sun.misc.Cleaner;
import
sun.security.action.GetPropertyAction
;
class
Util
{
public
class
Util
{
// -- Caches --
...
...
@@ -158,7 +158,7 @@ class Util {
/**
* Returns a temporary buffer of at least the given size
*/
static
ByteBuffer
getTemporaryDirectBuffer
(
int
size
)
{
public
static
ByteBuffer
getTemporaryDirectBuffer
(
int
size
)
{
BufferCache
cache
=
bufferCache
.
get
();
ByteBuffer
buf
=
cache
.
get
(
size
);
if
(
buf
!=
null
)
{
...
...
@@ -178,7 +178,7 @@ class Util {
/**
* Releases a temporary buffer by returning to the cache or freeing it.
*/
static
void
releaseTemporaryDirectBuffer
(
ByteBuffer
buf
)
{
public
static
void
releaseTemporaryDirectBuffer
(
ByteBuffer
buf
)
{
offerFirstTemporaryDirectBuffer
(
buf
);
}
...
...
@@ -467,7 +467,7 @@ class Util {
private
static
boolean
loaded
=
false
;
static
void
load
()
{
public
static
void
load
()
{
synchronized
(
Util
.
class
)
{
if
(
loaded
)
return
;
...
...
src/share/classes/sun/nio/ch/
Sctp
MessageInfoImpl.java
→
src/share/classes/sun/nio/ch/
sctp/
MessageInfoImpl.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
java.net.SocketAddress
;
import
com.sun.nio.sctp.MessageInfo
;
...
...
@@ -31,7 +31,7 @@ import com.sun.nio.sctp.Association;
/**
* An implementation of a MessageInfo.
*/
public
class
Sctp
MessageInfoImpl
extends
MessageInfo
{
public
class
MessageInfoImpl
extends
MessageInfo
{
private
final
SocketAddress
address
;
private
final
int
bytes
;
/* 0 */
...
...
@@ -43,9 +43,9 @@ public class SctpMessageInfoImpl extends MessageInfo {
private
long
timeToLive
;
/* 0L */
private
int
ppid
;
/* 0 */
public
Sctp
MessageInfoImpl
(
Association
association
,
SocketAddress
address
,
int
streamNumber
)
{
public
MessageInfoImpl
(
Association
association
,
SocketAddress
address
,
int
streamNumber
)
{
this
.
association
=
association
;
this
.
address
=
address
;
this
.
streamNumber
=
streamNumber
;
...
...
@@ -53,13 +53,13 @@ public class SctpMessageInfoImpl extends MessageInfo {
}
/* Invoked from native */
private
Sctp
MessageInfoImpl
(
int
assocId
,
SocketAddress
address
,
int
bytes
,
int
streamNumber
,
boolean
complete
,
boolean
unordered
,
int
ppid
)
{
private
MessageInfoImpl
(
int
assocId
,
SocketAddress
address
,
int
bytes
,
int
streamNumber
,
boolean
complete
,
boolean
unordered
,
int
ppid
)
{
this
.
assocId
=
assocId
;
this
.
address
=
address
;
this
.
bytes
=
bytes
;
...
...
@@ -75,7 +75,7 @@ public class SctpMessageInfoImpl extends MessageInfo {
}
/**
*
Sctp
MessageInfoImpl instances created from native will need to have their
* MessageInfoImpl instances created from native will need to have their
* association set from the channel.
*/
void
setAssociation
(
Association
association
)
{
...
...
src/share/classes/sun/nio/ch/SctpStdSocketOption.java
→
src/share/classes/sun/nio/ch/
sctp/
SctpStdSocketOption.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
com.sun.nio.sctp.SctpSocketOption
;
...
...
src/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java
浏览文件 @
60f91269
...
...
@@ -180,7 +180,7 @@ class DevPollSelectorImpl
((
SelChImpl
)
selch
).
kill
();
}
void
putEventOps
(
SelectionKeyImpl
sk
,
int
ops
)
{
public
void
putEventOps
(
SelectionKeyImpl
sk
,
int
ops
)
{
if
(
closed
)
throw
new
ClosedSelectorException
();
int
fd
=
IOUtil
.
fdVal
(
sk
.
channel
.
getFD
());
...
...
src/solaris/classes/sun/nio/ch/EPollSelectorImpl.java
浏览文件 @
60f91269
...
...
@@ -181,7 +181,7 @@ class EPollSelectorImpl
((
SelChImpl
)
selch
).
kill
();
}
void
putEventOps
(
SelectionKeyImpl
sk
,
int
ops
)
{
public
void
putEventOps
(
SelectionKeyImpl
sk
,
int
ops
)
{
if
(
closed
)
throw
new
ClosedSelectorException
();
pollWrapper
.
setInterest
(
sk
.
channel
,
ops
);
...
...
src/solaris/classes/sun/nio/ch/NativeThread.java
浏览文件 @
60f91269
...
...
@@ -37,21 +37,21 @@ package sun.nio.ch;
// always returns -1 and the signal(long) method has no effect.
class
NativeThread
{
public
class
NativeThread
{
// Returns an opaque token representing the native thread underlying the
// invoking Java thread. On systems that do not require signalling, this
// method always returns -1.
//
static
native
long
current
();
public
static
native
long
current
();
// Signals the given native thread so as to release it from a blocking I/O
// operation. On systems that do not require signalling, this method has
// no effect.
//
static
native
void
signal
(
long
nt
);
public
static
native
void
signal
(
long
nt
);
static
native
void
init
();
private
static
native
void
init
();
static
{
Util
.
load
();
...
...
src/solaris/classes/sun/nio/ch/PollArrayWrapper.java
浏览文件 @
60f91269
...
...
@@ -41,9 +41,9 @@ import sun.misc.*;
* @since 1.4
*/
class
PollArrayWrapper
extends
AbstractPollArrayWrapper
{
public
class
PollArrayWrapper
extends
AbstractPollArrayWrapper
{
static
final
short
POLLCONN
=
POLLOUT
;
public
static
final
short
POLLCONN
=
POLLOUT
;
// File descriptor to write for interrupt
int
interruptFD
;
...
...
src/solaris/classes/sun/nio/ch/
SctpAssoc
Change.java
→
src/solaris/classes/sun/nio/ch/
sctp/Association
Change.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
com.sun.nio.sctp.Association
;
import
com.sun.nio.sctp.AssociationChangeNotification
;
...
...
@@ -30,7 +30,7 @@ import com.sun.nio.sctp.AssociationChangeNotification;
/**
* An implementation of AssociationChangeNotification
*/
public
class
SctpAssoc
Change
extends
AssociationChangeNotification
public
class
Association
Change
extends
AssociationChangeNotification
implements
SctpNotification
{
/* static final ints so that they can be referenced from native */
...
...
@@ -50,10 +50,10 @@ public class SctpAssocChange extends AssociationChangeNotification
private
int
maxInStreams
;
/* Invoked from native */
private
SctpAssoc
Change
(
int
assocId
,
int
intEvent
,
int
maxOutStreams
,
int
maxInStreams
)
{
private
Association
Change
(
int
assocId
,
int
intEvent
,
int
maxOutStreams
,
int
maxInStreams
)
{
switch
(
intEvent
)
{
case
SCTP_COMM_UP
:
this
.
event
=
AssocChangeEvent
.
COMM_UP
;
...
...
src/solaris/classes/sun/nio/ch/
Sctp
AssociationImpl.java
→
src/solaris/classes/sun/nio/ch/
sctp/
AssociationImpl.java
浏览文件 @
60f91269
...
...
@@ -22,17 +22,17 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
com.sun.nio.sctp.Association
;
/**
* An implementation of Association
*/
public
class
Sctp
AssociationImpl
extends
Association
{
public
Sctp
AssociationImpl
(
int
associationID
,
int
maxInStreams
,
int
maxOutStreams
)
{
public
class
AssociationImpl
extends
Association
{
public
AssociationImpl
(
int
associationID
,
int
maxInStreams
,
int
maxOutStreams
)
{
super
(
associationID
,
maxInStreams
,
maxOutStreams
);
}
...
...
src/solaris/classes/sun/nio/ch/
Sctp
PeerAddrChange.java
→
src/solaris/classes/sun/nio/ch/
sctp/
PeerAddrChange.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
java.net.SocketAddress
;
import
com.sun.nio.sctp.Association
;
...
...
@@ -31,7 +31,7 @@ import com.sun.nio.sctp.PeerAddressChangeNotification;
/**
* An implementation of PeerAddressChangeNotification
*/
public
class
Sctp
PeerAddrChange
extends
PeerAddressChangeNotification
public
class
PeerAddrChange
extends
PeerAddressChangeNotification
implements
SctpNotification
{
/* static final ints so that they can be referenced from native */
...
...
@@ -51,7 +51,7 @@ public class SctpPeerAddrChange extends PeerAddressChangeNotification
private
AddressChangeEvent
event
;
/* Invoked from native */
private
Sctp
PeerAddrChange
(
int
assocId
,
SocketAddress
address
,
int
intEvent
)
{
private
PeerAddrChange
(
int
assocId
,
SocketAddress
address
,
int
intEvent
)
{
switch
(
intEvent
)
{
case
SCTP_ADDR_AVAILABLE
:
this
.
event
=
AddressChangeEvent
.
ADDR_AVAILABLE
;
...
...
src/solaris/classes/sun/nio/ch/
Sctp
ResultContainer.java
→
src/solaris/classes/sun/nio/ch/
sctp/
ResultContainer.java
浏览文件 @
60f91269
...
...
@@ -22,13 +22,13 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
/**
* Wraps the actual message or notification so that it can be
* set and returned from the native receive implementation.
*/
public
class
Sctp
ResultContainer
{
public
class
ResultContainer
{
/* static final ints so that they can be referenced from native */
static
final
int
NOTHING
=
0
;
static
final
int
MESSAGE
=
1
;
...
...
@@ -63,47 +63,47 @@ public class SctpResultContainer {
return
(
SctpNotification
)
value
;
}
Sctp
MessageInfoImpl
getMessageInfo
()
{
MessageInfoImpl
getMessageInfo
()
{
assert
type
()
==
MESSAGE
;
if
(
value
instanceof
Sctp
MessageInfoImpl
)
return
(
Sctp
MessageInfoImpl
)
value
;
if
(
value
instanceof
MessageInfoImpl
)
return
(
MessageInfoImpl
)
value
;
return
null
;
}
S
ctpS
endFailed
getSendFailed
()
{
SendFailed
getSendFailed
()
{
assert
type
()
==
SEND_FAILED
;
if
(
value
instanceof
S
ctpS
endFailed
)
return
(
S
ctpS
endFailed
)
value
;
if
(
value
instanceof
SendFailed
)
return
(
SendFailed
)
value
;
return
null
;
}
SctpAssoc
Change
getAssociationChanged
()
{
Association
Change
getAssociationChanged
()
{
assert
type
()
==
ASSOCIATION_CHANGED
;
if
(
value
instanceof
SctpAssoc
Change
)
return
(
SctpAssoc
Change
)
value
;
if
(
value
instanceof
Association
Change
)
return
(
Association
Change
)
value
;
return
null
;
}
Sctp
PeerAddrChange
getPeerAddressChanged
()
{
PeerAddrChange
getPeerAddressChanged
()
{
assert
type
()
==
PEER_ADDRESS_CHANGED
;
if
(
value
instanceof
Sctp
PeerAddrChange
)
return
(
Sctp
PeerAddrChange
)
value
;
if
(
value
instanceof
PeerAddrChange
)
return
(
PeerAddrChange
)
value
;
return
null
;
}
S
ctpS
hutdown
getShutdown
()
{
Shutdown
getShutdown
()
{
assert
type
()
==
SHUTDOWN
;
if
(
value
instanceof
S
ctpS
hutdown
)
return
(
S
ctpS
hutdown
)
value
;
if
(
value
instanceof
Shutdown
)
return
(
Shutdown
)
value
;
return
null
;
}
...
...
src/solaris/classes/sun/nio/ch/SctpChannelImpl.java
→
src/solaris/classes/sun/nio/ch/
sctp/
SctpChannelImpl.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
java.net.InetAddress
;
import
java.net.SocketAddress
;
...
...
@@ -53,11 +53,20 @@ import com.sun.nio.sctp.MessageInfo;
import
com.sun.nio.sctp.NotificationHandler
;
import
com.sun.nio.sctp.SctpChannel
;
import
com.sun.nio.sctp.SctpSocketOption
;
import
sun.nio.ch.DirectBuffer
;
import
sun.nio.ch.IOStatus
;
import
sun.nio.ch.IOUtil
;
import
sun.nio.ch.NativeThread
;
import
sun.nio.ch.Net
;
import
sun.nio.ch.PollArrayWrapper
;
import
sun.nio.ch.SelChImpl
;
import
sun.nio.ch.SelectionKeyImpl
;
import
sun.nio.ch.Util
;
import
static
com
.
sun
.
nio
.
sctp
.
SctpStandardSocketOptions
.*;
import
static
sun
.
nio
.
ch
.
Sctp
ResultContainer
.
SEND_FAILED
;
import
static
sun
.
nio
.
ch
.
Sctp
ResultContainer
.
ASSOCIATION_CHANGED
;
import
static
sun
.
nio
.
ch
.
Sctp
ResultContainer
.
PEER_ADDRESS_CHANGED
;
import
static
sun
.
nio
.
ch
.
Sctp
ResultContainer
.
SHUTDOWN
;
import
static
sun
.
nio
.
ch
.
sctp
.
ResultContainer
.
SEND_FAILED
;
import
static
sun
.
nio
.
ch
.
sctp
.
ResultContainer
.
ASSOCIATION_CHANGED
;
import
static
sun
.
nio
.
ch
.
sctp
.
ResultContainer
.
PEER_ADDRESS_CHANGED
;
import
static
sun
.
nio
.
ch
.
sctp
.
ResultContainer
.
SHUTDOWN
;
/**
* An implementation of an SctpChannel
...
...
@@ -745,7 +754,7 @@ public class SctpChannelImpl extends SctpChannel
receiveInvoked
.
set
(
Boolean
.
TRUE
);
try
{
SctpResultContainer
resultContainer
=
new
Sctp
ResultContainer
();
ResultContainer
resultContainer
=
new
ResultContainer
();
do
{
resultContainer
.
clear
();
synchronized
(
receiveLock
)
{
...
...
@@ -775,7 +784,7 @@ public class SctpChannelImpl extends SctpChannel
/* message or nothing */
if
(
resultContainer
.
hasSomething
())
{
/* Set the association before returning */
Sctp
MessageInfoImpl
info
=
MessageInfoImpl
info
=
resultContainer
.
getMessageInfo
();
synchronized
(
stateLock
)
{
assert
association
!=
null
;
...
...
@@ -812,7 +821,7 @@ public class SctpChannelImpl extends SctpChannel
private
int
receive
(
int
fd
,
ByteBuffer
dst
,
Sctp
ResultContainer
resultContainer
,
ResultContainer
resultContainer
,
boolean
peek
)
throws
IOException
{
int
pos
=
dst
.
position
();
...
...
@@ -837,7 +846,7 @@ public class SctpChannelImpl extends SctpChannel
}
private
int
receiveIntoNativeBuffer
(
int
fd
,
Sctp
ResultContainer
resultContainer
,
ResultContainer
resultContainer
,
ByteBuffer
bb
,
int
rem
,
int
pos
,
...
...
@@ -854,7 +863,7 @@ public class SctpChannelImpl extends SctpChannel
private
InternalNotificationHandler
internalNotificationHandler
=
new
InternalNotificationHandler
();
private
void
handleNotificationInternal
(
Sctp
ResultContainer
resultContainer
)
private
void
handleNotificationInternal
(
ResultContainer
resultContainer
)
{
invokeNotificationHandler
(
resultContainer
,
internalNotificationHandler
,
null
);
...
...
@@ -869,8 +878,8 @@ public class SctpChannelImpl extends SctpChannel
if
(
not
.
event
().
equals
(
AssociationChangeNotification
.
AssocChangeEvent
.
COMM_UP
)
&&
association
==
null
)
{
SctpAssocChange
sac
=
(
SctpAssoc
Change
)
not
;
association
=
new
Sctp
AssociationImpl
AssociationChange
sac
=
(
Association
Change
)
not
;
association
=
new
AssociationImpl
(
sac
.
assocId
(),
sac
.
maxInStreams
(),
sac
.
maxOutStreams
());
}
return
HandlerResult
.
CONTINUE
;
...
...
@@ -878,7 +887,7 @@ public class SctpChannelImpl extends SctpChannel
}
private
<
T
>
HandlerResult
invokeNotificationHandler
(
Sctp
ResultContainer
resultContainer
,
(
ResultContainer
resultContainer
,
NotificationHandler
<
T
>
handler
,
T
attachment
)
{
SctpNotification
notification
=
resultContainer
.
notification
();
...
...
@@ -1078,7 +1087,7 @@ public class SctpChannelImpl extends SctpChannel
/* Native */
private
static
native
void
initIDs
();
static
native
int
receive0
(
int
fd
,
Sctp
ResultContainer
resultContainer
,
static
native
int
receive0
(
int
fd
,
ResultContainer
resultContainer
,
long
address
,
int
length
,
boolean
peek
)
throws
IOException
;
static
native
int
send0
(
int
fd
,
long
address
,
int
length
,
...
...
src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java
→
src/solaris/classes/sun/nio/ch/
sctp/
SctpMultiChannelImpl.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
java.net.InetAddress
;
import
java.net.SocketAddress
;
...
...
@@ -53,8 +53,17 @@ import com.sun.nio.sctp.MessageInfo;
import
com.sun.nio.sctp.SctpChannel
;
import
com.sun.nio.sctp.SctpMultiChannel
;
import
com.sun.nio.sctp.SctpSocketOption
;
import
sun.nio.ch.DirectBuffer
;
import
sun.nio.ch.NativeThread
;
import
sun.nio.ch.IOStatus
;
import
sun.nio.ch.IOUtil
;
import
sun.nio.ch.Net
;
import
sun.nio.ch.PollArrayWrapper
;
import
sun.nio.ch.SelChImpl
;
import
sun.nio.ch.SelectionKeyImpl
;
import
sun.nio.ch.Util
;
import
static
com
.
sun
.
nio
.
sctp
.
SctpStandardSocketOptions
.*;
import
static
sun
.
nio
.
ch
.
Sctp
ResultContainer
.*;
import
static
sun
.
nio
.
ch
.
sctp
.
ResultContainer
.*;
/**
* An implementation of SctpMultiChannel
...
...
@@ -466,7 +475,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
receiveInvoked
.
set
(
Boolean
.
TRUE
);
try
{
SctpResultContainer
resultContainer
=
new
Sctp
ResultContainer
();
ResultContainer
resultContainer
=
new
ResultContainer
();
do
{
resultContainer
.
clear
();
synchronized
(
receiveLock
)
{
...
...
@@ -498,7 +507,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
/* message or nothing */
if
(
resultContainer
.
hasSomething
())
{
/* Set the association before returning */
Sctp
MessageInfoImpl
info
=
MessageInfoImpl
info
=
resultContainer
.
getMessageInfo
();
info
.
setAssociation
(
lookupAssociation
(
info
.
associationID
()));
...
...
@@ -542,7 +551,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
private
int
receive
(
int
fd
,
ByteBuffer
dst
,
Sctp
ResultContainer
resultContainer
)
ResultContainer
resultContainer
)
throws
IOException
{
int
pos
=
dst
.
position
();
int
lim
=
dst
.
limit
();
...
...
@@ -566,7 +575,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
}
private
int
receiveIntoNativeBuffer
(
int
fd
,
Sctp
ResultContainer
resultContainer
,
ResultContainer
resultContainer
,
ByteBuffer
bb
,
int
rem
,
int
pos
)
...
...
@@ -580,7 +589,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
private
InternalNotificationHandler
internalNotificationHandler
=
new
InternalNotificationHandler
();
private
void
handleNotificationInternal
(
Sctp
ResultContainer
resultContainer
)
private
void
handleNotificationInternal
(
ResultContainer
resultContainer
)
{
invokeNotificationHandler
(
resultContainer
,
internalNotificationHandler
,
null
);
...
...
@@ -592,12 +601,12 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
@Override
public
HandlerResult
handleNotification
(
AssociationChangeNotification
not
,
Object
unused
)
{
SctpAssocChange
sac
=
(
SctpAssoc
Change
)
not
;
AssociationChange
sac
=
(
Association
Change
)
not
;
/* Update map to reflect change in association */
switch
(
not
.
event
())
{
case
COMM_UP
:
Association
newAssociation
=
new
Sctp
AssociationImpl
Association
newAssociation
=
new
AssociationImpl
(
sac
.
assocId
(),
sac
.
maxInStreams
(),
sac
.
maxOutStreams
());
addAssociation
(
newAssociation
);
break
;
...
...
@@ -612,7 +621,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
}
private
<
T
>
HandlerResult
invokeNotificationHandler
(
Sctp
ResultContainer
resultContainer
,
ResultContainer
resultContainer
,
NotificationHandler
<
T
>
handler
,
T
attachment
)
{
HandlerResult
result
;
...
...
@@ -956,7 +965,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
/* Use common native implementation shared between
* one-to-one and one-to-many */
private
static
int
receive0
(
int
fd
,
Sctp
ResultContainer
resultContainer
,
ResultContainer
resultContainer
,
long
address
,
int
length
)
throws
IOException
{
...
...
src/solaris/classes/sun/nio/ch/SctpNet.java
→
src/solaris/classes/sun/nio/ch/
sctp/
SctpNet.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
java.io.FileDescriptor
;
import
java.io.IOException
;
...
...
@@ -34,6 +34,8 @@ import java.util.Set;
import
java.util.HashSet
;
import
java.security.AccessController
;
import
sun.security.action.GetPropertyAction
;
import
sun.nio.ch.IOUtil
;
import
sun.nio.ch.Net
;
import
com.sun.nio.sctp.SctpSocketOption
;
import
static
com
.
sun
.
nio
.
sctp
.
SctpStandardSocketOptions
.*;
...
...
src/solaris/classes/sun/nio/ch/SctpNotification.java
→
src/solaris/classes/sun/nio/ch/
sctp/
SctpNotification.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
com.sun.nio.sctp.Association
;
import
com.sun.nio.sctp.Notification
;
...
...
src/solaris/classes/sun/nio/ch/SctpServerChannelImpl.java
→
src/solaris/classes/sun/nio/ch/
sctp/
SctpServerChannelImpl.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
java.net.SocketAddress
;
import
java.net.InetSocketAddress
;
...
...
@@ -41,6 +41,15 @@ import com.sun.nio.sctp.SctpChannel;
import
com.sun.nio.sctp.SctpServerChannel
;
import
com.sun.nio.sctp.SctpSocketOption
;
import
com.sun.nio.sctp.SctpStandardSocketOptions
;
import
sun.nio.ch.DirectBuffer
;
import
sun.nio.ch.NativeThread
;
import
sun.nio.ch.IOStatus
;
import
sun.nio.ch.IOUtil
;
import
sun.nio.ch.Net
;
import
sun.nio.ch.PollArrayWrapper
;
import
sun.nio.ch.SelChImpl
;
import
sun.nio.ch.SelectionKeyImpl
;
import
sun.nio.ch.Util
;
/**
* An implementation of SctpServerChannel
...
...
src/solaris/classes/sun/nio/ch/
Sctp
SendFailed.java
→
src/solaris/classes/sun/nio/ch/
sctp/
SendFailed.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
java.nio.ByteBuffer
;
import
java.net.SocketAddress
;
...
...
@@ -32,7 +32,7 @@ import com.sun.nio.sctp.SendFailedNotification;
/**
* An implementation of SendFailedNotification
*/
public
class
S
ctpS
endFailed
extends
SendFailedNotification
public
class
SendFailed
extends
SendFailedNotification
implements
SctpNotification
{
private
Association
association
;
...
...
@@ -45,11 +45,11 @@ public class SctpSendFailed extends SendFailedNotification
private
int
streamNumber
;
/* Invoked from native */
private
S
ctpS
endFailed
(
int
assocId
,
SocketAddress
address
,
ByteBuffer
buffer
,
int
errorCode
,
int
streamNumber
)
{
private
SendFailed
(
int
assocId
,
SocketAddress
address
,
ByteBuffer
buffer
,
int
errorCode
,
int
streamNumber
)
{
this
.
assocId
=
assocId
;
this
.
errorCode
=
errorCode
;
this
.
streamNumber
=
streamNumber
;
...
...
src/solaris/classes/sun/nio/ch/
Sctp
Shutdown.java
→
src/solaris/classes/sun/nio/ch/
sctp/
Shutdown.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
com.sun.nio.sctp.Association
;
import
com.sun.nio.sctp.ShutdownNotification
;
...
...
@@ -30,7 +30,7 @@ import com.sun.nio.sctp.ShutdownNotification;
/**
* An implementation of ShutdownNotification
*/
public
class
S
ctpS
hutdown
extends
ShutdownNotification
public
class
Shutdown
extends
ShutdownNotification
implements
SctpNotification
{
private
Association
association
;
...
...
@@ -39,7 +39,7 @@ public class SctpShutdown extends ShutdownNotification
private
int
assocId
;
/* Invoked from native */
private
S
ctpS
hutdown
(
int
assocId
)
{
private
Shutdown
(
int
assocId
)
{
this
.
assocId
=
assocId
;
}
...
...
src/solaris/native/sun/nio/ch/Sctp.h
→
src/solaris/native/sun/nio/ch/
sctp/
Sctp.h
浏览文件 @
60f91269
文件已移动
src/solaris/native/sun/nio/ch/SctpChannelImpl.c
→
src/solaris/native/sun/nio/ch/
sctp/
SctpChannelImpl.c
浏览文件 @
60f91269
...
...
@@ -32,21 +32,21 @@
#include "nio.h"
#include "net_util.h"
#include "net_util_md.h"
#include "sun_nio_ch_SctpNet.h"
#include "sun_nio_ch_SctpChannelImpl.h"
#include "sun_nio_ch_
SctpAssoc
Change.h"
#include "sun_nio_ch_
Sctp
ResultContainer.h"
#include "sun_nio_ch_
Sctp
PeerAddrChange.h"
#include "sun_nio_ch_
sctp_
SctpNet.h"
#include "sun_nio_ch_
sctp_
SctpChannelImpl.h"
#include "sun_nio_ch_
sctp_Association
Change.h"
#include "sun_nio_ch_
sctp_
ResultContainer.h"
#include "sun_nio_ch_
sctp_
PeerAddrChange.h"
/* sizeof(union sctp_notification */
#define NOTIFICATION_BUFFER_SIZE 280
#define MESSAGE_IMPL_CLASS "sun/nio/ch/
Sctp
MessageInfoImpl"
#define RESULT_CONTAINER_CLASS "sun/nio/ch/
Sctp
ResultContainer"
#define SEND_FAILED_CLASS "sun/nio/ch/
Sctp
SendFailed"
#define ASSOC_CHANGE_CLASS "sun/nio/ch/
SctpAssoc
Change"
#define PEER_CHANGE_CLASS "sun/nio/ch/
Sctp
PeerAddrChange"
#define SHUTDOWN_CLASS "sun/nio/ch/
Sctp
Shutdown"
#define MESSAGE_IMPL_CLASS "sun/nio/ch/
sctp/
MessageInfoImpl"
#define RESULT_CONTAINER_CLASS "sun/nio/ch/
sctp/
ResultContainer"
#define SEND_FAILED_CLASS "sun/nio/ch/
sctp/
SendFailed"
#define ASSOC_CHANGE_CLASS "sun/nio/ch/
sctp/Association
Change"
#define PEER_CHANGE_CLASS "sun/nio/ch/
sctp/
PeerAddrChange"
#define SHUTDOWN_CLASS "sun/nio/ch/
sctp/
Shutdown"
struct
controlData
{
int
assocId
;
...
...
@@ -55,38 +55,40 @@ struct controlData {
unsigned
int
ppid
;
};
static
jclass
smi_class
;
/* sun.nio.ch.
Sctp
MessageInfoImpl */
static
jmethodID
smi_ctrID
;
/* sun.nio.ch.
Sctp
MessageInfoImpl.<init> */
static
jfieldID
src_valueID
;
/* sun.nio.ch.
Sctp
ResultContainer.value */
static
jfieldID
src_typeID
;
/* sun.nio.ch.
Sctp
ResultContainer.type */
static
jclass
ssf_class
;
/* sun.nio.ch.
Sctp
SendFailed */
static
jmethodID
ssf_ctrID
;
/* sun.nio.ch.
Sctp
SendFailed.<init> */
static
jclass
sac_class
;
/* sun.nio.ch.
SctpAssociationChanged
*/
static
jmethodID
sac_ctrID
;
/* sun.nio.ch.
SctpAssociationChanged.<init>
*/
static
jclass
spc_class
;
/* sun.nio.ch.
Sctp
PeerAddressChanged */
static
jmethodID
spc_ctrID
;
/* sun.nio.ch.
Sctp
PeerAddressChanged.<init> */
static
jclass
ss_class
;
/* sun.nio.ch.
Sctp
Shutdown */
static
jmethodID
ss_ctrID
;
/* sun.nio.ch.
Sctp
Shutdown.<init> */
static
jfieldID
isa_addrID
;
/* java.net.InetSocketAddress.addr */
static
jfieldID
isa_portID
;
/* java.net.InetSocketAddress.port */
static
jclass
smi_class
;
/* sun.nio.ch.
sctp.
MessageInfoImpl */
static
jmethodID
smi_ctrID
;
/* sun.nio.ch.
sctp.
MessageInfoImpl.<init> */
static
jfieldID
src_valueID
;
/* sun.nio.ch.
sctp.
ResultContainer.value */
static
jfieldID
src_typeID
;
/* sun.nio.ch.
sctp.
ResultContainer.type */
static
jclass
ssf_class
;
/* sun.nio.ch.
sctp.
SendFailed */
static
jmethodID
ssf_ctrID
;
/* sun.nio.ch.
sctp.
SendFailed.<init> */
static
jclass
sac_class
;
/* sun.nio.ch.
sctp.AssociationChange
*/
static
jmethodID
sac_ctrID
;
/* sun.nio.ch.
sctp.AssociationChange.<init>
*/
static
jclass
spc_class
;
/* sun.nio.ch.
sctp.
PeerAddressChanged */
static
jmethodID
spc_ctrID
;
/* sun.nio.ch.
sctp.
PeerAddressChanged.<init> */
static
jclass
ss_class
;
/* sun.nio.ch.
sctp.
Shutdown */
static
jmethodID
ss_ctrID
;
/* sun.nio.ch.
sctp.
Shutdown.<init> */
static
jfieldID
isa_addrID
;
/* java.net.InetSocketAddress.addr
*/
static
jfieldID
isa_portID
;
/* java.net.InetSocketAddress.port
*/
/* defined in SctpNet.c */
jobject
SockAddrToInetSocketAddress
(
JNIEnv
*
env
,
struct
sockaddr
*
addr
);
jint
handleSocketError
(
JNIEnv
*
env
,
jint
errorValue
);
/* use SocketChannelImpl's checkConnect implementation */
extern
jint
Java_sun_nio_ch_SocketChannelImpl_checkConnect
(
JNIEnv
*
env
,
jobject
this
,
jobject
fdo
,
jboolean
block
,
jboolean
ready
);
/*
* Class: sun_nio_ch_SctpChannelImpl
* Class: sun_nio_ch_
sctp_
SctpChannelImpl
* Method: initIDs
* Signature: ()V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpChannelImpl_initIDs
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_
sctp_
SctpChannelImpl_initIDs
(
JNIEnv
*
env
,
jclass
klass
)
{
jclass
cls
;
/*
Sctp
MessageInfoImpl */
/* MessageInfoImpl */
cls
=
(
*
env
)
->
FindClass
(
env
,
MESSAGE_IMPL_CLASS
);
CHECK_NULL
(
cls
);
smi_class
=
(
*
env
)
->
NewGlobalRef
(
env
,
cls
);
...
...
@@ -95,7 +97,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpChannelImpl_initIDs
"(ILjava/net/SocketAddress;IIZZI)V"
);
CHECK_NULL
(
smi_ctrID
);
/*
Sctp
ResultContainer */
/* ResultContainer */
cls
=
(
*
env
)
->
FindClass
(
env
,
RESULT_CONTAINER_CLASS
);
CHECK_NULL
(
cls
);
src_valueID
=
(
*
env
)
->
GetFieldID
(
env
,
cls
,
"value"
,
"Ljava/lang/Object;"
);
...
...
@@ -103,7 +105,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpChannelImpl_initIDs
src_typeID
=
(
*
env
)
->
GetFieldID
(
env
,
cls
,
"type"
,
"I"
);
CHECK_NULL
(
src_typeID
);
/* S
ctpS
endFailed */
/* SendFailed */
cls
=
(
*
env
)
->
FindClass
(
env
,
SEND_FAILED_CLASS
);
CHECK_NULL
(
cls
);
ssf_class
=
(
*
env
)
->
NewGlobalRef
(
env
,
cls
);
...
...
@@ -112,7 +114,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpChannelImpl_initIDs
"(ILjava/net/SocketAddress;Ljava/nio/ByteBuffer;II)V"
);
CHECK_NULL
(
ssf_ctrID
);
/*
SctpAssoc
Change */
/*
Association
Change */
cls
=
(
*
env
)
->
FindClass
(
env
,
ASSOC_CHANGE_CLASS
);
CHECK_NULL
(
cls
);
sac_class
=
(
*
env
)
->
NewGlobalRef
(
env
,
cls
);
...
...
@@ -120,7 +122,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpChannelImpl_initIDs
sac_ctrID
=
(
*
env
)
->
GetMethodID
(
env
,
cls
,
"<init>"
,
"(IIII)V"
);
CHECK_NULL
(
sac_ctrID
);
/*
Sctp
PeerAddrChange */
/* PeerAddrChange */
cls
=
(
*
env
)
->
FindClass
(
env
,
PEER_CHANGE_CLASS
);
CHECK_NULL
(
cls
);
spc_class
=
(
*
env
)
->
NewGlobalRef
(
env
,
cls
);
...
...
@@ -129,7 +131,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpChannelImpl_initIDs
"(ILjava/net/SocketAddress;I)V"
);
CHECK_NULL
(
spc_ctrID
);
/*
sun.nio.ch.Sctp
Shutdown */
/* Shutdown */
cls
=
(
*
env
)
->
FindClass
(
env
,
SHUTDOWN_CLASS
);
CHECK_NULL
(
cls
);
ss_class
=
(
*
env
)
->
NewGlobalRef
(
env
,
cls
);
...
...
@@ -266,13 +268,13 @@ void handleSendFailed
}
}
/* create S
ctpS
endFailed */
/* create SendFailed */
resultObj
=
(
*
env
)
->
NewObject
(
env
,
ssf_class
,
ssf_ctrID
,
ssf
->
ssf_assoc_id
,
isaObj
,
bufferObj
,
ssf
->
ssf_error
,
sri
->
sinfo_stream
);
CHECK_NULL
(
resultObj
);
(
*
env
)
->
SetObjectField
(
env
,
resultContainerObj
,
src_valueID
,
resultObj
);
(
*
env
)
->
SetIntField
(
env
,
resultContainerObj
,
src_typeID
,
sun_nio_ch_
Sctp
ResultContainer_SEND_FAILED
);
sun_nio_ch_
sctp_
ResultContainer_SEND_FAILED
);
}
void
handleAssocChange
...
...
@@ -282,38 +284,38 @@ void handleAssocChange
switch
(
sac
->
sac_state
)
{
case
SCTP_COMM_UP
:
state
=
sun_nio_ch_
SctpAssoc
Change_SCTP_COMM_UP
;
state
=
sun_nio_ch_
sctp_Association
Change_SCTP_COMM_UP
;
break
;
case
SCTP_COMM_LOST
:
state
=
sun_nio_ch_
SctpAssoc
Change_SCTP_COMM_LOST
;
state
=
sun_nio_ch_
sctp_Association
Change_SCTP_COMM_LOST
;
break
;
case
SCTP_RESTART
:
state
=
sun_nio_ch_
SctpAssoc
Change_SCTP_RESTART
;
state
=
sun_nio_ch_
sctp_Association
Change_SCTP_RESTART
;
break
;
case
SCTP_SHUTDOWN_COMP
:
state
=
sun_nio_ch_
SctpAssoc
Change_SCTP_SHUTDOWN
;
state
=
sun_nio_ch_
sctp_Association
Change_SCTP_SHUTDOWN
;
break
;
case
SCTP_CANT_STR_ASSOC
:
state
=
sun_nio_ch_
SctpAssoc
Change_SCTP_CANT_START
;
state
=
sun_nio_ch_
sctp_Association
Change_SCTP_CANT_START
;
}
/* create
SctpAssociationChanged
*/
/* create
AssociationChange
*/
resultObj
=
(
*
env
)
->
NewObject
(
env
,
sac_class
,
sac_ctrID
,
sac
->
sac_assoc_id
,
state
,
sac
->
sac_outbound_streams
,
sac
->
sac_inbound_streams
);
CHECK_NULL
(
resultObj
);
(
*
env
)
->
SetObjectField
(
env
,
resultContainerObj
,
src_valueID
,
resultObj
);
(
*
env
)
->
SetIntField
(
env
,
resultContainerObj
,
src_typeID
,
sun_nio_ch_
Sctp
ResultContainer_ASSOCIATION_CHANGED
);
sun_nio_ch_
sctp_
ResultContainer_ASSOCIATION_CHANGED
);
}
void
handleShutdown
(
JNIEnv
*
env
,
jobject
resultContainerObj
,
struct
sctp_shutdown_event
*
sse
)
{
/* create S
ctpS
hutdown */
/* create Shutdown */
jobject
resultObj
=
(
*
env
)
->
NewObject
(
env
,
ss_class
,
ss_ctrID
,
sse
->
sse_assoc_id
);
CHECK_NULL
(
resultObj
);
(
*
env
)
->
SetObjectField
(
env
,
resultContainerObj
,
src_valueID
,
resultObj
);
(
*
env
)
->
SetIntField
(
env
,
resultContainerObj
,
src_typeID
,
sun_nio_ch_
Sctp
ResultContainer_SHUTDOWN
);
sun_nio_ch_
sctp_
ResultContainer_SHUTDOWN
);
}
void
handlePeerAddrChange
...
...
@@ -324,35 +326,35 @@ void handlePeerAddrChange
switch
(
state
)
{
case
SCTP_ADDR_AVAILABLE
:
event
=
sun_nio_ch_
Sctp
PeerAddrChange_SCTP_ADDR_AVAILABLE
;
event
=
sun_nio_ch_
sctp_
PeerAddrChange_SCTP_ADDR_AVAILABLE
;
break
;
case
SCTP_ADDR_UNREACHABLE
:
event
=
sun_nio_ch_
Sctp
PeerAddrChange_SCTP_ADDR_UNREACHABLE
;
event
=
sun_nio_ch_
sctp_
PeerAddrChange_SCTP_ADDR_UNREACHABLE
;
break
;
case
SCTP_ADDR_REMOVED
:
event
=
sun_nio_ch_
Sctp
PeerAddrChange_SCTP_ADDR_REMOVED
;
event
=
sun_nio_ch_
sctp_
PeerAddrChange_SCTP_ADDR_REMOVED
;
break
;
case
SCTP_ADDR_ADDED
:
event
=
sun_nio_ch_
Sctp
PeerAddrChange_SCTP_ADDR_ADDED
;
event
=
sun_nio_ch_
sctp_
PeerAddrChange_SCTP_ADDR_ADDED
;
break
;
case
SCTP_ADDR_MADE_PRIM
:
event
=
sun_nio_ch_
Sctp
PeerAddrChange_SCTP_ADDR_MADE_PRIM
;
event
=
sun_nio_ch_
sctp_
PeerAddrChange_SCTP_ADDR_MADE_PRIM
;
#ifdef __linux__
/* Solaris currently doesn't support SCTP_ADDR_CONFIRMED */
break
;
case
SCTP_ADDR_CONFIRMED
:
event
=
sun_nio_ch_
Sctp
PeerAddrChange_SCTP_ADDR_CONFIRMED
;
event
=
sun_nio_ch_
sctp_
PeerAddrChange_SCTP_ADDR_CONFIRMED
;
#endif
/* __linux__ */
}
addressObj
=
SockAddrToInetSocketAddress
(
env
,
(
struct
sockaddr
*
)
&
spc
->
spc_aaddr
);
/* create
Sctp
PeerAddressChanged */
/* create PeerAddressChanged */
resultObj
=
(
*
env
)
->
NewObject
(
env
,
spc_class
,
spc_ctrID
,
spc
->
spc_assoc_id
,
addressObj
,
event
);
CHECK_NULL
(
resultObj
);
(
*
env
)
->
SetObjectField
(
env
,
resultContainerObj
,
src_valueID
,
resultObj
);
(
*
env
)
->
SetIntField
(
env
,
resultContainerObj
,
src_typeID
,
sun_nio_ch_
Sctp
ResultContainer_PEER_ADDRESS_CHANGED
);
sun_nio_ch_
sctp_
ResultContainer_PEER_ADDRESS_CHANGED
);
}
void
handleUninteresting
...
...
@@ -403,7 +405,7 @@ void handleMessage
isa
=
SockAddrToInetSocketAddress
(
env
,
sap
);
getControlData
(
msg
,
cdata
);
/* create
Sctp
MessageInfoImpl */
/* create MessageInfoImpl */
resultObj
=
(
*
env
)
->
NewObject
(
env
,
smi_class
,
smi_ctrID
,
cdata
->
assocId
,
isa
,
read
,
cdata
->
streamNumber
,
isEOR
?
JNI_TRUE
:
JNI_FALSE
,
...
...
@@ -411,15 +413,15 @@ void handleMessage
CHECK_NULL
(
resultObj
);
(
*
env
)
->
SetObjectField
(
env
,
resultContainerObj
,
src_valueID
,
resultObj
);
(
*
env
)
->
SetIntField
(
env
,
resultContainerObj
,
src_typeID
,
sun_nio_ch_
Sctp
ResultContainer_MESSAGE
);
sun_nio_ch_
sctp_
ResultContainer_MESSAGE
);
}
/*
* Class: sun_nio_ch_SctpChannelImpl
* Class: sun_nio_ch_
sctp_
SctpChannelImpl
* Method: receive0
* Signature: (ILsun/nio/ch/
Sctp
ResultContainer;JIZ)I
* Signature: (ILsun/nio/ch/
sctp/
ResultContainer;JIZ)I
*/
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_SctpChannelImpl_receive0
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_
sctp_
SctpChannelImpl_receive0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jobject
resultContainerObj
,
jlong
address
,
jint
length
,
jboolean
peek
)
{
SOCKADDR
sa
;
...
...
@@ -505,11 +507,11 @@ JNIEXPORT jint JNICALL Java_sun_nio_ch_SctpChannelImpl_receive0
}
/*
* Class: sun_nio_ch_SctpChannelImpl
* Class: sun_nio_ch_
sctp_
SctpChannelImpl
* Method: send0
* Signature: (IJILjava/net/SocketAddress;IIZI)I
*/
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_SctpChannelImpl_send0
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_
sctp_
SctpChannelImpl_send0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jlong
address
,
jint
length
,
jobject
saTarget
,
jint
assocId
,
jint
streamNumber
,
jboolean
unordered
,
jint
ppid
)
{
...
...
@@ -582,11 +584,11 @@ JNIEXPORT jint JNICALL Java_sun_nio_ch_SctpChannelImpl_send0
}
/*
* Class: sun_nio_ch_SctpChannelImpl
* Class: sun_nio_ch_
sctp_
SctpChannelImpl
* Method: checkConnect
* Signature: (Ljava/io/FileDescriptor;ZZ)I
*/
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_SctpChannelImpl_checkConnect
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_
sctp_
SctpChannelImpl_checkConnect
(
JNIEnv
*
env
,
jobject
this
,
jobject
fdo
,
jboolean
block
,
jboolean
ready
)
{
return
Java_sun_nio_ch_SocketChannelImpl_checkConnect
(
env
,
this
,
fdo
,
block
,
ready
);
...
...
src/solaris/native/sun/nio/ch/SctpNet.c
→
src/solaris/native/sun/nio/ch/
sctp/
SctpNet.c
浏览文件 @
60f91269
...
...
@@ -34,8 +34,8 @@
#include "nio.h"
#include "net_util.h"
#include "net_util_md.h"
#include "sun_nio_ch_SctpNet.h"
#include "sun_nio_ch_SctpStdSocketOption.h"
#include "sun_nio_ch_
sctp_
SctpNet.h"
#include "sun_nio_ch_
sctp_
SctpStdSocketOption.h"
static
jclass
isaCls
=
0
;
static
jmethodID
isaCtrID
=
0
;
...
...
@@ -143,12 +143,12 @@ handleSocketError(JNIEnv *env, jint errorValue)
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: init
* Signature: ()V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_init
Java_sun_nio_ch_
sctp_
SctpNet_init
(
JNIEnv
*
env
,
jclass
cl
)
{
int
sp
[
2
];
if
(
socketpair
(
PF_UNIX
,
SOCK_STREAM
,
0
,
sp
)
<
0
)
{
...
...
@@ -160,11 +160,11 @@ Java_sun_nio_ch_SctpNet_init
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: socket0
* Signature: (Z)I
*/
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_SctpNet_socket0
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_socket0
(
JNIEnv
*
env
,
jclass
klass
,
jboolean
oneToOne
)
{
int
fd
;
struct
sctp_event_subscribe
event
;
...
...
@@ -202,11 +202,11 @@ JNIEXPORT jint JNICALL Java_sun_nio_ch_SctpNet_socket0
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: bindx
* Signature: (I[Ljava/net/InetAddress;IIZ)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_bindx
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_bindx
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jobjectArray
addrs
,
jint
port
,
jint
addrsLength
,
jboolean
add
,
jboolean
preferIPv6
)
{
SOCKADDR
*
sap
,
*
tmpSap
;
...
...
@@ -241,24 +241,24 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_bindx
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: listen0
* Signature: (II)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_listen0
Java_sun_nio_ch_
sctp_
SctpNet_listen0
(
JNIEnv
*
env
,
jclass
cl
,
jint
fd
,
jint
backlog
)
{
if
(
listen
(
fd
,
backlog
)
<
0
)
handleSocketError
(
env
,
errno
);
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: connect0
* Signature: (ILjava/net/InetAddress;I)I
*/
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_SctpNet_connect0
Java_sun_nio_ch_
sctp_
SctpNet_connect0
(
JNIEnv
*
env
,
jclass
clazz
,
int
fd
,
jobject
iao
,
jint
port
)
{
SOCKADDR
sa
;
int
sa_len
=
SOCKADDR_LEN
;
...
...
@@ -282,12 +282,12 @@ Java_sun_nio_ch_SctpNet_connect0
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: close0
* Signature: (I)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_close0
Java_sun_nio_ch_
sctp_
SctpNet_close0
(
JNIEnv
*
env
,
jclass
clazz
,
jint
fd
)
{
if
(
fd
!=
-
1
)
{
int
rv
=
close
(
fd
);
...
...
@@ -297,12 +297,12 @@ Java_sun_nio_ch_SctpNet_close0
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: preClose0
* Signature: (I)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_preClose0
Java_sun_nio_ch_
sctp_
SctpNet_preClose0
(
JNIEnv
*
env
,
jclass
clazz
,
jint
fd
)
{
if
(
preCloseFD
>=
0
)
{
if
(
dup2
(
preCloseFD
,
fd
)
<
0
)
...
...
@@ -340,11 +340,11 @@ jobject SockAddrToInetSocketAddress
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: getLocalAddresses0
* Signature: (I)[Ljava/net/SocketAddress;
*/
JNIEXPORT
jobjectArray
JNICALL
Java_sun_nio_ch_SctpNet_getLocalAddresses0
JNIEXPORT
jobjectArray
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_getLocalAddresses0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
)
{
void
*
addr_buf
,
*
laddr
;
struct
sockaddr
*
sap
;
...
...
@@ -448,11 +448,11 @@ jobjectArray getRemoteAddresses
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: getRemoteAddresses0
* Signature: (II)[Ljava/net/SocketAddress;
*/
JNIEXPORT
jobjectArray
JNICALL
Java_sun_nio_ch_SctpNet_getRemoteAddresses0
JNIEXPORT
jobjectArray
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_getRemoteAddresses0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jint
assocId
)
{
return
getRemoteAddresses
(
env
,
fd
,
assocId
);
}
...
...
@@ -465,13 +465,13 @@ int mapSocketOption
int
level
;
int
optname
;
}
const
opts
[]
=
{
{
sun_nio_ch_SctpStdSocketOption_SCTP_DISABLE_FRAGMENTS
,
IPPROTO_SCTP
,
SCTP_DISABLE_FRAGMENTS
},
{
sun_nio_ch_SctpStdSocketOption_SCTP_EXPLICIT_COMPLETE
,
IPPROTO_SCTP
,
SCTP_EXPLICIT_EOR
},
{
sun_nio_ch_SctpStdSocketOption_SCTP_FRAGMENT_INTERLEAVE
,
IPPROTO_SCTP
,
SCTP_FRAGMENT_INTERLEAVE
},
{
sun_nio_ch_SctpStdSocketOption_SCTP_NODELAY
,
IPPROTO_SCTP
,
SCTP_NODELAY
},
{
sun_nio_ch_SctpStdSocketOption_SO_SNDBUF
,
SOL_SOCKET
,
SO_SNDBUF
},
{
sun_nio_ch_SctpStdSocketOption_SO_RCVBUF
,
SOL_SOCKET
,
SO_RCVBUF
},
{
sun_nio_ch_SctpStdSocketOption_SO_LINGER
,
SOL_SOCKET
,
SO_LINGER
}
};
{
sun_nio_ch_
sctp_
SctpStdSocketOption_SCTP_DISABLE_FRAGMENTS
,
IPPROTO_SCTP
,
SCTP_DISABLE_FRAGMENTS
},
{
sun_nio_ch_
sctp_
SctpStdSocketOption_SCTP_EXPLICIT_COMPLETE
,
IPPROTO_SCTP
,
SCTP_EXPLICIT_EOR
},
{
sun_nio_ch_
sctp_
SctpStdSocketOption_SCTP_FRAGMENT_INTERLEAVE
,
IPPROTO_SCTP
,
SCTP_FRAGMENT_INTERLEAVE
},
{
sun_nio_ch_
sctp_
SctpStdSocketOption_SCTP_NODELAY
,
IPPROTO_SCTP
,
SCTP_NODELAY
},
{
sun_nio_ch_
sctp_
SctpStdSocketOption_SO_SNDBUF
,
SOL_SOCKET
,
SO_SNDBUF
},
{
sun_nio_ch_
sctp_
SctpStdSocketOption_SO_RCVBUF
,
SOL_SOCKET
,
SO_RCVBUF
},
{
sun_nio_ch_
sctp_
SctpStdSocketOption_SO_LINGER
,
SOL_SOCKET
,
SO_LINGER
}
};
int
i
;
for
(
i
=
0
;
i
<
(
int
)(
sizeof
(
opts
)
/
sizeof
(
opts
[
0
]));
i
++
)
{
...
...
@@ -487,11 +487,11 @@ int mapSocketOption
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: setIntOption0
* Signature: (III)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_setIntOption0
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_setIntOption0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jint
opt
,
int
arg
)
{
int
klevel
,
kopt
;
int
result
;
...
...
@@ -505,7 +505,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_setIntOption0
return
;
}
if
(
opt
==
sun_nio_ch_SctpStdSocketOption_SO_LINGER
)
{
if
(
opt
==
sun_nio_ch_
sctp_
SctpStdSocketOption_SO_LINGER
)
{
parg
=
(
void
*
)
&
linger
;
arglen
=
sizeof
(
linger
);
if
(
arg
>=
0
)
{
...
...
@@ -522,16 +522,16 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_setIntOption0
if
(
NET_SetSockOpt
(
fd
,
klevel
,
kopt
,
parg
,
arglen
)
<
0
)
{
JNU_ThrowByNameWithLastError
(
env
,
JNU_JAVANETPKG
"SocketException"
,
"sun_nio_ch_SctpNet.setIntOption0"
);
"sun_nio_ch_
sctp_
SctpNet.setIntOption0"
);
}
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: getIntOption0
* Signature: (II)I
*/
JNIEXPORT
int
JNICALL
Java_sun_nio_ch_SctpNet_getIntOption0
JNIEXPORT
int
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_getIntOption0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jint
opt
)
{
int
klevel
,
kopt
;
int
result
;
...
...
@@ -545,7 +545,7 @@ JNIEXPORT int JNICALL Java_sun_nio_ch_SctpNet_getIntOption0
return
-
1
;
}
if
(
opt
==
sun_nio_ch_SctpStdSocketOption_SO_LINGER
)
{
if
(
opt
==
sun_nio_ch_
sctp_
SctpStdSocketOption_SO_LINGER
)
{
arg
=
(
void
*
)
&
linger
;
arglen
=
sizeof
(
linger
);
}
else
{
...
...
@@ -559,18 +559,18 @@ JNIEXPORT int JNICALL Java_sun_nio_ch_SctpNet_getIntOption0
return
-
1
;
}
if
(
opt
==
sun_nio_ch_SctpStdSocketOption_SO_LINGER
)
if
(
opt
==
sun_nio_ch_
sctp_
SctpStdSocketOption_SO_LINGER
)
return
linger
.
l_onoff
?
linger
.
l_linger
:
-
1
;
else
return
result
;
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: getPrimAddrOption0
* Signature: (II)Ljava/net/SocketAddress;
*/
JNIEXPORT
jobject
JNICALL
Java_sun_nio_ch_SctpNet_getPrimAddrOption0
JNIEXPORT
jobject
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_getPrimAddrOption0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jint
assocId
)
{
struct
sctp_setprim
prim
;
unsigned
int
prim_len
=
sizeof
(
prim
);
...
...
@@ -588,11 +588,11 @@ JNIEXPORT jobject JNICALL Java_sun_nio_ch_SctpNet_getPrimAddrOption0
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: setPrimAddrOption0
* Signature: (IILjava/net/InetAddress;I)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_setPrimAddrOption0
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_setPrimAddrOption0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jint
assocId
,
jobject
iaObj
,
jint
port
)
{
struct
sctp_setprim
prim
;
struct
sockaddr
*
sap
=
(
struct
sockaddr
*
)
&
prim
.
ssp_addr
;
...
...
@@ -612,11 +612,11 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_setPrimAddrOption0
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: setPeerPrimAddrOption0
* Signature: (IILjava/net/InetAddress;I)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_setPeerPrimAddrOption0
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_setPeerPrimAddrOption0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jint
assocId
,
jobject
iaObj
,
jint
port
,
jboolean
preferIPv6
)
{
struct
sctp_setpeerprim
prim
;
...
...
@@ -638,11 +638,11 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_setPeerPrimAddrOption0
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: getInitMsgOption0
* Signature: (I[I)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_getInitMsgOption0
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_getInitMsgOption0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jintArray
retVal
)
{
struct
sctp_initmsg
sctp_initmsg
;
unsigned
int
sim_len
=
sizeof
(
sctp_initmsg
);
...
...
@@ -661,11 +661,11 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_getInitMsgOption0
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: setInitMsgOption0
* Signature: (III)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_setInitMsgOption0
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_setInitMsgOption0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jint
inArg
,
jint
outArg
)
{
struct
sctp_initmsg
sctp_initmsg
;
...
...
@@ -682,11 +682,11 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_setInitMsgOption0
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: shutdown0
* Signature: (II)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_shutdown0
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_shutdown0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jint
assocId
)
{
int
rv
;
struct
msghdr
msg
[
1
];
...
...
@@ -738,11 +738,11 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_shutdown0
}
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_
sctp_
SctpNet
* Method: branch
* Signature: (II)I
*/
JNIEXPORT
int
JNICALL
Java_sun_nio_ch_SctpNet_branch0
JNIEXPORT
int
JNICALL
Java_sun_nio_ch_
sctp_
SctpNet_branch0
(
JNIEnv
*
env
,
jclass
klass
,
jint
fd
,
jint
assocId
)
{
int
newfd
=
0
;
if
((
newfd
=
nio_sctp_peeloff
(
fd
,
assocId
))
<
0
)
{
...
...
src/solaris/native/sun/nio/ch/SctpServerChannelImpl.c
→
src/solaris/native/sun/nio/ch/
sctp/
SctpServerChannelImpl.c
浏览文件 @
60f91269
...
...
@@ -23,7 +23,7 @@
* questions.
*/
#include "sun_nio_ch_SctpServerChannelImpl.h"
#include "sun_nio_ch_
sctp_
SctpServerChannelImpl.h"
extern
void
Java_sun_nio_ch_ServerSocketChannelImpl_initIDs
(
JNIEnv
*
env
,
jclass
c
);
...
...
@@ -32,21 +32,21 @@ extern jint Java_sun_nio_ch_ServerSocketChannelImpl_accept0(JNIEnv* env,
jobject
this
,
jobject
ssfdo
,
jobject
newfdo
,
jobjectArray
isaa
);
/*
* Class: sun_nio_ch_SctpServerChannelImpl
* Class: sun_nio_ch_
sctp_
SctpServerChannelImpl
* Method: initIDs
* Signature: ()V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpServerChannelImpl_initIDs
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_
sctp_
SctpServerChannelImpl_initIDs
(
JNIEnv
*
env
,
jclass
c
)
{
Java_sun_nio_ch_ServerSocketChannelImpl_initIDs
(
env
,
c
);
}
/*
* Class: sun_nio_ch_SctpServerChannelImpl
* Class: sun_nio_ch_
sctp_
SctpServerChannelImpl
* Method: accept0
* Signature: (Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;[Ljava/net/InetSocketAddress;)I
*/
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_SctpServerChannelImpl_accept0
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_
sctp_
SctpServerChannelImpl_accept0
(
JNIEnv
*
env
,
jobject
this
,
jobject
ssfdo
,
jobject
newfdo
,
jobjectArray
isaa
)
{
return
Java_sun_nio_ch_ServerSocketChannelImpl_accept0
(
env
,
this
,
ssfdo
,
newfdo
,
isaa
);
...
...
src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java
浏览文件 @
60f91269
...
...
@@ -585,7 +585,7 @@ final class WindowsSelectorImpl extends SelectorImpl {
((
SelChImpl
)
selch
).
kill
();
}
void
putEventOps
(
SelectionKeyImpl
sk
,
int
ops
)
{
public
void
putEventOps
(
SelectionKeyImpl
sk
,
int
ops
)
{
synchronized
(
closeLock
)
{
if
(
pollWrapper
==
null
)
throw
new
ClosedSelectorException
();
...
...
src/windows/classes/sun/nio/ch/SctpChannelImpl.java
→
src/windows/classes/sun/nio/ch/
sctp/
SctpChannelImpl.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
java.net.SocketAddress
;
import
java.net.InetAddress
;
...
...
src/windows/classes/sun/nio/ch/SctpMultiChannelImpl.java
→
src/windows/classes/sun/nio/ch/
sctp/
SctpMultiChannelImpl.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
java.net.SocketAddress
;
import
java.net.InetAddress
;
...
...
src/windows/classes/sun/nio/ch/SctpServerChannelImpl.java
→
src/windows/classes/sun/nio/ch/
sctp/
SctpServerChannelImpl.java
浏览文件 @
60f91269
...
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.nio.ch
;
package
sun.nio.ch
.sctp
;
import
java.net.SocketAddress
;
import
java.net.InetAddress
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录