1
Stanislaw BUDKOWSKI NATIONAL INSTITUTE OF TELECOMMUNICATIONS (INT) 9, Rue Charles Fourier, 91011 EVRY Cedex, FRANCE tel: +33 1 60 76 42 03 fax: +33 1 60 78 41 36 Email: stan@int-evry.fr
INRES Service & Protocol Stanislaw BUDKOWSKI NATIONAL INSTITUTE - - PowerPoint PPT Presentation
INRES Service & Protocol Stanislaw BUDKOWSKI NATIONAL INSTITUTE OF TELECOMMUNICATIONS (INT) 9, Rue Charles Fourier, 91011 EVRY Cedex, FRANCE tel: +33 1 60 76 42 03 fax: +33 1 60 78 41 36 Email: stan@int-evry.fr 1 General Information
1
Stanislaw BUDKOWSKI NATIONAL INSTITUTE OF TELECOMMUNICATIONS (INT) 9, Rue Charles Fourier, 91011 EVRY Cedex, FRANCE tel: +33 1 60 76 42 03 fax: +33 1 60 78 41 36 Email: stan@int-evry.fr
2
General Information
"Formal Methods and Conformance Testing"
described in K.J. Turner (Ed.) book
3
INRES-user INRES-user
INRES Service primitives INRES Service primitives
Medium Service primitives Medium Service primitives
INRES entity Medium Service
INRES protocol
INRES entity
Basic structure of the INRES system
4
INRES Service General information
– connection-oriented – asymmetrical
the Initiator-user,
is established,
connection
5
ICONconf IDISind ICONreq IDATreq ISAPini ISAPres INITIATOR User RESPONDER User ICONind IDATind IDISreq ICONresp
INRES Service Structure
6
INRES Service Service Primitives
Pha se Kin d Name Parameters Req u est ICONreq In d icatio n ICONin d Respons e ICONresp C o n n ectio n C o n firmatio n ICONco n f Req u est ID A T req Service Da ta Un it Data Trans fer In d icatio n ID A T in d Service Da ta Un it Req u est IDISreq Disconn ectio n In d icatio n IDISin d
7
INRES Service Connection Phase
using ICONreq. An ICONreq should be issued only once to establish a connection and it may be repeated only
ICONreq ICONconf ICONind ICONresp
8
INRES Service Data Transmission Phase
IDATreq which will be delivered as IDATind to the Responder-user
9
ICONreq ICONind IDISreq IDISind ICONconf ICONresp
IDATind IDATreq IDISreq IDISind
INRES Service Disconnection Phase - normal course (1)
10
INRES Service Disconnection Phase - normal course (2)
11
ICONreq IDISind
IDISind IDATreq
INRES Service Disconnection Phase - spontaneous disconnection
12
INRES Service - User Errors
it by the service user be described ? -- YES for robustness. – An ICONreq should be ignored if issued when a connection is already established or is currently being established – An ICONresp should be ignored if issued before any attempt to establish a connection was done, or if issued too late, after such an attempt was made – A IDISreq should be ignored if issued before any attempt to establish a connection was done – A IDATreq should be ignored if issued when a connection is not established.
13
INRES Service
Estelle High Level Description
specification Inres_service; {INR_ServHL.stl} default individual queue; timescale seconds; (************Outermost Interface *********) type ISDUType = ... ; {undefined type def} channel ISAPchn1(User,Service); by User : ICONreq; IDATreq(ISDU : ISDUType); by Service : ICONconf; IDISind; channel ISAPchn2(User,Service); by User : ICONresp; IDISreq; by Service : ICONind; IDATind(ISDU : ISDUType); (******** Service Module ******) module Service systemprocess; ipISAPini : ISAPchn1(Service); ISAPres : ISAPchn2(Service); end ; body Service_Body for Service; end; {of Service_Body} modvar {of specification} SP: Service; initialize {of specification} begin init SP with Service_Body; end ;
14
INRES Service Estelle Specification - Service_body
const d = any INTEGER; state DISCONNECTED, I_CALLING_R, CONNECTED; stateset ACTIVE = [ I_CALLING_R, CONNECTED]; ignoreICONreq = [I_CALLING_R, CONNECTED]; ignoreICONresp = [DISCONNECTED, CONNECTED]; ignoreIDATreq = [DISCONNECTED, I_CALLING_R]; initialize {of Service_Provider_Body} to DISCONNECTED begin end ;
(*************CONNECTION PHASE **************)
trans {of Service_Provider_Body} from DISCONNECTED to I_CALLING_R when ISAPini.ICONreq begin output ISAPres.ICONind end ; from I_CALLING_R to CONNECTED when ISAPres.ICONresp begin output ISAPini.ICONconf end ;
(******* DATA TRANSFER PHASE ***************)
from CONNECTED when ISAPini.IDATreq(ISDU) begin output ISAPres.IDATind(ISDU) end ;
(******** DISCONNECTION PHASE **************)
from ACTIVE to DISCONNECTED when ISAPres.IDISreq begin output ISAPini.IDISind end ;
(***spontaneous disconnect **)
from ACTIVE to DISCONNECTED delay (d) begin output ISAPini.IDISind end ;
15
DISCONNECTED I_CALLING_R CONNECTED ICONreq ICONind IDISreq IDISind delay(d) IDISind ICONresp ICONconf
IDATreq(ISDU) IDATind(ISDU)
INRES Service Service_body, Automaton - gaph
16
INRES Service Service_body, Automaton - table
DISCONN ECTED I_CALLING_R CONNECTED I_CALLING_R ICON re q ICONind CONNECTED ICON re sp ICONconf CONNECTED IDAT re q(I S
DU)
IDATind(I S
DU)
DISCONNECTED DISCONNECTED IDISreq IDISind IDISind DISCONNECTED DISCONNECTED del ay(d) IDISind IDISind
17
INRES Service Estelle Specification - Service_body - robuste
const d = any INTEGER; state DISCONNECTED, I_CALLING_R, CONNECTED; stateset ACTIVE = [ I_CALLING_R, CONNECTED]; ignoreICONreq = [I_CALLING_R, CONNECTED]; ignoreICONresp = [DISCONNECTED, CONNECTED]; ignoreIDATreq = [DISCONNECTED, I_CALLING_R]; initialize {of Service_Provider_Body} to DISCONNECTED begin end ;
(*************CONNECTION PHASE **************)
trans {of Service_Provider_Body} from DISCONNECTED to I_CALLING_R when ISAPini.ICONreq begin output ISAPres.ICONind end ; from I_CALLING_R to CONNECTED when ISAPres.ICONresp begin output ISAPini.ICONconf end ;
(******* DATA TRANSFER PHASE ***************)
from CONNECTED when ISAPini.IDATreq(ISDU) begin output ISAPres.IDATind(ISDU) end ;
(******** DISCONNECTION PHASE **************)
from ACTIVE to DISCONNECTED when ISAPres.IDISreq begin output ISAPini.IDISind end ;
(***spontaneous disconnect **)
from ACTIVE to DISCONNECTED delay (d) begin output ISAPini.IDISind end ;
(*******USER ERRORS PROCESSING***********)
from ignoreICONreq when ISAPini.ICONreq begin end ; from ignoreICONresp to same when ISAPres.ICONresp begin end ; from ignoreIDATreq to same when ISAPini.IDATreq begin end ; from DISCONNECTED when ISAPres.IDISreq begin end ;
18
INRES Protocol General information
Responder
protocol data units (PDU) CR, CC, DT, AK and DR
in the imaginary next higher layer
19
ICONreq IDATreq INITIATOR RESPONDER CC, DR, AK CR, DT
Initiator User Responder User
ICONconf IDISind IDATind ICONind IDISreq ICONresp
ISA P1 ISA P2 PDU1 PDU2
I N RES protocol
INRES Protocol Structure
20
INRES Protocol Protocol data units (PDU)
PDU meaning parameter respecti v e SPs
CR co n n e ct i o n re q u e st n o n e ICONr e q ,ICONi n d CC co n n e ct i o n co n f ir m at i o n n o n e ICONr e sp,ICONc o n f DT d a t a tra n sf e r se q u e n ce n u m be r , I S DU IDATre q ,IDATin d AK ack n o wle d g em e n t se q u e n ce n u m be r n o n e DR disco n n e ct i o n re q u e st n o n e IDI S re q ,IDI S in d
21
INRES Protocol Protocol Phases
RESPONDER takes place in three distinct phases:
spontaneous disconnection's of the INRES service
22
INRES Protocol Connection establishment phase
sending an ICONreq to Initiator – Upon receipt of ICONreq Initiator sends a CR to Responder – Responder can answer to Initiator with CC or DR
the data transmission phase can start
– If Initiator receives nothing at all within 5 seconds, CR is transmitted again to Responder – If, after 4 attempts, still nothing is received by Initiator, it enters the disconnection phase
23
INRES Protocol Connection establishment phase (cont.)
Responder-user gets an ICONind
connection
Initiator, and the data transmission phase is entered
disconnection phase
24
INRES Protocol Data transmission phase (1)
DT and is then ready to receive another IDATreq
transmitted by Initiator as a parameter of DT
25
INRES Protocol Data transmission phase (cont.)
with the next (i.e. other) sequence number can be sent
number, it sends the last DT once again
arrive within 5 seconds
afterwards Initiator enters the disconnection phase
26
INRES Protocol Data transmission phase (cont.)
number (and ISDU), Responder sends IDATind to its user (with the received ISDU as a parameter), and sends to the Initiator an AK with the same sequence number
number Responder sends an AK with the sequence number of the last correctly received DT
ignored.
27
INRES Protocol Disconnection phase
to Responder
Initiator and it is ready to receive another connection establishment attempt CR from Initiator
use
CR have been sent unsuccessfully to the Responder
28
INRES Protocol Estelle Specification -HLD
specification Inres_protocol; {INR_Pr-ner.stl ; without error processing (reliable transmission assumed, no-user errors} default individual queue; (**********Outermost Interface ************) type ISDUtype = ...; {undefined data type} SeqNb = 0..1; PDUtype = (CR, CC, DT, AK, DR); channel ISAPchn1(Usr, P_E); by Usr: ICONreq; IDATreq(ISDU: ISDUtype); by P_E: ICONconf; IDISind; channel ISAPchn2(Usr,P_E); by Usr: ICONresp; IDISreq; by P_E: ICONind; IDATind(ISDU: ISDUtype); channel IPDU(IorR, Coder); by IorR: CR; DT(Num:SeqNb; ISDU:ISDUtype); by Coder CC; AK(Num:SeqNb); DR; (********** Protocol Entity module **********) module Protocol_Entity systemprocess; ip ISAP1: ISAPchn1(P_E); ISAP2: ISAPchn2(P_E); PDU2: IPDU(Coder); PDU1: IPDU(IorR); end; (**************** Initiator *******************) body Initiator for Protocol_Entity ; #include "Initiator-ner" end; {of Initiator} (*************** Responder **************) body Responder for Protocol_Entity ; #include "Responder-ner" end; {of Responder} modvar {of specification} Ini, Res: Protocol_Entity; initialize {of specification} begin init Ini with Initiator; init Res with Responder; connect Ini.PDU1 to Res.PDU2; end;
29
INRES Protocol Estelle Specification - Initiator-ner
{Initiator body-no error processing}
var number: SeqNb; state DISCONNECTED, WAIT, CONNECTED, SENDING; stateset notignoreDR = [WAIT, CONNECTED, SENDING]; initialize {of Initiator} to DISCONNECTED begin end; trans {of Initiator} { Connection Phase } from DISCONNECTED to WAIT when ISAP1.ICONreq begin
from WAIT to CONNECTED when PDU1.CC begin number:= 1;
{ Data Transfer Phase } from CONNECTED to SENDING when ISAP1.IDATreq(ISDU) begin
from SENDING when PDU1.AK(Num) provided Num = number to CONNECTED begin number:= 1 - number; end; { Disconnection Phase } from notignoreDR to DISCONNECTED when PDU1.DR begin
30
DISCONNECT IDAT req(ISDU) DT(number, ISDU) A K (Num), Num=number number:=1-number W A IT C O NNECT ED SEN DI N G ICONreq CR DR IDISind CC number:=1; ICONconf
INRES Protocol Initiator-ner-graph
31
INRES Protocol Estelle Specification - Responder-ner
{Responder body - no error processing } var number: SeqNb; state DISCONNECTED, WAIT, CONNECTED; stateset notignoreIDISreq = [WAIT, CONNECTED]; initialize {of Responder} to DISCONNECTED begin end; trans {of Responder}
{ Co nnection Phase }
from DISCONNECTED to WAIT when PDU2.CR begin
from WAIT to CONNECTED when ISAP2.ICONresp begin number:= 1; output PDU2.CC end;
{ Data Transfer Phase }
from CONNECTED when PDU2.DT(Num, ISDU) provided Num = number begin
ISAP2.IDATind(ISDU);
number:= 1 - number end;
{ Disconnection Phase }
from notignoreIDISreq to DISCONNECTED when ISAP2.IDISreq begin
32
DI SCONNECTED W A IT C O N N ECT ED CR I CON ind I CON resp number:=1; CC IDISreq DR
DT(Num, ISDU), Num = number IDAT ind(ISDU); A K (Num); number:=1-number
INRES Protocol Responder-ner-graph
33
INRES Protocol Estelle Specification - Initiator
{ Initiator body with error processing } Var number: SeqNb;
counter: 0..4; state DISCONNECTED, WAIT, CONNECTED, SENDING; stateset notignoreDR = [WAIT, CONNECTED, SENDING]; ignoreICONreq = [WAIT, CONNECTED, SENDING]; ignoreIDATreq = [DISCONNECTED, WAIT]; ignoreCC = [DISCONNECTED, CONNECTED, SENDING]; ignoreAK = [DISCONNECTED, WAIT, CONNECTED]; initialize {of Initiator} to DISCONNECTED begin end; trans {of Initiator} { User-Errors Processing Phase } from ignoreICONreq to same when ISAP1.ICONreq begin end; from ignoreIDATreq to same when ISAP1.IDATreq begin end; {Connection Phase } from DISCONNECTED to WAIT when ISAP1.ICONreq begin counter:= 0;
from WAIT to CONNECTED when PDU1.CC begin number:= 1; counter:= 0;
from WAIT delay(5) provided counter < 4 to same begin
counter:= counter + 1;end; provided otherwise to DISCONNECTED begin
34
INRES Protocol Estelle Specification - Initiator ( cont.)
{ Data Transfer Phase } from CONNECTED to SENDING when ISAP1.IDATreq(ISDU) begin
from SENDING when PDU1.AK(Num) provided Num = number to CONNECTED begin counter:= 0 ; number:= 1 - number; end; provided (Num <> number) and (counter < 4) to same begin
counter:= counter + 1 end; provided otherwise to DISCONNECTED begin
from SENDING delay(5) provided counter < 4 to same begin
counter:= counter + 1 end; provided otherwise to DISCONNECTED begin
{ Errors/Time-outs Processing Phase } from ignoreCC to same when PDU1.CC begin end; from ignoreAK to same when PDU1.AK(NUM) begin end; from DISCONNECTED when PDU1.DR begin end; { Disconnection Phase } from notignoreDR to DISCONNECTED when PDU1.DR begin
35
INRES Protocol Medium
to realise INRES system
connectionless
MDATind, carry a parameter Medium-Service Data Units (MSDU)
36
MSAP[1] MSAP[2] MDATreq (MPDU) MDATind (MPDU)
Medium Service
User User MDATreq (MPDU) MDATind (MPDU)
INRES Protocol Medium Structure
37
MDATind MDATreq MDATreq MDATind
MDATreq MDATreq
Successful data transfer in both direction Unsuccessful data transfer in both direction
INRES System Medium Service
38
Initiator
CR, DT
Responder Responder User Initiator User
ICONconf IDISind ICONreq IDATreq
Medium Service
MSAP[1] MDATind MSAP[2] MDATind CC, DR, AK MDATreq MDATreq CC, DR, AK CR, DT
Coder Coder
IDATind ICONind IDISreq ICONresp
ISA P1 ISA P2 ISA P2 ISA P1 PDU 1 PDU 2 PDU 1 PDU 2 M SA P M SA P
INRES System Structure
39
INRES System - Estelle Specification-HLD
specification Inres_protocol; {INR_Sy-ner.stl }
default individual queue; (******Outermost Interface **************) type ISDUtype = ...; {undefined data type} SeqNb = 0..1; PDUtype = (CR, CC, DT, AK, DR); type MSDUtype = record id: PDUtype; num : SeqNb; data: ISDUtype; end; channel ISAPchn1(Usr, P_E); by Usr: ICONreq; IDATreq(ISDU: ISDUtype); by P_E: ICONconf; IDISind; channel ISAPchn2(Usr,P_E); by Usr: ICONresp; IDISreq; by P_E: ICONind; IDATind(ISDU: ISDUtype); channel IPDU(IorR, Coder); by IorR: CR; DT(Num:SeqNb; ISDU:ISDUtype); by Coder: CC; AK(Num:SeqNb); DR;
channel MSAPchn(P_E, M_S); by P_E: MDATreq(MSDU: MSDUtype); by M_S: MDATind(MSDU: MSDUtype); (***********User module ****************) module User systemprocess; ip ISAP1: ISAPchn1(Usr); ISAP2: ISAPchn2(Usr); end; body User_body1 for User; end; body User_body2 for User; end; (********* Medium_Service module *******) module Medium_Service systemprocess; ip MSAP: array [1..2] of MSAPchn(M_S); end; body Medium_body for Medium_Service; #include "Medium-ner" end; {Medium_body} (********** Protocol Entity module ********) module Protocol_Entity systemprocess; ip ISAP1: ISAPchn1(P_E); ISAP2: ISAPchn2(P_E); PDU2: IPDU(Coder); PDU1: IPDU(IorR); end;
40
INRES System - Estelle Specification-HLD (cont.)
(******************** Initiator ***************) body Initiator for Protocol_Entity ; #include "Initiator-ner" end; {of Initiator} (**************** Responder ***************) body Responder for Protocol_Entity ; #include "Responder-ner" end; {of Responder} (*********** Coder module ***************) module Coder systemprocess; ip PDU1: IPDU(Coder); PDU2: IPDU(IorR); MSAP: MSAPchn(P_E); end; body Coder_body_Ini for Coder; #include "Coder_body_Ini" end; {of Coder_body_Ini} body Coder_body_Res for Coder; #include "Coder_body_Res"
end; { of Coder_body_Res}
modvar {of specification} Ini, Res: Protocol_Entity; Usr_Ini, Usr_Res: User; Cod_Ini, Cod_Res: Coder; Med: Medium_Service; initialize {of specification} begin init Ini with Initiator; init Res with Responder; init Usr_Ini with User_body1; init Usr_Res with User_body2; init Cod_Ini with Coder_body_Ini; init Cod_Res with Coder_body_Res; init Med with Medium_body connect Usr_Ini.ISAP1 to Ini.ISAP1; connect Ini.PDU1 to Cod_Ini.PDU1; connect Cod_Ini.MSAP to Med.MSAP[1]; connect Med.MSAP[2] to Cod_Res.MSAP; connect Cod_Res.PDU2 to Res.PDU2; connect Res.ISAP2 to Usr_Res.ISAP2; end;
41
INRES System - Coder for Initiator
{Coder_body_ini } var MSDU: MSDUtype; trans {of Coder_body_ini} when PDU1.CR begin MSDU.id:= CR;
end; when PDU1.DT(Num, ISDU) begin MSDU.id:= DT; MSDU.num:= Num; MSDU.data:= ISDU;
end; when MSAP.MDATind (MSDU) begin case MSDU.id of CC: output PDU1.CC; AK: output PDU1.AK (MSDU.num); DR: output PDU1.DR; end;
42
INRES System Coder for Responder
{Coder_body_res } var MSDU: MSDUtype; trans {of Coder_body_res} when PDU2.CC begin MSDU.id:= CC;
end; when PDU2.AK(Num) begin MSDU.id:= AK; MSDU.num:= Num;
end; when PDU2.DR begin MSDU.id:= DR;
end; when MSAP.MDATind(MSDU) begin case MSDU.id of CR: output PDU2.CR;
DT:outputPDU2.DT(MSDU.num,MSD.data)
; end; end;
43
INRES System Medium
trans when MSAP[1].MDATreq(MSDU) begin
when MSAP[2].MDATreq(MSDU) begin
{Message loss} when MSAP[1].MDATreq(MSDU) begin end; when MSAP[2].MDATreq(MSDU) begin end;
44
INRES System