WO2010094150A1 - 动态关闭/打开sctp套接字监听连接功能的方法和装置 - Google Patents

动态关闭/打开sctp套接字监听连接功能的方法和装置 Download PDF

Info

Publication number
WO2010094150A1
WO2010094150A1 PCT/CN2009/000165 CN2009000165W WO2010094150A1 WO 2010094150 A1 WO2010094150 A1 WO 2010094150A1 CN 2009000165 W CN2009000165 W CN 2009000165W WO 2010094150 A1 WO2010094150 A1 WO 2010094150A1
Authority
WO
WIPO (PCT)
Prior art keywords
socket
application layer
client
transport layer
predetermined condition
Prior art date
Application number
PCT/CN2009/000165
Other languages
English (en)
French (fr)
Inventor
王爱军
李敬
Original Assignee
阿尔卡特朗讯
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿尔卡特朗讯 filed Critical 阿尔卡特朗讯
Priority to CN200980146352.5A priority Critical patent/CN102217282B/zh
Priority to PCT/CN2009/000165 priority patent/WO2010094150A1/zh
Publication of WO2010094150A1 publication Critical patent/WO2010094150A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/326Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the transport layer [OSI layer 4]

Definitions

  • the present invention relates to communication networks, and more particularly to servers running the SCTP protocol in a communication network. Background technique
  • SCTP Stream Control Transmission Protocol
  • SIGTRAN IETF Signaling Transport Working Group
  • SCTP and TCP/UDP belong to the transport layer protocol.
  • SCTP is similar to TCP and provides a stable and orderly data delivery service between two endpoints.
  • SCTP is similar to UDP and can protect data message boundaries.
  • SCTP provides these benefits through ordered or unordered multi-homing and multi-streaming capabilities, both of which increase availability.
  • SCTP provides two types of interface modes: one is a one-to-one socket and the other is a one-to-many socketiser in a pair
  • each socket corresponds to one SCTP association
  • in a one-to-many socket multiple SCTP associations can exist simultaneously on one socket, and the socket is also used for monitoring.
  • New connection request is a one-to-one socket and the other is a one-to-many socket.
  • One-to-many style sockets provide programmers with the ability to write to the server without having to manage a large number of socket descriptors.
  • a single socket handle can represent multiple SCTP associations, while the socket is also used to listen for new connection requests.
  • the function of listening to the connection can only be stopped by closing the socket.
  • those SCTP associations use the same socket handle, so those SCTP associations that have been established will also be disconnected while the socket listening connection function is turned off.
  • the local server has established an SCTP association with the remote client 21 ', client 22, and client 23, while the server 1, the socket is still listening.
  • any connection request from a remote client can be transferred to the application layer at the end of the server.
  • the SCTP association that the socket 1 is expected to establish at this time is established, for example, with the client 21, the client 22, and the client 23, an SCTP association is established, and the application layer of the server terminal does not want to After receiving any connection request from the remote client, the server 1 can only disable the listening connection by closing the socket.
  • the server 1 once the server's socket is closed, then the server 1, the previous and the remote client 2, client 22, and client 23, established the SCTP association. Also disconnected. Summary of the invention
  • the present invention proposes a method and a control device for closing a function of a socket listening connection on the basis of maintaining an established association in a server running a SCTP protocol of a communication network.
  • the server determines, at the application layer, whether the association state on the socket of the server satisfies the first predetermined condition, and if the association state satisfies the first predetermined condition, the application layer notifies the transport layer to reject the client from the client. Connection request.
  • the server determines, at the application layer, whether an association state on the socket of the server satisfies a second predetermined condition, and if the association state satisfies a second predetermined condition, the application layer notifies the transport layer
  • the received connection request from the client is forwarded to the application layer.
  • a method for shutting down a socket listening connection on a basis of maintaining an established association in a server running a SCTP protocol of a communication network, the socket being a one-to-many socket comprising the following steps: a. determining, at the application layer, whether the association state on the socket of the server satisfies the first predetermined condition; b. if the association state satisfies the first predetermined condition, The application layer notifies the transport layer to reject the connection request from the client.
  • the method further includes the following steps: c. determining, by the application layer, whether an association state on the socket of the server meets a second predetermined condition; d. if the association state satisfies a second The predetermined condition, the application layer notifying the transport layer to forward the received connection request from the client to the application layer.
  • the step b further comprises the following steps: bl. If the associated state satisfies the first predetermined condition, the application layer passes the first control parameter to the transport layer; b2. based on the first control parameter The transport layer rejects the connection request from the client.
  • the step bl further includes: if the associated state satisfies the first predetermined condition, the application layer passes the first control parameter to the transmission by calling a sctp_opt_info() function provided by the transport layer Floor.
  • the step d further includes the following steps: dl. if the associated state satisfies a second predetermined condition, the application layer passes the second control parameter to the transport layer; d2. based on the second Controlling parameters, the transport layer forwarding the received connection request from the client to the application layer.
  • the step dl further includes: if the associated state satisfies a second predetermined condition, the application layer passes the second control parameter to the device by calling a sctp_opt_info() function provided by the transport layer The transport layer.
  • a control apparatus for a function of closing a socket listening connection on a basis of maintaining an established association in a server running a SCTP protocol of a communication network, the socket a one-to-many socket, wherein: the first determining means is configured to determine, at the application layer, whether an association state on a socket of the server meets a first predetermined condition; and the first notification device is configured to: When the association state satisfies the first predetermined condition, the application layer notifies the transport layer to reject the connection request from the client.
  • control device further includes: second determining means, configured to determine, at the application layer, whether an association state on the socket of the server satisfies a second predetermined condition; and second notification means, if The association state satisfies the second predetermined condition, and the application layer notifies the transport layer to forward the received connection request from the client to the application layer.
  • second determining means configured to determine, at the application layer, whether an association state on the socket of the server satisfies a second predetermined condition
  • second notification means if The association state satisfies the second predetermined condition, and the application layer notifies the transport layer to forward the received connection request from the client to the application layer.
  • the first notification device further includes: a first transmitting device, if Receiving, by the application layer, the first control parameter to the transport layer; the rejecting device, for rejecting the connection from the client at the transport layer based on the first control parameter request.
  • the first transmitting device is further configured to: when the associated state meets the first predetermined condition, send the first control parameter at the application layer by calling a sctp_opt_info() function provided by the transport layer Passed to the transport layer.
  • the second notification device further includes: a second transmitting device, configured to: if the associated state meets a second predetermined condition, transfer the second control parameter from the application layer to the transport layer; And a forwarding device, configured to forward, according to the second control parameter, the received connection request from the client to the application layer at the transport layer.
  • a second transmitting device configured to: if the associated state meets a second predetermined condition, transfer the second control parameter from the application layer to the transport layer
  • a forwarding device configured to forward, according to the second control parameter, the received connection request from the client to the application layer at the transport layer.
  • the second transmitting device is further configured to: when the associated state meets the second predetermined condition, the second control parameter is sent by the application layer by calling a sctp_opt_info() function provided by the transport layer Passed to the transport layer.
  • the first predetermined condition comprises any one of: - the number of associations established on the socket is greater than a first predetermined associated value; - the socket is at a predetermined time The number of connection requests received from the client within the range is greater than a predetermined request value; - the client receiving the connection request received by the socket is not in the predetermined client list.
  • the second predetermined condition comprises: the number of associations established on the socket is smaller than the second predetermined associated value.
  • a new identifier can be defined in the SCTP protocol stack, and the identifier is assigned by passing parameters from the application layer to the transport layer.
  • the function of closing the socket listening connection on the basis of maintaining the established SCTP association is implemented.
  • the functionality of the socket listening connection can be reopened as needed.
  • the function of the socket listening connection is closed, the connection request from the client is directly rejected at the transport layer of the server and is not further passed to the application layer, so that not only the attack of malicious access but also the system can be improved. Efficiency to avoid wasting resources.
  • FIG. 1 is a network diagram showing the function of closing a socket listening connection in a server running a SCTP protocol of a communication network according to the prior art
  • FIG. 2 is a network diagram showing the function of closing a socket listening connection on the basis of maintaining an established association in a server running a SCTP protocol of a communication network according to the present invention
  • FIG. 3 is a flow chart showing a method for shutting down and reopening a socket listening connection on the basis of maintaining an established association in a server running a SCTP protocol of a communication network according to the present invention
  • Fig. 4 is a block diagram showing the construction of a control means for closing and reopening the function of the socket listening connection on the basis of maintaining the established association in the server running the SCTP protocol of the communication network according to the present invention.
  • FIG. 2 is a network diagram showing the function of closing a socket listening connection on the basis of maintaining an established association in a server running a SCTP protocol of a communication network according to the present invention.
  • the figure shows server 1, client 21, client 22 and client 23. Those skilled in the art should understand that only three clients are used as an example here. In a specific application, the server 1 can establish an SCTP association with any multiple clients. In the figure, the communication between server 1 and client 21, client 22 and client 23 is based on the SCTP transport layer protocol.
  • the socket has established an SCTP association with the client 21, the client 22, and the client 23, the function of the socket listening connection is still open, that is, the socket is still used to listen to the client.
  • New connection request If a remote client wants to establish an SCTP association with the socket of the server 1, the transport layer of the server 1 will receive a connection request sent from the client, and then the connection request will pass through the transport layer. Passed to the application layer. After receiving the connection request, the application layer determines whether the connection request is accepted. If the connection request is accepted, the SCTP association is established with the client that issued the connection request, otherwise the connection request from the client is rejected.
  • the application layer of the server 1 After the socket of the server 1 establishes an SCTP association with the client 21, the client 22, and the client 23, if the application layer of the server 1 does not wish to receive any connection request from the client, the application layer will notify the transmission.
  • the layer rejects the connection request from the client, thereby turning off the function of the socket listening connection of the server 1.
  • the application layer can implement the function of closing the socket monitoring connection by transmitting parameters to the transport layer to achieve the newly defined identifier with the function of closing/opening the socket listening connection in the transmission protocol. Effect.
  • the connection request from any client is sent to the transport layer of server 1 and will be rejected directly at the transport layer and no longer passed to the application layer.
  • the function of the socket listening connection of the server 1 can be opened again, so that the application layer of the server 1 can re-receive the connection request from the client, thereby establishing an SCTP association with the new client.
  • the transport layer may be notified to receive the re-sent from the disconnected client.
  • the request is passed to the application layer so that the socket establishes an SCTP association with the clients again.
  • the server running the SCTP protocol in the present invention is as follows with reference to FIG. 3 and FIG. 2 together with FIG. A detailed description of the method of maintaining and maintaining the function of the listening connection of the socket of the server based on the established SCTP association is described.
  • FIG. 3 is a flow chart showing a method for shutting down and reopening a socket listening connection on the basis of maintaining an established association in a server running a SCTP protocol of a communication network in accordance with the present invention.
  • the communication between the server and the client in the communication network involved in FIG. 3 is based on the SCTP transport layer protocol.
  • an SCTP-ENABLE-LISTENING flag needs to be defined in the existing SCTP protocol stack. If the flag is set to 1, the function of the listening connection of the corresponding socket is turned on. If the flag is set to 0, the function of the listening connection of the corresponding socket is turned off. Of course, those skilled in the art can also set the SCTP_ENABLE_LISTENING flag to 1 to indicate that the function of the corresponding socket's listening connection is turned off, and the flag is set to 0 to indicate that the corresponding socket's listening connection function is turn on.
  • the function of the server 1 to close the socket listening connection and the function of reopening its listening connection will be described in detail below with reference to the flowchart shown in FIG. 3 for the server 1 to maintain the established association.
  • step S11 the server 1 determines at the application layer whether the association state on the socket of the server satisfies the first predetermined condition.
  • the server 1 may determine, at the application layer, whether the number of associations established on the socket is greater than the first predetermined associated value.
  • the server 1 determines at the application layer whether the number of associations established on the socket is greater than five.
  • the server 1 should The layer can be used to determine the function of closing the listening connection of the socket.
  • the server 1 can also determine at the application layer whether the number of connection requests received from the client by the socket within a predetermined time range is greater than a predetermined request value.
  • the predetermined time range may be a shorter period of time, for example, 60 seconds.
  • the predetermined request value may be ten.
  • the socket of server 1 receives a large number of connection requests from the client side within a short period of time, then the server 1 can be considered to be under a malicious connection attack. Then, the application layer of server 1 can decide to disable the listening connection function of the socket.
  • the server 1 can also determine at the application layer whether the client that receives the connection request received by the socket is in the predetermined client list.
  • the application layer of Server 1 can decide to turn off the listening function of the socket.
  • the server 1 determines at the application layer whether the number of associations established on the socket is greater than the first predetermined associated value.
  • the server 1 determines at the application layer that the associated value of the socket is less than five, the function of opening the listening connection of the socket is maintained.
  • step S12 the application layer notifies the transport layer to reject the connection request from the client.
  • the application layer passes the first control parameter to the transport layer for reassigning the newly defined SCTP_ENABLE_LISTENING flag in the SCTP protocol stack. For example, reset the SCTP_ENABLE_LISTENING flag to 0 to turn off the socket listening connection.
  • the application layer can pass the application interface (API) by calling the transport layer
  • the provided sctp-opt_info() function passes the first control parameter to the transport layer.
  • the first control parameter includes a file handle of the socket, the file handle is used to inform the transport layer which socket to perform operations on, and includes the type of operation performed, for example, closing/opening a certain set The function of the connection monitor connection, and the result of the operation performed, for example, re-assigning the SCTP_ENABLE_LISTENING flag to 0, that is, the function of closing the socket monitor connection.
  • the application layer may also decide to re-open the listening connection function of the socket.
  • the server 1 determines at the application layer whether the association state on the socket satisfies the second predetermined condition to determine whether to reopen the function of the socket listening connection.
  • the server 1 determines at the application layer whether the number of associations established on the socket is less than a second predetermined associated value.
  • the second predetermined associated value may be less than or equal to the first predetermined associated value.
  • the second predetermined associated value is equal to the first predetermined associated value. That is, when the first predetermined associated value is five, preferably, the second predetermined associated value is also five.
  • step S14 the application layer of the server 1 notifies the transport layer to forward the received connection request from the client to the application layer.
  • the application layer passes the second control parameter to the transport layer for the SCTP protocol stack.
  • the newly defined SCTP_ENABLE_LISTENING flag is re-assigned. For example, re-assign the SCTP_ENABLE_LISTENING flag to 1, which turns on the socket listening connection.
  • the application layer can pass the second control parameter to the transport layer by calling the transport layer via the sctp_opt_info() function provided by the application program interface (API).
  • the second control parameter includes a file handle of the socket, the file handle is used to inform the transport layer which socket to perform operations on, and includes the type of operation performed, for example, closing/opening a certain set The function of the connection monitor connection, and the result of the operation performed, for example, re-assigning the SCTP_ENABLE_LISTENING flag to 1, which turns on the function of the socket monitor connection.
  • the transport layer at the server 1 side further passes the connection request from the client to the application layer for the application layer to determine whether to establish an SCTP association with the client that sent the connection request.
  • FIG. 4 is a block diagram showing the structure of a control device for turning off and re-opening a socket listening connection on the basis of maintaining an established association in a server running SCTP protocol of a communication network according to the present invention.
  • the communication between the server and the client in the communication network involved in FIG. 4 is based on the SCTP transport layer protocol.
  • an SCTP-ENABLE-LISTENING flag needs to be defined in the existing SCTP protocol stack. If the flag is set to 1, the function of the listening connection of the corresponding socket is turned on. If the flag is set to 0, the function of the listening connection of the corresponding socket is turned off.
  • SCTP_ENABLE_LISTENING flag 1; the function of the listening connection of the socket should be turned off, and the flag is set to 0 to indicate the listening connection of the corresponding socket. The function is turned on.
  • the function of the server 1 to close the socket listening connection and the function of reopening its listening connection will be described in detail below with reference to the block diagram shown in FIG. 4 for the server 1 to maintain the established association.
  • the first judging device 101 in the control device 10 in the server 1 judges at the application layer whether the association state on the socket of the own server satisfies the first predetermined condition.
  • the first determining device 101 may determine, at the application layer, whether the number of associations established on the socket is greater than a first predetermined associated value.
  • the first determining means 101 determines at the application layer whether the number of associations established on the socket is greater than five.
  • the application layer of server 1 can determine the function of closing the listening connection of the socket.
  • the first determining means 101 can also determine at the application layer whether the number of connection requests from the client received by the socket within a predetermined time range is greater than a predetermined request value.
  • the predetermined time range may be a shorter period of time, for example, 60 seconds.
  • the predetermined request value may be ten.
  • the socket of server 1 receives a large number of connection requests from the client side within a short period of time, then the server 1 can be considered to be under a malicious connection attack. Then, the application layer of server 1 can decide to disable the listening connection function of the socket.
  • the first determining means 101 may also determine, at the application layer, whether the client that sends the connection request received by the socket is in the predetermined client list.
  • the first determining means 101 can determine whether the received IP address of the client transmitting the connection request is within a predetermined IP address list of the client that wishes to establish the SCTP association. If it is not in the IP address list, then the application layer of Server 1 can decide to turn off the listening function of the socket.
  • the application layer determines whether the number of associations established on the socket is greater than the first predetermined associated value.
  • the first judging means 101 judges at the application layer that the associated number of associations established on the socket is less than five, the function of opening the snooping connection of the socket is continued.
  • the first notifying means 102 in the control means 10 notifies the transport layer at the application layer to reject the connection request from the client.
  • the first transmitting device in the first notification device 102 (not shown in FIG. 4 for simplicity) transmits the first control parameter from the application layer to the transport layer for newly defined SCTP in the SCTP protocol stack.
  • the ENABLE_LISTENING flag is re-assigned. For example, reset the SCTP_ENABLE_LISTENING flag to 0 to turn off the socket listening connection.
  • the first delivery device may pass the first control parameter to the transport layer at the application layer by calling the transport layer via the sctp-opt_info() function provided by the application program interface (API).
  • the first control parameter includes a file handle of the socket, the file handle is used to inform the transport layer which socket to perform operations on, and a class including the performed operation Type, for example, the ability to turn off/on a socket listening connection, and the result of the operation performed, for example, resetting the SCTP_EN ABLE_LISTENING flag to 0, which turns off the socket listening connection. .
  • the rejecting device in the first notification device 102 rejects any connection request from the client at the transport layer and no longer passes it to the application layer.
  • the application layer may also decide to re-open the listening connection function of the socket.
  • the second determining means 103 in the control device 10 determines at the application layer whether the associated state on the socket satisfies the second predetermined condition to determine whether to reopen the function of the socket listening connection.
  • the second determining means 103 determines at the application layer whether the number of associations established on the socket is less than a second predetermined associated value.
  • the second predetermined associated value may be less than or equal to the first predetermined associated value.
  • the second predetermined associated value is equal to the first predetermined associated value. That is, when the first predetermined associated value is five, preferably, the second predetermined associated value is also five.
  • the second determining means 103 determines at the application layer that the associated value established on the socket is still greater than or equal to five, the function of closing the socket listening connection is continued.
  • the second notifying device 104 in the control device 10 notifies the application layer that the transport layer will receive the connection from the client. The request is forwarded to the application layer.
  • the second delivery device in the second notification device 104 passes the second control parameter from the application layer to the transport layer for newly defined SCTP ENABLE in the SCTP protocol stack.
  • the LISTENING flag is re-assigned. E.g, Re-assign the SCTP_ENABLE_LISTENING flag to 1, which turns on the socket listening connection.
  • the second delivery device may pass the second control parameter to the transport layer at the application layer by calling the transport layer via the sctp_opt_info() function provided by the application program interface (API).
  • the second control parameter includes a file handle of the socket, the file handle is used to inform the transport layer which socket to perform operations, and includes the type of operation performed, for example, closing/opening a certain set The function of the connection monitor connection, and the result of the operation performed, for example, re-assigning the SCTP_ENABLE_LISTENING flag to 1, which turns on the function of the socket monitor connection.
  • the forwarding device in the second notification device 104 (for simplicity, not shown in FIG. 4) further transmits a connection request from the client to the application layer at the transport layer for the application layer to determine whether to send the connection.
  • the requesting client establishes an SCTP association.

