CLASSIC
Modul: tcpip
Rolle: heuristic
Konfidenz: 80%
SNIP_CLASSIC_TCPIP_SECTION_7_1_1_Socket_Connection_Open
Wortlaut
7.1.1 Socket Connection Open
[SWS_SoAd_00589] ⌈In the SoAd_MainFunction(), SoAd shall try to open each socket connection which fulfills all of the following criterias:
1. No TcpIp socket is assigned to the socket connection
2. Open is either (a) explicitly requested by a previous SoAd_OpenSoCon() call which has not been revoked by a following SoAd_CloseSoCon() call or (b) implicitly requested when SoAdSocketAutomaticSoConSetup is TRUE
3. remote address is set (either specified by configuration or set via the function SoAd_SetRemoteAddr())
4. local IP address is assigned, i.e. SoAd_LocalIpAddrAssignmentChg() has been called with the related LocalAddrId and TCPIP_IPADDR_STATE_ASSIGNED as State.
⌋
[SWS_SoAd_00590] ⌈SoAd shall perform the following actions within SoAd_MainFunction() to open either a UDP socket connection which is part of a socket connection group containing a single socket connection (i.e. there is only one socket connection in the socket connection group configuration container) or a TCP socket connection with SoAdSocketTcpInitiate set to TRUE:
1. Get an appropriate socket from TcpIp by calling TcpIp_SoAdGetSocket() with the TcpIp_DomainType implicitly specified by SoAdSocketLocalAddressRef, and the protocol type specified by SoAdSocketProtocol.
2. Change the socket specific parameters according to [SWS_SoAd_00689].
3. Bind the socket to the local address and port by calling TcpIp_Bind() with the local address identifier specified by SoAdSocketLocalAddressRef and local port specified by SoAdSocketLocalPort.
4. In case of a TCP socket initiate the TCP connection by calling TcpIp_TcpConnect().
⌋
[SWS_SoAd_00765] Upstream requirements: SRS_Eth_00017
⌈If SoAdSocketTcpAutoConnectTimeout has been configured for that socket connection to a value > 0 SoAd shall repeat the invocation stated in [SWS_SoAd_00590] bullet (4) only for the time specified in SoAdSocketTcpAutoConnectTimeout.⌋
[SWS_SoAd_00766] Upstream requirements: SRS_Eth_00017
⌈If SoAdSocketTcpAutoConnectTimeout has elapsed for that socket connection and the socket connection has not yet reached SOAD_SOCON_ONLINE, then
1. the runtime error SOAD_E_TCP_AUTOCONNECT_FAILED shall be raised.
2. the socket connection shall close related TcpIp socket.
3. the socket connection shall be put into SOAD_SOCON_OFFLINE.
4. the socket connection shall stay in SOAD_SOCON_OFFLINE.
⌋
Note: Socket connections with elapsed SoAdSocketTcpAutoConnectTimeout will become inactive until module is reset.
[SWS_SoAd_00638] ⌈SoAd shall perform the following actions within SoAd_MainFunction() to open a TCP socket connection with SoAdSocketTcpInitiate set to FALSE:
1. In case no Listen-Socket is assigned to the socket connection:
(a) Get an appropriate socket from TcpIp by calling TcpIp_SoAdGetSocket() with the TcpIp_DomainType implicitly specified by SoAdSocketLocalAddressRef, and the protocol type specified by SoAdSocketProtocol.
(b) Change the socket specific parameters according to [SWS_SoAd_00689].
(c) Bind the socket to the local address and port by calling TcpIp_Bind() with the local address identifier specified by SoAdSocketLocalAddressRef and local port specified by SoAdSocketLocalPort.
(d) Assign the Listen-Socket to the socket connection group
(e) Activate the socket connection to accept connections from remote nodes
(f) Listen for a remote connection requests on the Listen-Socket by calling TcpIp_TcpListen() with MaxChannels set to the number of socket connections that are part of the TCP socket connection group
2. In case the Listen-Socket is already assigned to the socket connection:
(a) Activate the socket connection to accept connections from remote nodes
⌋
Note: all socket connections of a TCP socket connection group (and SoAdSocketTcpInitiate set to FALSE) share one TcpIp socket for incoming connection requests ("Listen-Socket"), but use a separate TcpIp socket created by the TcpIp module and provided via SoAd_TcpAccepted() after the connection has been establishment.
[SWS_SoAd_00639] ⌈SoAd shall perform the following actions within SoAd_MainFunction() to open a UDP socket connection which is part of a socket connection group containing multiple socket connections (i.e. there is more than one socket connection in the socket connection group configuration container):
1. In case no UDP socket is assigned to the socket connection group:
(a) Get an appropriate socket from TcpIp by calling TcpIp_SoAdGetSocket() with the domain type implicitly specified by SoAdSocketLocalAddressRef, and the protocol type specified by SoAdSocketProtocol.
(b) Change the socket specific parameters according to [SWS_SoAd_00689]
(c) Bind the socket to the local address and port by calling TcpIp_Bind() with the local address identifier specified by SoAdSocketLocalAddressRef and local port specified by SoAdSocketLocalPort.
(d) Assign the UDP socket to the socket connection group
(e) Activate the socket connection for communication via the shared UDP socket of the socket connection group
2. In case the UDP socket is already assigned to the socket connection group:
(a) Activate the socket connection for communication via the shared UDP socket of the socket connection group
⌋
Note: all socket connections of a UDP socket connection group share the same TcpIp socket.
[SWS_SoAd_00689] ⌈In case socket related parameters shall be changed as part of allocating a new socket, SoAd shall change the parameters according to the configuration of the associated socket connection by calling TcpIp_ChangeParameter() with ParameterId and ParameterValue for each related clause as specified below:
1. In case of a TCP socket: TCPIP_PARAMID_TCP_RXWND_MAX and the value specified by SoAdSocketTpRxBufferMin if the optional parameter is enabled
2. TCPIP_PARAMID_FRAMEPRIO and the value specified by SoAdSocketFramePriority if the optional parameter is enabled
3. In case of a TCP socket: TCPIP_PARAMID_TCP_NAGLE and the value 0x01 if the related optional parameter SoAdSocketTcpNoDelay is set to FALSE or 0x00 if the parameter is set to TRUE.
4. In case of a TCP socket: TCPIP_PARAMID_TCP_KEEPALIVE and the value specified by SoAdSocketTcpKeepAlive
5. In case of a TCP socket: TCPIP_PARAMID_TCP_KEEPALIVE_TIME and the value specified by SoAdSocketTcpKeepAliveTime if the optional parameter is enabled
6. In case of a TCP socket: TCPIP_PARAMID_TCP_KEEPALIVE_PROBES_MAX and the value specified by SoAdSocketTcpKeepAliveProbesMax if the optional parameter is enabled
7. In case of a TCP socket: TCPIP_PARAMID_TCP_KEEPALIVE_INTERVAL and the value specified by SoAdSocketTcpKeepAliveInterval if the optional parameter is enabled.
8. In case of a TCP socket: TCPIP_PARAMID_TCP_OPTIONFILTER and the value of TcpIpTcpConfigOptionFilterId specified in TcpIpTcpConfigOptionFilter referenced by SoAdSocketTCPOptionFilterRef if the optional parameter is enabled.
9. TCPIP_PARAMID_FLOWLABEL and the value specified by SoAdSocketFlowLabel if the optional parameter is enabled.
10. TCPIP_PARAMID_DSCP and the value specified by SoAdSocketDifferentiatedServicesField if the optional parameter is enabled.
11. In case of a UDP socket: TCPIP_PARAMID_UDP_CHECKSUM and the value of SoAdSocketUdpChecksumEnabled.
12. In case of a TCP socket: If SoAdSocketTcpTlsConnectionRef is defined the function shall be called with the parameter ID TCPIP_PARAMID_TLS_CONNECTION_ASSIGNMENT and the value from this reference as the parameter value to assign a TLS connection to this socket.
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
TcpIp_TcpListen usage on Listen-Socket.
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_SocketAdaptor.pdf |
|---|---|
| Dokumentseite | Seite 20 |
| Ziel-Modul | tcpip (classic) |
| Ziel-Anforderung | SWS_TcpIp_00114 |
| Semantische Rolle | heuristic |
| Automatisierungs-Konfidenz | 0.80 |