diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-01-20 13:20:58 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-01-20 20:15:26 +0100 |
commit | a2473da68352be2209e8e764606737ac9576950f (patch) | |
tree | ff15ad77c954abf83b5b908f53132c49e4d94cb3 /library | |
parent | 94b7a68f76227c96a7ba94c11ae3c9559a9b65f6 (diff) |
sccp: Introduce test TC_tiar_timeout
Existing templates are moved to SCPP_Templates.ttcn and new ones
required for the test are added there.
Related: OS#4343
Change-Id: I7b56fe77ac3b350d722c74b043e6ecabc48dcf31
Diffstat (limited to 'library')
-rw-r--r-- | library/SCCP_Templates.ttcn | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/library/SCCP_Templates.ttcn b/library/SCCP_Templates.ttcn index 7c2ffa6d..b3e3392f 100644 --- a/library/SCCP_Templates.ttcn +++ b/library/SCCP_Templates.ttcn @@ -9,6 +9,8 @@ module SCCP_Templates { +import from General_Types all; + import from SCCP_Types all; import from SCCPasp_Types all; import from SCCP_Emulation all; @@ -66,5 +68,134 @@ template (value) SCCP_PAR_Address ts_SccpAddr_PC_GT(integer pc, octetstring sio, } } +/* connection oriented SCCP */ +const SCCP_param_ProtocolClass c_class2 := { class:='0010'B, messageHandling:='0000'B };//class 2 + +function ts_SCCP_CR(OCT3 source_lref, SCCP_PAR_Address calling, SCCP_PAR_Address called) +return template (value) PDU_SCCP { + var SCCP_param_CPartyAddressEnc calling_enc := ConvertASPAddressToEncodedAddress_itu(calling); + + var template (value) PDU_SCCP ret := { + connrequest := { + messageType := cr, + sourceLocRef := source_lref, + protClass := c_class2, + pointer1 := 2, + pointer2 := 0, /* overwritten */ + calledPAddress := ConvertASPAddressToEncodedAddress_itu(called), + optionalPart := { + credit := omit, + callingPAddress := { + paramName := con_SCCP_cgPA, + paramLength := calling_enc.paramLength, /* overwritten */ + addr := calling_enc.addr + }, + data := omit, + hopCounter := omit, + importance := omit + }, + eop := { paramName:= con_SCCP_eop } + } + } + return ret; +} + +template (present) PDU_SCCP tr_SCCP_CC(template (present) OCT3 source_lref, + template (present) OCT3 dest_lref) := { + connconfirm := { + messageType := cc, + destLocRef := dest_lref, + sourceLocRef := source_lref, + protClass := c_class2, + pointer1 := ?, + optionalPart := *, + eop := * + } +} + +template (value) PDU_SCCP ts_SCCP_UDT(SCCP_PAR_Address calling, SCCP_PAR_Address called, + template (value) octetstring data, + template (value) BIT4 msg_hdl := '0000'B) := { + unitdata := { + messageType := udt, + protClass := {'0000'B, msg_hdl}, + pointer1 := 0, /* overwritten */ + pointer2 := 0, /* overwritten */ + pointer3 := 0, /* overwritten */ + calledPAddress := ConvertASPAddressToEncodedAddress_itu(called), + callingPAddress := ConvertASPAddressToEncodedAddress_itu(calling), + data := { + paramLength := 0, + data := data + } + } +} + +template PDU_SCCP tr_SCCP_UDT(SCCP_PAR_Address calling, SCCP_PAR_Address called, + template octetstring data := ?, + template BIT4 msg_hdl := '0000'B) := { + unitdata := { + messageType := udt, + protClass := {'0000'B, msg_hdl}, + pointer1 := ?, + pointer2 := ?, + pointer3 := ?, + calledPAddress := ConvertASPAddressToEncodedAddress_itu(called), + callingPAddress := ConvertASPAddressToEncodedAddress_itu(calling), + data := { + paramLength := lengthof(data), + data := data + } + } +} + +template PDU_SCCP tr_SCCP_IT(template (present) OCT3 source_lref := ?, + template (present) OCT3 dest_lref := ?) := { + inacttest := { + messageType := it, + destLocRef := dest_lref, + sourceLocRef := source_lref, + protClass := c_class2, + sequencingSegmenting := { + reserved := ?, + p_s := ?, + more := ?, + pr := ? + }, + credit := ? + } +} + +template PDU_SCCP tr_SCCP_RLSD(template (present) OCT3 source_lref := ?, + template (present) OCT3 dest_lref := ?, + template (present) SCCP_param_ReleaseCause relcause := ?) := { + released := { + messageType := rlsd, + destLocRef := dest_lref, + sourceLocRef := source_lref, + releaseCause := relcause, + pointer1 := ?, + optionalPart := *, + eop := * + } +} + +template PDU_SCCP ts_SCCP_RLC(OCT3 source_lref, OCT3 dest_lref) := { + relcomp := { + messageType := rlc, + destLocRef := dest_lref, + sourceLocRef := source_lref + } +} + +template PDU_SCCP tr_SCCP_RLC(template (present) OCT3 source_lref := ?, + template (present) OCT3 dest_lref := ?) := { + relcomp := { + messageType := rlc, + destLocRef := dest_lref, + sourceLocRef := source_lref + } +} + } |