Abstract

本发明提出了一种在通信网络的运行SCTP协议的服务器中用于在维持已建立的关联的基础上关闭套接字监听连接的功能的方法和控制装置。服务器在应用层判断本服务器的套接字上的关联状态是否满足第一预定条件,如果所述关联状态满足第一预定条件,则所述应用层通知传输层拒绝来自客户端的连接请求。优选地,服务器在所述应用层判断本服务器的所述套接字上的关联状态是否满足第二预定条件,如果所述关联状态满足第二预定条件,则所述应用层通知所述传输层将接收到的来自所述客户端的连接请求转发给所述应用层。采用本发明的技术方案,不仅可以避免恶意接入的袭击,而且可以提高系统的效率以避免资源的浪费。

Description

动态关闭 /打开 SCTP套接字
监听连接功能的方法和装置 技术领域
本发明涉及通信网络,尤其涉及通信网络中运行 SCTP协议的服 务器。 背景技术
流控制传输协议 ( Stream Control Transmission Protocol, SCTP ) 是为了在 IP网上传输信令而由 IETF的信令传输工作组( SIGTRAN ) 提出的传输层协议,其在 RFC2960和 RFC4960中被具体定义。 SCTP 与 TCP/UDP同属于传输层协议。 一方面, SCTP类似于 TCP, 可以 在两个端点之间提供稳定、 有序的数据传递服务, 另一方面, SCTP 类似于 UDP, 可以保护数据消息边界。 然而, 与 TCP和 UDP不同, SCTP 是通过有序或无序的多 宿主 ( Multi-homing ) 和多 流 ( Multi-streaming ) 功能提供这些收益的, 这两种功能均可提高可用 性。
SCTP 提供了两种类型的接口模式: 一种是一对一套接字 ( one-to-one socket ), 另一种是一对多套接字 ( one-to-many socket )„ 在一对一套接字中, 每个套接字对应一个 SCTP关联, 而在一对多套 接字中, 在一个套接字上可以同时存在多个 SCTP关联, 同时该套接 字还被用于监听新的连接请求。
一对多风格的套接字向程序员提供了可以在不用管理大量套接 字句柄( socket descriptor ) 的情况下写服务器的能力。 其中, 一个单 个的套接字句柄就可以代表多个 SCTP关联, 与此同时该套接字还被 用于监听新的连接请求。但是如果该套接字所有期待建立的关联都已 请求, 那么在现有技术中, 只能通过关闭该套接字来停止其监听连接 的功能。 然而, 由于服务器端的套接字监听连接的功能和已经建立的 那些 SCTP关联采用的是同一个套接字句柄,那么在关闭套接字监听 连接的功能的同时, 已经建立的那些 SCTP关联也会断开。
如图 1 所示, 本地的服务器 Γ已经和远端的客户端 21 ', 客户 端 22, , 以及客户端 23,建立了 SCTP关联, 与此同时, 服务器 1,的 套接字仍处于监听连接的状态,任何来自远端的客户端的连接请求都 可以传输至该服务器 Γ端的应用层。 如果此时服务器 1,的套接字所 期待建立的 SCTP关联都已建立,例如,与客户端 21,, 客户端 22, , 以及客户端 23,建立 SCTP关联, 而该服务器 Γ端的应用层不想再接 收到任何来自远端的客户端的连接请求, 那么,该服务器 1,只能通过 关闭该套接字来实现关闭监听连接的功能。但是,正如图 1 中示出的, 一旦服务器 Γ的套接字被关闭了, 那么, 服务器 1, 之前与远端的客 户端 2 Γ , 客户端 22, , 以及客户端 23,建立的 SCTP关联也断开了。 发明内容
为解决现有技术中的上述缺点, 本发明提出了一种在通信网络的 运行 SCTP协议的服务器中用于在维持已建立的关联的基础上关闭套接 字监听连接的功能的方法和控制装置。 在本发明中, 服务器在应用层 判断本服务器的套接字上的关联状态是否满足第一预定条件,如果所述 关联状态满足第一预定条件, 则所述应用层通知传输层拒绝来自客户端 的连接请求。 优选地, 服务器在所述应用层判断本服务器的所述套接字 上的关联状态是否满足第二预定条件,如果所述关联状态满足第二预定 条件, 则所述应用层通知所述传输层将接收到的来自所述客户端的连接 请求转发给所述应用层。
根据本发明的第一方面, 提供了一种在通信网络的运行 SCTP协 议的服务器中用于在维持已建立的关联的基础上关闭套接字监听连接 的功能的方法,所述套接字为一对多套接字,其中,包括以下步骤: a.在 应用层判断本服务器的套接字上的关联状态是否满足第一预定条件; b. 如果所述关联状态满足第一预定条件, 则所述应用层通知传输层拒 绝来自客户端的连接请求。 优选地, 所述步骤 b之后还包括以下步骤: c. 在所述应用层判断 本服务器的所述套接字上的关联状态是否满足第二预定条件; d. 如果 所述关联状态满足第二预定条件, 则所述应用层通知所述传输层将接收 到的来自所述客户端的连接请求转发给所述应用层。
优选地, 所述步骤 b还包括以下步骤: bl . 如果所述关联状态满足 第一预定条件,则所述应用层将第一控制参数传递给所述传输层; b2. 基 于该第一控制参数, 所述传输层拒绝来自所述客户端的连接请求。
优选地, 所述步骤 bl还包括: 如果所述关联状态满足第一预定条 件, 则所述应用层通过调用所述传输层提供的 sctp_opt— info()函数将第 一控制参数传递给所述传输层。
优选地, 所述步骤 d还包括以下步骤: dl. 如果所述关联状态满足 第二预定条件, 则所述应用层将所述第二控制参数传递给所述传输层; d2. 基于该第二控制参数, 所述传输层将接收到的来自所述客户端的连 接请求转发给所述应用层。
优选地, 所述步骤 dl还包括: 如果所述关联状态满足第二预定条 件, 则所述应用层通过调用所述传输层提供的 sctp_opt— info()函数将所 述第二控制参数传递给所述传输层。
根据本发明的第二方面, 提供了一种在通信网络的运行 SCTP协 议的服务器中用于在维持已建立的关联的基础上关闭套接字监听连接 的功能的控制装置, 所述套接字为一对多套接字, 其中, 包括: 第一判 断装置, 用于在应用层判断本服务器的套接字上的关联状态是否满足第 一预定条件;第一通知装置,用于如果所述关联状态满足第一预定条件, 则在所述应用层通知传输层拒绝来自客户端的连接请求。
优选地, 所述控制装置还包括: 第二判断装置, 用于在所述应用层 判断本服务器的所述套接字上的关联状态是否满足第二预定条件; 第二 通知装置, 用于如果所述关联状态满足第二预定条件, 则在所述应用层 通知所述传输层将接收到的来自所述客户端的连接请求转发给所述应 用层。
优选地, 所述第一通知装置还包括: 第一传递装置, 用于如果所述 关联状态满足第一预定条件 , 则从所述应用层将第一控制参数传递给所 述传输层; 拒绝装置, 用于基于该第一控制参数, 在所述传输层拒绝来 自所述客户端的连接请求。
优选地, 所述第一传递装置还用于如果所述关联状态满足第一预定 条件, 则在所述应用层通过调用所述传输层提供的 sctp—opt— info()函数 将第一控制参数传递给所述传输层。
优选地, 所述第二通知装置还包括: 第二传递装置, 用于如果所述 关联状态满足第二预定条件, 则从所述应用层将所述第二控制参数传递 给所述传输层; 转发装置, 用于基于该第二控制参数, 在所述传输层将 接收到的来自所述客户端的连接请求转发给所述应用层。
优选地, 所述第二传递装置还用于如果所述关联状态满足第二预定 条件, 则在所述应用层通过调用所述传输层提供的 sctp_opt—info()函数 将所述第二控制参数传递给所述传输层。
优选地, 所述第一预定条件包括以下各项中的任一项: - 所述套接 字上已建立的关联个数大于第一预定关联个数值; - 所述套接字在一预 定时间范围内收到的来自所述客户端的连接请求的个数大于一预定请 求个数值; - 所述套接字接收到的发送连接请求的客户端不在预定客户 端列表内。
优选地, 所述第二预定条件包括: 所述套接字上已建立的关联个数 小于第二预定关联个数值。 在本发明中,如果服务器端的应用层希望关闭某个套接字监听连 接的功能, 那么可以在 SCTP协议栈中定义一个新标识, 通过从应用 层将参数传递给传输层来对该标识进行赋值以实现在维持已建立的 SCTP关联的基础上关闭该套接字监听连接的功能。 当然,根据需要, 该套接字监听连接的功能可以重新被打开。当该套接字监听连接的功 能被关闭后,来自客户端的连接请求在服务器端的传输层就直接被拒 绝而不再进一步传递给应用层, 这样不仅可以避免恶意接入的袭击, 而且可以提高系统的效率以避免资源的浪费。 附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描 述, 本发明的其它特征、 目的和优点将会变得更加明显:
图 1示出了根据现有技术的在通信网络的运行 SCTP协议的服务 器中关闭套接字监听连接的功能的网络示意图;
图 2示出了根据本发明的在通信网络的运行 SCTP协议的服务器 中在维持已建立的关联的基础上关闭套接字监听连接的功能的网络 示意图;
图 3示出了根据本发明的在通信网络的运行 SCTP协议的服务器 中在维持已建立的关联的基础上关闭和重新打开套接字监听连接的 功能的方法流程图; 以及
图 4示出了根据本发明的在通信网络的运行 SCTP协议的服务器 中在维持已建立的关联的基础上关闭和重新打开套接字监听连接的 功能的控制装置的结构框图。
附图中, 相同或者相似的附图标识代表相同或者相似的部件。 具体实施方式
以下参照附图来对本发明进行详细描述:
图 2示出了根据本发明的在通信网络的运行 SCTP协议的服务器 中在维持已建立的关联的基础上关闭套接字监听连接的功能的网络 示意图。
图中示出了服务器 1, 客户端 21, 客户端 22以及客户端 23。 本 领域技术人员应能理解, 此处仅是以 3个客户端为例进行说明, 在具 体应用中, 服务器 1可以与任多个客户端建立 SCTP关联。 图中, 服 务器 1 与客户端 21, 客户端 22 以及客户端 23的通信是基于 SCTP 传输层协议的。
在图 2 中, 首先, 我们假定服务器 1 的某个套接字已与客户端 21 , 客户端 22以及客户端 23建立了 SCTP关联。 关于该套接字如何 与客户端 21, 客户端 22 以及客户端 23建立 SCTP关联是现有技术 中已有的, 这是本领域技术人员应能理解的, 在此不作赘述。
尽管该套接字已经与客户端 21, 客户端 22以及客户端 23建立 了 SCTP关联, 但是, 该套接字监听连接的功能仍处于打开状态, 即 该套接字仍用于监听来自客户端的新的连接请求。如果远端的某个客 户端欲与服务器 1的该套接字建立 SCTP关联,则该服务器 1端的传 输层将会接收到来自该客户端发送的连接请求, 随后, 该连接请求会 通过传输层传递给应用层。应用层接收到该连接请求后, 判断是否接 受该连接请求, 如果接受该连接请求, 则与发出该连接请求的客户端 建立 SCTP关联, 否则拒绝来自该客户端的连接请求。
服务器 1的该套接字与客户端 21 , 客户端 22以及客户端 23建 立了 SCTP关联后,若服务器 1端的应用层不希望再接收到任何来自 客户端的连接请求,该应用层将会通知传输层拒绝来自客户端的连接 请求, 从而关闭服务器 1的该套接字的监听连接的功能。 具体的, 应 用层可以通过传输参数给传输层以达到对其传输协议中新定义的具 有关闭 /打开该套接字监听连接的功能的标识进行设定来实现关闭该 套接字监听连接的功能的效果。
需要说明的是, 该套接字关闭了监听连接的功能后, 原来与客户 端 21, 客户端 22以及客户端 23建立的 SCTP关联仍被维持。
当服务器 1的该套接字关闭了监听连接的功能后,来自任何客户 端的连接请求发送至服务器 1 端的传输层后都将在该传输层直接被 拒绝而不再进一步传递给应用层。
当然, 服务器 1的该套接字的监听连接的功能可以再次被打开, 从而使得服务器 1 端的应用层可以重新接收到来自客户端的连接请 求, 从而与新的客户端建立 SCTP关联。
优选地, 当应用层获知该套接字原本与客户端建立的 SCTP关联 中有一个或多个关联断开后,可以通知传输层将接收到的来自这些断 开关联的客户端再次发送的连接请求传递给应用层,以便该套接字再 次与该些客户端建立 SCTP关联。
以下参照图 3并结合图 2对本发明中运行 SCTP协议的服务器如 何在维持已建立的 SCTP关联的基础上关闭和重新打开该服务器的套 接字的监听连接的功能的方法进行详细描述。
图 3示出了根据本发明的在通信网络的运行 SCTP协议的服务器 中在维持已建立的关联的基础上关闭和重新打开套接字监听连接的 功能的方法流程图。 具体的, 图 3涉及的通信网络中服务器与客户端 之间的通信是基于 SCTP传输层协议的。
为了实现本发明的功能, 需要在已有的 SCTP协议栈中定义一个 SCTP— ENABLE— LISTENING标识。 如果该标识被设置为 1, 则相应 的套接字的监听连接的功能被打开, 如果该标识被设置为 0, 则相应 的套接字的监听连接的功能被关闭。 当然, 本领域技术人员也可以将 SCTP_ENABLE— LISTENING标识被设置为 1表示相应的套接字的监 听连接的功能被关闭,而该标识被设置为 0表示相应的套接字的监听 连接的功能被打开。
正如对图 2的描述中所涉及的, 针对图 3所涉及的通信系统, 我 们也假定服务器 1的某个套接字已与客户端 21 , 客户端 22以及客户 端 23建立了 SCTP关联。 需要说明的是, 在初始状态, 即使该套接 字已经与客户端 21 , 客户端 22以及客户端 23建立了 SCTP关联, 但是, 由于该套接字的监听连接的功能仍处于打开状态, 即该套接字 仍用于监听来自客户端的新的连接请求。
以下将参照图 3所示的流程图对服务器 1在维持已经建立的关联 的基础上关闭该套接字监听连接的功能以及重新打开其监听连接的 功能进行详细描述。
首先, 在步骤 S11中, 服务器 1在应用层判断本服务器的该套接 字上的关联状态是否满足第一预定条件。
具体的, 该服务器 1可以在应用层判断该套接字上已建立的关联 个数是否大于第一预定关联个数值。
例如, 如果预先设定的该第一预定关联个数值为 5个, 那么该服务 器 1在应用层判断该套接字上已建立的关联个数是否大于 5个。
如果该套接字上已建立的关联个数大于 5个, 那么, 服务器 1的应 用层可以决定关闭该套接字的监听连接的功能。
该服务器 1也可以在应用层判断该套接字在一预定时间范围内接' 收到的来自客户端的连接请求的个数是否大于一预定请求个数值。
优选地, 该预定时间范围可以是一个较短的时间段, 例如, 60秒。 该预定请求个数值可以为 10个。
如果服务器 1的该套接字在一个较短的时间段内接收到来自客户端 一侧的大量连接请求, 则可以认为该服务器 1正受到恶意连接攻击。 那 么, 服务器 1的应用层可以决定关闭该套接字的监听连接的功能。
另夕卜, 该服务器 1也可以在应用层判断该套接字接收到的发送连接 请求的客户端是否在预定客户端列表内。
具体的, 可以通过判断接收到的发送连接请求的客户端的 IP地址 是否在预定的希望建立 SCTP关联的客户端的 IP地址列表内。如果不在 该 IP地址列表内, 那么, 服务器 1 的应用层可以决定关闭该套接字的 监听连接的功能。
以上仅列举了几种第一预定条件的情形, 本领域技术人员根据实际 情形还可以设定其他的预定条件。
以下为了便于描述, 我们以该服务器 1在应用层判断该套接字上 已建立的关联个数是否大于第一预定关联个数值为例进行描述。
此处, 我们将第一预定关联个数值设置为 5个。
如果服务器 1在应用层判断该套接字上已建立的关联个数值小于 5 个, 则继续维持打开该套接字的监听连接的功能。
如果服务器 1在应用层判断该套接字上已建立的关联个数值大于等 于 5个, 则进入步骤 S12, 应用层通知传输层拒绝来自客户端的连接请 求。
具体的, 应用层将第一控制参数传递给传输层用于对 SCTP协议栈 中新定义的 SCTP_ENABLE— LISTENING标识重新进行赋值。 例如, 将 SCTP— ENABLE— LISTENING标识重新赋值为 0, 从而关闭套接字 监听连接的功能。
优选地, 应用层可以通过调用传输层通过应用程序接口 (API ) 提供的 sctp—opt_info()函数将第一控制参数传递给传输层。 进一步地, 该第一控制参数包括该套接字的文件句柄, 该文件句柄用于告知传输层 对哪个套接字执行操作, 以及包括所执行的操作的类型, 例如, 关闭 / 打开某个套接字监听连接的功能, 以及包括所执行的操作的结果, 例 如, 将该 SCTP— ENABLE— LISTENING标识重新赋值为 0, 即关闭该 套接字监听连接的功能。
需要说明的是, 该套接字关闭了监听连接的功能后, 之前建立的 SCTP关联仍被维持。
当 SCTP— ENABLE— LISTENING标识被重新赋值为 0, 该套接字 监听连接的功能被关闭。 之后, 来自客户端的任何连接请求在服务器 1端的传输层就被拒绝而不再进一步传递给应用层。
当然, 服务器 1的该套接字的监听连接的功能被关闭后, 应用层也 可以决定重新打开该套接字的监听连接的功能。
优选的, 在步骤 S13中, 服务器 1在应用层判断该套接字上的关联 状态是否满足第二预定条件, 以决定是否重新打开该套接字监听连接的 功能。
优选的,服务器 1在应用层判断该套接字上已建立的关联个数是否 小于第二预定关联个数值。
该第二预定关联个数值可以小于等于第一预定关联个数值, 优选 地, 该第二预定关联个数值等于第一预定关联个数值。 即, 当第一预定 关联个数值为 5个时, 优选地, 该第二预定关联个数值也为 5个。
需要说明的是, 以上仅为第二预定条件的一种情形, 本领域技术人 员根据实际情形还可以设定其他的预定条件。
当服务器 1在应用层判断该套接字上已建立的关联个数值仍大于等 于 5个, 则继续维持关闭该套接字监听连接的功能。
当服务器 1 在应用层判断该套接字上已建立的关联个数值小于 5 个, 则进入步骤 S14中, 服务器 1端的应用层通知传输层将接收到的来 自客户端的连接请求转发给该应用层。
具体的, 应用层将第二控制参数传递给传输层用于对 SCTP协议栈 中新定义的 SCTP_ENABLE— LISTENING标识重新进行赋值。 例如, 将 SCTP— ENABLE— LISTENING标识重新赋值为 1, 从而打开套接字 监听连接的功能。
优选地, 应用层可以通过调用传输层通过应用程序接口 (API ) 提供的 sctp— opt— info()函数将第二控制参数传递给传输层。 进一步地, 该第二控制参数包括该套接字的文件句柄, 该文件句柄用于告知传输层 对哪个套接字执行操作, 以及包括所执行的操作的类型, 例如, 关闭 / 打开某个套接字监听连接的功能, 以及包括所执行的操作的结果, 例 如, 将该 SCTP_ENABLE— LISTENING标识重新赋值为 1 , 即打开该 套接字监听连接的功能。
当 SCTP— ENABLE— LISTENING标识被重新赋值为 1, 该套接字 监听连接的功能被打开。之后, 服务器 1端的传输层将来自客户端的 连接请求进一步传递给应用层,以用于该应用层判断是否与发送该连 接请求的客户端建立 SCTP关联。 a
以上仅对服务器 1端的该套接字从打开监听连接的状态变换到关闭 监听连接的状态再回到重新打开监听连接的状态的描述, 本领域技术人 员应能理解, 在具体应用中, 服务器 1端的该套接字可以在打开监听连 接和关闭监听连接的状态之间任意切换, 以满足自身的需要。 上文中是从方法的角度对本发明的技术方案进行描述, 以下将从装 置模块的角度对本发明的技术方案进一步进行描述。 以下参照图 4并结合图 2对本发明中运行 SCTP协议的服务器中 的控制装置如何在维持已建立的 SCTP 关联的基础上关闭和重新打 开该服务器的套接字的监听连接的功能进行详细描述。
图 4示出了根据本发明的在通信网络的运行 SCTP协议的服务器 中在维持已建立的关联的基础上关闭和重新打开套接字监听连接的 功能的控制装置的结构框图。 具体的, 图 4涉及的通信网络中服务器 与客户端之间的通信是基于 SCTP传输层协议的。 为了实现本发明的功能, 需要在已有的 SCTP协议栈中定义一个 SCTP— ENABLE—LISTENING标识。 如果该标识被设置为 1, 则相应 的套接字的监听连接的功能被打开, 如果该标识被设置为 0, 则相应 的套接字的监听连接的功能被关闭。 当然, 本领域技术人员也可以将 SCTP— ENABLE_LISTENING标识被设置为 1表示; f目应的套接字的监 听连接的功能被关闭,而该标识被设置为 0表示相应的套接字的监听 连接的功能被打开。
正如对图 2的描述中所涉及的, 针对图 4所涉及的通信系统, 我 们也假定服务器 1的某个套接字已与客户端 21, 客户端 22以及客户 端 23建立了 SCTP关联。 需要说明的是, 在初始状态, 即使该套接 字已经与客户端 21 , 客户端 22以及客户端 23建立了 SCTP关联, 但是, 由于该套接字的监听连接的功能仍处于打开状态, 即该套接字 仍用于监听来自客户端的新的连接请求。
以下将参照图 4所示的结构框图对服务器 1在维持已经建立的关 联的基础上关闭该套接字监听连接的功能以及重新打开其监听连接 的功能进行详细描述。
首先, 服务器 1 中的控制装置 10中的第一判断装置 101在应用 层判断本服务器的该套接字上的关联状态是否满足第一预定条件。
具体的,该第一判断装置 101可以在应用层判断该套接字上已建 立的关联个数是否大于第一预定关联个数值。
例如, 如果预先设定的该第一预定关联个数值为 5个, 那么该第一 判断装置 101 在应用层判断该套接字上已建立的关联个数是否大于 5 个。
如果该套接字上已建立的关联个数大于 5个, 那么, 服务器 1的应 用层可以决定关闭该套接字的监听连接的功能。
该第一判断装置 101也可以在应用层判断该套接字在一预定时间 范围内接收到的来自客户端的连接请求的个数是否大于一预定请求个 数值。
优选地, 该预定时间范围可以是一个较短的时间段, 例如, 60秒。 该预定请求个数值可以为 10个。
如果服务器 1的该套接字在一个较短的时间段内接收到来自客户端 一侧的大量连接请求, 则可以认为该服务器 1正受到恶意连接攻击。 那 么, 服务器 1的应用层可以决定关闭该套接字的监听连接的功能。
另外, 该第一判断装置 101 也可以在应用层判断该套接字接收到 的发送连接请求的客户端是否在预定客户端列表内。
具体的, 第一判断装置 101 可以通过判断接收到的发送连接请求 的客户端的 IP地址是否在预定的希望建立 SCTP关联的客户端的 IP地 址列表内。 如果不在该 IP地址列表内, 那么, 服务器 1 的应用层可以 决定关闭该套接字的监听连接的功能。
以上仅列举了几种第一预定条件的情形, 本领域技术人员根据实际 情形还可以设定其他的预定条件。
以下为了便于描述, 我们以第一判断装置 101在应用层判断该套 接字上已建立的关联个数是否大于第一预定关联个数值为例进行描述。
此处, 我们将第一预定关联个数值设置为 5个。
如果第一判断装置 101 在应用层判断该套接字上已建立的关联个 数值小于 5个, 则继续维持打开该套接字的监听连接的功能。
如果第一判断装置 101 在应用层判断该套接字上已建立的关联个 数值大于等于 5个, 则控制装置 10中的第一通知装置 102在应用层通 知传输层拒绝来自客户端的连接请求。
具体的, 第一通知装置 102中的第一传递装置 (为简明起见, 图 4 中未示出)从应用层将第一控制参数传递给传输层用于对 SCTP协议栈 中新定义的 SCTP— ENABLE_LISTENING标识重新进行赋值。 例如, 将 SCTP— ENABLE— LISTENING标识重新赋值为 0, 从而关闭套接字 监听连接的功能。
优选地, 第一传递装置可以在应用层通过调用传输层通过应用程 序接口 (API ) 提供的 sctp— opt— info()函数将第一控制参数传递给传输 层。 进一步地, 该第一控制参数包括该套接字的文件句柄, 该文件句柄 用于告知传输层对哪个套接字执行操作, 以及包括所执行的操作的类 型, 例如, 关闭 /打开某个套接字监听连接的功能, 以及包括所执行的 操作的结果, 例如, 将该 SCTP_EN ABLE— LISTENING标识重新赋值 为 0, 即关闭该套接字监听连接的功能。
需要说明的是, 该套接字关闭了监听连接的功能后, 之前建立的 SCTP关联仍被维持。
当 SCTP— ENABLE— LISTENING标识被重新赋值为 0, 该套接字 监听连接的功能被关闭。 之后, 第一通知装置 102中的拒绝装置(为 简明起见, 图 4中未示出) 在传输层将来自客户端的任何连接请求拒 绝而不再进一步传递给应用层。
当然, 服务器 1的该套接字的监听连接的功能被关闭后, 应用层也 可以决定重新打开该套接字的监听连接的功能。
优选的, 控制装置 10中的第二判断装置 103在应用层判断该套接 字上的关联状态是否满足第二预定条件, 以决定是否重新打开该套接字 监听连接的功能。
优选的, 第二判断装置 103在应用层判断该套接字上已建立的关联 个数是否小于第二预定关联个数值。
该第二预定关联个数值可以小于等于第一预定关联个数值, 优选 地, 该第二预定关联个数值等于第一预定关联个数值。 即, 当第一预定 关联个数值为 5个时, 优选地, 该第二预定关联个数值也为 5个。
需要说明的是, 以上仅为第二预定条件的一种情形, 本领域技术人 员根据实际情形还可以设定其他的预定条件。
当第二判断装置 103在应用层判断该套接字上已建立的关联个数值 仍大于等于 5个, 则继续维持关闭该套接字监听连接的功能。
当第二判断装置 103在应用层判断该套接字上已建立的关联个数值 小于 5个, 则控制装置 10中的第二通知装置 104在应用层通知传输层 将接收到的来自客户端的连接请求转发给该应用层。
具体的, 第二通知装置 104中的第二传递装置 (为简明起见, 图 4 中未示出)从应用层将第二控制参数传递给传输层用于对 SCTP协议栈 中新定义的 SCTP ENABLE LISTENING标识重新进行赋值。 例如, 将 SCTP— ENABLE— LISTENING标识重新赋值为 1, 从而打开套接字 监听连接的功能。
优选地, 第二传递装置可以在应用层通过调用传输层通过应用程 序接口 (API )提供的 sctp— opt— info()函数将第二控制参数传递给传输 层。 进一步地, 该第二控制参数包括该套接字的文件句柄, 该文件句柄 用于告知传输层对哪个套接字执行操作, 以及包括所执行的操作的类 型, 例如, 关闭 /打开某个套接字监听连接的功能, 以及包括所执行的 操作的结果, 例如, 将该 SCTP— ENABLE— LISTENING标识重新赋值 为 1 , 即打开该套接字监听连接的功能。
当 SCTP— ENABLE— LISTENING标识被重新赋值为 1 , 该套接字 监听连接的功能被打开。 之后, 第二通知装置 104中的转发装置(为 简明起见, 图 4中未示出)在传输层将来自客户端的连接请求进一步 传递给应用层,以用于该应用层判断是否与发送该连接请求的客户端 建立 SCTP关联。
以上仅对服务器 1端的该套接字从打开监听连接的状态变换到关闭 监听连接的状态再回到重新打开监听连接的状态的描述, 本领域技术人 员应能理解, 在具体应用中, 服务器 1端的该套接字可以在打开监听连 接和关闭监听连接的状态之间任意切换, 以满足自身的需要。 以上对本发明的具体实施例进行了描述, 需要理解的是, 本发明 并不局限于上述特定的实施方式,本领域技术人员可以在所附权利要 求的范围内做出各种定型和修改。

