160 likes | 269 Views
Connection Request. Connection Indication. CONNECT.REQ (SSAP, DSAP, QoS). 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). LISTEN.REQ.
E N D
Connection Request Connection Indication CONNECT.REQ (SSAP, DSAP, QoS) 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)
LISTEN.REQ OPEN.REQ CLOSE.IND OPEN.IND OPEN.RES CLOSE.REQ OPEN.CONF CLOSE.IND SEND.REQ SEND.REQ RECEIVE.IND 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
= TCONS state Opener Listener OPEN AND LISTEN LISTEN.REQ CALL BACK SET UP LISTENING OPEN.REQ OPEN OPENING OPEN.IND CALL BACK INVOKED BLOCKING OPEN.RES CALL BACK RETURNED (ACCEPTED) HALF OPEN ACCEPT OPEN.CONF ESTABLISHED EST CALL BACK INVOKED TO INDICATE THAT CONNECTION ESTABLISHED EST. EST.IND ACC = ACCEPTING • 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.
= TCONS state Opener Listener OPEN AND LISTEN LISTEN.REQ CALL BACK SET UP LISTENING OPEN.REQ OPEN OPENING OPEN.IND CALL BACK INVOKED BLOCKING OPEN.RES CALL BACK RETURNED (ACCEPTED) HALF OPEN ACCEPT OPEN.CONF ESTABLISHED EST CALL BACK INVOKED TO INDICATE THAT CONNECTION ESTABLISHED ESTABLISHED EST.IND OPEN.REQ OPEN OPENING OPEN.IND CALL BACK INVOKED BLOCKING OPEN.RES CALL BACK RETURNED (ACCEPTED) ACCEPT HALF OPEN EST OPEN.CONF ESTABLISHED CALL BACK INVOKED TO INDICATE THAT CONNECTION ESTABLISHED EST. EST.IND
= TCONS state Opener Listener OPEN AND LISTEN OPEN.REQ OPEN OPENING OPEN.IND CALL BACK INVOKED ACC BLOCKING OPEN.RES CALL BACK RETURNED (ACCEPTED) HALF OPEN ACCEPT OPEN.CONF ESTABLISHED EST CALL BACK INVOKED TO INDICATE THAT CONNECTION ESTABLISHED EST. EST.IND OPEN OPEN.IND CALL BACK INVOKED BLOCKING OPEN.RES CALL BACK RETURNED (ACCEPTED) ACCEPT OPEN.CONF EST CALL BACK INVOKED TO INDICATE THAT CONNECTION ESTABLISHED EST.IND ACC = ACCEPTING
= TCONS state Opener Listener OPEN AND LISTEN LISTEN.REQ CALL BACK SET UP Acceptance criteria LISTENING OPEN.REQ OPEN OPENING ACC BLOCKING Open meets acceptance criteria HALF OPEN ACCEPT OPEN.CONF ESTABLISHED EST EST. EST.IND CALL BACK ACC = ACCEPTING • 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.
= TCONS state Opener Listener OPEN AND LISTEN NOT EST. LISTEN.REQ CALL BACK SET UP LISTENING OPEN.REQ OPEN OPENING OPEN.IND CALL BACK INVOKED ACC BLOCKING OPEN.RES CALL BACK RETURNED (ACCEPTED) HALF OPEN ACCEPT TCONS TIMES OUT OPEN_FAILURE.IND NOT EST. TCONS TIMES OUT NOT EST. OPEN_FAILURE.IND CALL BACK INVOKED OPEN FAILURE ACC = ACCEPTING • 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.
= TCONS state Opener Listener OPEN AND LISTEN LISTEN.REQ CALL BACK SET UP LISTENING OPEN.REQ OPEN OPENING OPEN.IND CALL BACK INVOKED ACC BLOCKING OPEN.RES CALL BACK RETURNED (ACCEPTED) HALF OPEN ACCEPT OPEN.CONF ESTABLISHED EST SEND OR RX rejected until connection established EST. EST.IND ACC = ACCEPTING • 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.
= TCONS state Sender Listener SEND AND RECEIVE ESTABLISHED ESTABLISHED RECEIVE.REQ CALL BACK SET UP CALL BACK SET UP OR BLOCKING SEND.REQ DATA RECEIVE.IND CALL BACK INVOKED ACK CALL BACK INVOKED OR UNBLOCKED SEND.CONF ACC = ACCEPTING • 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.
= TCONS state Sender Receiver SEND AND RECEIVE ERRORS NOT ESTABLISHED NOT ESTABLISHED RECEIVE.REQ SEND.REQ REJECT.IND ERROR RETURNED IMMEDIATELY REJECT.IND ERROR RETURNED IMMEDIATELY ACC = ACCEPTING • 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.
= TCONS state Sender Receiver SEND AND RECEIVE TIMEOUT ESTABLISHED ESTABLISHED CALL BACK SET UP OR BLOCKING SEND.REQ RECEIVE.REQ CALL BACK SET UP DATA RECEIVE.IND CALL BACK INVOKED ACK CALL BACK INVOKED OR UNBLOCKED FAILURE.IND RECEIVE.REQ BLOCKING TIMEOUT.IND RETURNS TIMEOUT ERROR RETRY = 0 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.
= TCONS state Sender Receiver SEND AND RECEIVE RETRY = 1 ESTABLISHED ESTABLISHED CALL BACK SET UP OR BLOCKING SEND.REQ RECEIVE.REQ CALL BACK SET UP DATA RECEIVE.IND CALL BACK INVOKED ACK TIMEOUT AND RETRY DATA DATA WITH SAME SEQUENCE NUMBER SO NOT PASSED TO APPLICATION ACK CALL BACK INVOKED OR UNBLOCKED SEND.CONF 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.
= TCONS state Sender Receiver SEND AND RECEIVE RETRY = 1 ESTABLISHED ESTABLISHED CALL BACK SET UP OR BLOCKING SEND.REQ RECEIVE.REQ CALL BACK SET UP DATA RECEIVE.IND CALL BACK INVOKED ACK TIMEOUT AND RETRY DATA CALL BACK INVOKED OR UNBLOCKED FAILURE.IND 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.
= TCONS state Sender Receiver SEND AND RECEIVE RETRY = 1 ESTABLISHED ESTABLISHED CALL BACK SET UP OR BLOCKING SEND.REQ RECEIVE.REQ CALL BACK SET UP DATA RECEIVE.IND CALL BACK INVOKED ACK TIMEOUT AND RETRY DATA DATA WITH SAME SEQUENCE NUMBER SO NOT PASSED TO APPLICATION ACK CALL BACK INVOKED OR UNBLOCKED FAILURE.IND ACK IS IGNORED IF IT IS RECEIVED AFTER LAST RETRY TIMEOUT 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.
PORT CONN A QoS-A CONN B QoS-B CONN D QoS-D CONN C QoS-C ADDR Allowed connection Not allowed connection SAP