CALL BACK SET UP

Connection Request
CONNECT.REQ (SSAP, DSAP, QoS)
Connection Indication
CONNECT.IND (SSAP, DSAP, QoS, ConnID)
Connection Response
CONNECT.RES (SSAP, DSAP, QoS, ConnID
Connection Confirm
CONNECT.RES (SSAP, DSAP, QoS, ConnID)
RECEIVE.IND(ConnID)
SEND.REQ (ConnID)
OPEN.REQ
LISTEN.REQ
CLOSE.IND
OPEN.IND
OPEN.RES
CLOSE.REQ
OPEN.CONF
CLOSE.IND
SEND.REQ
RECEIVE.IND
SEND.REQ
RECEIVE.IND
CLOSE.REQ
CLOSE.IND
CLOSE.REQ
CLOSE.IND
•
•
•
•
•
Generic Listen to all possible connections
OR
One Listen per connection
One Open per connection
Listen and Open specify SAP to which they want to be
connected to and their local SAP
• Listen can use a wild card to listen to a range or any
incoming calls. It will then take the first one that meets
the wild card criteria.
• If another listen is done with same DSAP and SSAP
then it is rejected
• If another open is done with same DSAP and SSAP then
it is rejected
OPEN AND LISTEN
Opener
Listener
LISTEN.REQ
CALL BACK SET UP
OPEN.REQ
OPEN
ACCEPT
EST
HALF OPEN
LISTENING
EST.
ESTABLISHED
OPEN.CONF
OPENING
BLOCKING
OPEN.IND
CALL BACK INVOKED
OPEN.RES CALL BACK RETURNED
(ACCEPTED)
CALL BACK INVOKED TO
EST.IND INDICATE THAT CONNECTION
ESTABLISHED
= TCONS state
ACC = ACCEPTING
1.
2.
3.
4.
5.
6.
7.
LISTEN.REQ sets up call back
OPEN.REQ attempts to make connection. This blocks until the OPEN.CONF
When OPEN reaches listening end the Listen Call Back Fn is called
When the Listen Call Back Fn returns (with return value 0, i.e. Accepted) then this
represents the OPEN.RES and causes TCONS to send the ACCEPT to the Opening
end
When ACCEPT reaches Opening end it causes the Opening application to be
unblocked and an EST to be sent
When EST reaches Listening end the connection is established
TCONS only accepts send and receive requests when the connection is established
i.e. TCONS in ESTABLISHED state.
OPEN AND LISTEN
Opener
Listener
LISTEN.REQ
CALL BACK SET UP
OPEN.REQ
OPEN
OPENING
BLOCKING
OPEN.IND
OPEN.CONF
EST
OPEN
ACCEPT
EST
HALF OPEN
ESTABLISHED
EST.
= TCONS state
ESTABLISHED
OPEN.CONF
OPENING
ESTABLISHED
BLOCKING
CALL BACK INVOKED TO
EST.IND INDICATE THAT CONNECTION
ESTABLISHED
LISTENING
OPEN.REQ
OPEN.RES CALL BACK RETURNED
(ACCEPTED)
HALF OPEN
ACCEPT
CALL BACK INVOKED
OPEN.IND
CALL BACK INVOKED
OPEN.RES CALL BACK RETURNED
(ACCEPTED)
CALL BACK INVOKED TO
EST.IND INDICATE THAT CONNECTION
ESTABLISHED
OPEN AND LISTEN
Opener
Listener
OPEN.REQ
OPEN
ACCEPT
EST
HALF OPEN
OPEN.CONF
ACC
OPENING
BLOCKING
OPEN.IND
CALL BACK INVOKED
OPEN.RES CALL BACK RETURNED
(ACCEPTED)
CALL BACK INVOKED TO
EST.IND INDICATE THAT CONNECTION
ESTABLISHED
OPEN
= TCONS state
ACC = ACCEPTING
ACCEPT
EST.
OPEN.CONF
ESTABLISHED
BLOCKING
OPEN.IND
CALL BACK INVOKED
OPEN.RES CALL BACK RETURNED
(ACCEPTED)
EST
CALL BACK INVOKED TO
EST.IND INDICATE THAT CONNECTION
ESTABLISHED
OPEN AND LISTEN
Opener
Listener
LISTEN.REQ
OPEN
ACC
ACCEPT
EST
Open meets acceptance criteria
HALF OPEN
EST.
ESTABLISHED
OPEN.CONF
OPENING
BLOCKING
LISTENING
OPEN.REQ
CALL BACK SET UP
Acceptance criteria
EST.IND CALL BACK
= TCONS state
ACC = ACCEPTING
1.
2.
3.
4.
5.
6.
7.
LISTEN.REQ sets up call back
OPEN.REQ attempts to make connection. This blocks until the OPEN.CONF
When OPEN reaches listening end the Listen Call Back Fn is called
When the Listen Call Back Fn returns (with return value 0, i.e. Accepted) then this
represents the OPEN.RES and causes TCONS to send the ACCEPT to the Opening
end
When ACCEPT reaches Opening end it causes the Opening application to be
unblocked and an EST to be sent
When EST reaches Listening end the connection is established
TCONS only accepts send and receive requests when the connection is established
i.e. TCONS in ESTABLISHED state.
OPEN AND LISTEN
Listener
NOT EST.
LISTEN.REQ
OPEN
OPEN_FAILURE.IND
ACCEPT
NOT EST.
HALF OPEN NOT EST.
TCONS TIMES OUT
ACC
OPENING
BLOCKING
CALL BACK SET UP
LISTENING
OPEN.REQ
Opener
OPEN.IND
CALL BACK INVOKED
OPEN.RES CALL BACK RETURNED
(ACCEPTED)
TCONS TIMES OUT
OPEN_FAILURE.IND
CALL BACK INVOKED
OPEN FAILURE
= TCONS state
ACC = ACCEPTING
1.
2.
3.
4.
5.
6.
7.
LISTEN.REQ sets up call back
OPEN.REQ attempts to make connection. This blocks until the OPEN.CONF
When OPEN reaches listening end the Listen Call Back Fn is called
When the Listen Call Back Fn returns (with return value 0, i.e. Accepted) then this
represents the OPEN.RES and causes TCONS to send the ACCEPT to the Opening
end
When ACCEPT reaches Opening end it causes the Opening application to be
unblocked and an EST to be sent
When EST reaches Listening end the connection is established
TCONS only accepts send and receive requests when the connection is established
i.e. TCONS in ESTABLISHED state.
OPEN AND LISTEN
Opener
Listener
LISTEN.REQ
OPEN
ACC
ACCEPT
EST
HALF OPEN
EST.
ESTABLISHED
OPEN.CONF
OPENING
BLOCKING
LISTENING
OPEN.REQ
CALL BACK SET UP
OPEN.IND
CALL BACK INVOKED
OPEN.RES CALL BACK RETURNED
(ACCEPTED)
SEND OR RX rejected until
EST.IND connection established
= TCONS state
ACC = ACCEPTING
1.
2.
3.
4.
5.
6.
7.
LISTEN.REQ sets up call back
OPEN.REQ attempts to make connection. This blocks until the OPEN.CONF
When OPEN reaches listening end the Listen Call Back Fn is called
When the Listen Call Back Fn returns (with return value 0, i.e. Accepted) then this
represents the OPEN.RES and causes TCONS to send the ACCEPT to the Opening
end
When ACCEPT reaches Opening end it causes the Opening application to be
unblocked and an EST to be sent
When EST reaches Listening end the connection is established
TCONS only accepts send and receive requests when the connection is established
i.e. TCONS in ESTABLISHED state.
SEND AND RECEIVE
Sender
Listener
RECEIVE.REQ CALL BACK SET UP
CALL BACK SET UP
OR BLOCKING
SEND.REQ
ACK
ESTABLISHED
ESTABLISHED
CALL BACK INVOKED SEND.CONF
OR UNBLOCKED
DATA
RECEIVE.IND CALL BACK INVOKED
= TCONS state
ACC = ACCEPTING
1.
2.
3.
4.
5.
6.
7.
LISTEN.REQ sets up call back
OPEN.REQ attempts to make connection. This blocks until the OPEN.CONF
When OPEN reaches listening end the Listen Call Back Fn is called
When the Listen Call Back Fn returns (with return value 0, i.e. Accepted) then this
represents the OPEN.RES and causes TCONS to send the ACCEPT to the Opening
end
When ACCEPT reaches Opening end it causes the Opening application to be
unblocked and an EST to be sent
When EST reaches Listening end the connection is established
TCONS only accepts send and receive requests when the connection is established
i.e. TCONS in ESTABLISHED state.
SEND AND RECEIVE
ERRORS
Sender
Receiver
RECEIVE.REQ
SEND.REQ
ERROR RETURNED
IMMEDIATELY
NOT ESTABLISHED
REJECT.IND
NOT ESTABLISHED
ERROR RETURNED
IMMEDIATELY
REJECT.IND
= TCONS state
ACC = ACCEPTING
1.
2.
TCONS rejects RECEIVE.REQ because connection not established. Call Back not
registered by TCONS because of error.
TCONS rejects SEND.REQ because connection not established. Call Back not
registered by TCONS because of error.
SEND AND RECEIVE
TIMEOUT
CALL BACK SET UP
OR BLOCKING
Sender
Receiver
SEND.REQ
DATA
ACK
ESTABLISHED
ESTABLISHED
CALL BACK INVOKED FAILURE.IND
OR UNBLOCKED
RECEIVE.REQ CALL BACK SET UP
RECEIVE.IND CALL BACK INVOKED
RECEIVE.REQ BLOCKING
TIMEOUT.IND RETURNS TIMEOUT
ERROR
RETRY = 0
= TCONS state
ACC = ACCEPTING
1.
2.
3.
4.
RECEIVE.REQ prepares TCONS to receive data i.e. gives it a buffer. TCONS sets
up call back to indicate when data received.
SEND.REQ sends data. TCONS sets up call back and also starts timeout timer.
No ACK received by Sender so sender times out and gives TIMEOUT.IND indication
to application.
Blocking RECEIVE.REQ sets a timeout . If timeout timer expires before data received
then a timeout error is returned.
SEND AND RECEIVE
RETRY = 1
CALL BACK SET UP
OR BLOCKING
Sender
Receiver
SEND.REQ
DATA
ACK
DATA
ACK
CALL BACK INVOKED SEND.CONF
OR UNBLOCKED
ESTABLISHED
ESTABLISHED
TIMEOUT AND RETRY
RECEIVE.REQ CALL BACK SET UP
RECEIVE.IND CALL BACK INVOKED
DATA WITH SAME SEQUENCE
NUMBER SO NOT PASSED TO
APPLICATION
= TCONS state
ACC = ACCEPTING
1.
2.
3.
4.
RECEIVE.REQ prepares TCONS to receive data i.e. gives it a buffer. TCONS sets
up call back to indicate when data received.
SEND.REQ sends data. TCONS sets up call back and also starts timeout timer.
No ACK received by Sender so sender times out and gives TIMEOUT.IND indication
to application.
Blocking RECEIVE.REQ sets a timeout . If timeout timer expires before data received
then a timeout error is returned.
SEND AND RECEIVE
RETRY = 1
CALL BACK SET UP
OR BLOCKING
Sender
Receiver
SEND.REQ
ACK
DATA
ESTABLISHED
CALL BACK INVOKED FAILURE.IND
OR UNBLOCKED
DATA
ESTABLISHED
TIMEOUT AND RETRY
RECEIVE.REQ CALL BACK SET UP
RECEIVE.IND CALL BACK INVOKED
= TCONS state
ACC = ACCEPTING
1.
2.
3.
4.
RECEIVE.REQ prepares TCONS to receive data i.e. gives it a buffer. TCONS sets
up call back to indicate when data received.
SEND.REQ sends data. TCONS sets up call back and also starts timeout timer.
No ACK received by Sender so sender times out and gives TIMEOUT.IND indication
to application.
Blocking RECEIVE.REQ sets a timeout . If timeout timer expires before data received
then a timeout error is returned.
SEND AND RECEIVE
RETRY = 1
CALL BACK SET UP
OR BLOCKING
4.
DATA
ACK
DATA
ACK
ESTABLISHED
ACK IS IGNORED IF IT
IS RECEIVED AFTER
LAST RETRY TIMEOUT
RECEIVE.REQ CALL BACK SET UP
ESTABLISHED
CALL BACK INVOKED FAILURE.IND
OR UNBLOCKED
2.
3.
Receiver
SEND.REQ
TIMEOUT AND RETRY
1.
Sender
RECEIVE.IND CALL BACK INVOKED
DATA WITH SAME SEQUENCE
NUMBER SO NOT PASSED TO
APPLICATION
= TCONS state
ACC = ACCEPTING
RECEIVE.REQ prepares TCONS to receive data i.e. gives it a buffer. TCONS sets
up call back to indicate when data received.
SEND.REQ sends data. TCONS sets up call back and also starts timeout timer.
No ACK received by Sender so sender times out and gives TIMEOUT.IND indication
to application.
Blocking RECEIVE.REQ sets a timeout . If timeout timer expires before data received
then a timeout error is returned.
CONN A QoS-A
CONN B QoS-B
CONN D QoS-D
CONN C QoS-C
ADDR
Allowed connection
PORT
SAP
Not allowed connection