Claims

权 利 要 求 书
1.一种在通信网络的运行 SCTP协议的服务器中用于在维持已建立的 关联的基础上关闭套接字监听连接的功能的方法, 所述套接字为一对多套 接字, 其中, 包括以下步骤:
a.在应用层判断本服务器的套接字上的关联状态是否满足第一预定条 件;
b. 如果所述关联状态满足第一预定条件, 则所述应用层通知传输层拒 绝来自客户端的连接请求。
2. 根据权利要求 1所述的方法,其特征在于, 所述步骤 b之后还包括 以下步骤:
c.在所述应用层判断本服务器的所述套接字上的关联状态是否满足第 二预定条件;
d. 如果所述关联状态满足第二预定条件,则所述应用层通知所述传输 层将接收到的来自所述客户端的连接请求转发给所述应用层。
3. 根据权利要求 1或 2所述的方法, 其特征在于, 所述步骤 b还包括 以下步骤:
bl. 如果所述关联状态满足第一预定条件, 则所述应用层将第一控制 传递给所述传输层;
bl. 基于该第一控制参数, 所述传输层拒绝来自所述客户端的连接请 求。
4. 根据权利要求 1至 3中任一项所述的方法, 其特征在于, 所述步骤 bl还包括: 如果所述关联状态满足第一预定条件, 则所述应用层通过调用 所述传输层提供的 sctp—opt_infoO函数将第一控制参数传递给所述传输层。
5. 根据权利要求 1至 4中任一项所述的方法, 其特征在于, 所述步骤 d还包括以下步骤:
dl. 如果所述关联状态满足第二预定条件, 则所述应用层将所述第二 控制参数传递给所述传输层;
d2. 基于该第二控制参数, 所述传输层将接收到的来自所述客户端的 连接请求转发给所述应用层。
6. 根据权利要求 1至 5中任一项所述的方法, 其特征在于, 所述步棘 dl还包括: 如果所述关联状态满足第二预定条件, 则所述应用层通过调用 所述传输层提供的 sctp— opt— info()函数将所述第二控制参数传递给所述传 输层。
7. 根据权利要求 1至 6中任一项所述的方法, 其特征在于, 所述第一 预定^ [牛包括以下各项中的任一项:
-所述套接字上已建立的关联个数大于第一预定关联个数值;
- 所述套接字在一预定时间范围内收到的来自所述客户端的连接请求 的个数大于一预定请求个数值;
- 所述套接字接收到的发送连接请求的客户端不在预定客户端列表 内。
8. 根据权利要求 1至 7中任一项所述的方法, 其特征在于, 所述第二 预定条件包括:所述套接字上已建立的关联个数小于第二预定关联个数值。
9.一种在通信网络的运行 SCTP协议的服务器中用于在维持已建立的 关联的 出上关闭套接字监听连接的功能的控制装置, 所述套接字为一对 多套接字, 其中, 包括:
第一判断装置, 用于在应用层判断本服务器的套接字上的关联状态是 否满足第一预定条件;
第一通知装置, 用于如果所述关联状态满足第一预定条件, 则在所述 应用层通知传输层拒绝来自客户端的连接请求。
10. 根据权利要求 9所述的控制装置, 其特征在于, 还包括: 第二判断装置, 用于在所述应用层判断本服务器的所述套接字上的关 联状态是否满足第二预定条件;
第二通知装置, 用于如果所述关联状态满足第二预定条件, 则在所述 应用层通知所述传输层将接收到的来自所述客户端的连接请求转发给所述 应用层。
11. 根据权利要求 9或 10所述的控制装置, 其特征在于, 所述第一通 知装置还包括: 第一传递装置, 用于如果所述关联状态满足第一预定条件, 则从所述 应用层将第一控制参数传递给所述传输层;
拒绝装置, 用于基于该第一控制参数, 在所述传输层拒绝来自所述客 户端的连接请求。
12. 根据权利要求 9至 11中任一项所述的控制装置, 其特征在于, 所 述第一传递装置还用于如果所述关联状态满足第一预定条件, 则在所述应 用层通过调用所述传输层提供的 sctp— opt— info()函数将第一控制参数传递 给所述传输层。
13. 根据权利要求 9至 12中任一项所述的控制装置, 其特征在于, 所 述第二通知装置还包括:
第二传递装置, 用于如果所述关联状态满足第二预定条件, 则从所述 应用层将所述第二控制参数传递给所述传输层;
转发装置, 用于基于该第二控制参数, 在所述传输层将接收到的来自 所述客户端的连接请求转发给所述应用层。
14. 根据权利要求 9至 13中任一项所述的控制装置, 其特征在于, 所 述第二传递装置还用于如果所述关联状态满足第二预定条件, 则在所述应 用层通过调用所述传输层提供的 sctp— opt— info()函数将所述第二控制参数 传递给所述传输层。
15. 根据权利要求 9至 14中任一项所述的控制装置, 其特征在于, 所 述第一预定条件包括以下各项中的任一项:
-所述套接字上已建立的关联个数大于第一预定关联个数值;
-所述套接字在一预定时间范围内收到的来自所述客户端的连接请求 的个数大于一预定请求个数值;
- 所述套接字接收到的发送连接请求的客户端不在预定客户端列表 内。
16. 根据权利要求 9至 15中任一项所述的控制装置, 其特征在于, 所 述第二预定条件包括: 所述套接字上已建立的关联个数小于第二预定关联 个数值。
PCT/CN2009/000165 2009-02-19 2009-02-19 动态关闭/打开sctp套接字监听连接功能的方法和装置 WO2010094150A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN200980146352.5A CN102217282B (zh) 2009-02-19 2009-02-19 动态关闭/打开sctp套接字监听连接功能的方法和装置
PCT/CN2009/000165 WO2010094150A1 (zh) 2009-02-19 2009-02-19 动态关闭/打开sctp套接字监听连接功能的方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2009/000165 WO2010094150A1 (zh) 2009-02-19 2009-02-19 动态关闭/打开sctp套接字监听连接功能的方法和装置

Publications (1)

Publication Number Publication Date
WO2010094150A1 true WO2010094150A1 (zh) 2010-08-26

Family

ID=42633410

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/000165 WO2010094150A1 (zh) 2009-02-19 2009-02-19 动态关闭/打开sctp套接字监听连接功能的方法和装置

Country Status (2)

Country Link
CN (1) CN102217282B (zh)
WO (1) WO2010094150A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109257227A (zh) * 2018-10-24 2019-01-22 京信通信系统(中国)有限公司 数据传输中的偶联管理方法、装置及系统
CN109474670A (zh) * 2018-10-22 2019-03-15 中国人民解放军战略支援部队航天工程大学 一种信息交互方法及系统

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829411B (zh) * 2017-04-28 2021-06-15 武汉斗鱼网络科技有限公司 通过服务端更新Flash应用的方法及系统

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1889563A (zh) * 2005-06-30 2007-01-03 华为技术有限公司 基于Diameter协议的负载控制方法
CN101060469A (zh) * 2006-06-14 2007-10-24 华为技术有限公司 实现流控制传输协议多归属特性的系统和方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100346602C (zh) * 2005-06-23 2007-10-31 复旦大学 实现视频质量与发送速率控制的高并发流媒体服务器系统

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1889563A (zh) * 2005-06-30 2007-01-03 华为技术有限公司 基于Diameter协议的负载控制方法
CN101060469A (zh) * 2006-06-14 2007-10-24 华为技术有限公司 实现流控制传输协议多归属特性的系统和方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109474670A (zh) * 2018-10-22 2019-03-15 中国人民解放军战略支援部队航天工程大学 一种信息交互方法及系统
CN109257227A (zh) * 2018-10-24 2019-01-22 京信通信系统(中国)有限公司 数据传输中的偶联管理方法、装置及系统

Also Published As

Publication number Publication date
CN102217282B (zh) 2014-11-05
CN102217282A (zh) 2011-10-12

Similar Documents

Publication Publication Date Title
TWI419518B (zh) 使用相同網際網路協定(ip)埠應用程式之多個執行個體之間分配接收的通話之方法及系統
US8737594B2 (en) Emergency services for packet networks
US9201743B2 (en) Backup SIP server for the survivability of an enterprise network using SIP
US8346264B2 (en) Transmission of data in a communication system
WO2013143342A1 (zh) 家庭网关、云服务器及两者之间进行通信的方法
AU2007202859B2 (en) VoIP communication control method and access point apparatus
US20140108668A1 (en) Secured wireless session initiate framework
WO2014040497A1 (zh) 内容和网络联动的双重加速方法及系统
KR20110008311A (ko) 네트워크를 관리하는 방법들 및 디바이스들
WO2012131364A1 (en) Telephone call processing method and apparatus
JP2011182070A (ja) 仮想通信路接続システムおよび仮想通信路接続方法
US8782286B2 (en) Optimizing state sharing between firewalls on multi-homed networks
JP4090999B2 (ja) サービス品質要求の相関
CN105978780B (zh) 一种端口切换方法及装置
WO2010094150A1 (zh) 动态关闭/打开sctp套接字监听连接功能的方法和装置
WO2019041332A1 (zh) 一种加速网络传输优化方法以及系统
WO2012079374A1 (zh) 对虚拟串口和物理串口进行绑定的方法、装置及系统
WO2014177096A1 (zh) 调度器支持能力的查询、通知方法及装置
JP4285101B2 (ja) リアルタイムデータ通信システム、リアルタイムデータ通信装置およびリアルタイムデータ通信方法
WO2013013524A1 (zh) 一种跨网络实现终端通信的方法及系统
JP5886170B2 (ja) 分散処理システムおよび分散処理方法
WO2022100546A1 (zh) 数据传输方法和通信装置
WO2022166608A1 (zh) 一种基于quic协议的服务升级方法、装置及电子设备
US20230171683A1 (en) Monitoring mobile device data network usage to identify authentic wi-fi service
CN107959671B (zh) 信令传输方法及会议终端

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980146352.5

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09840201

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09840201

Country of ref document: EP

Kind code of ref document: A1