diff options
Diffstat (limited to 'library/M3UA_CodecPort.ttcn')
-rw-r--r-- | library/M3UA_CodecPort.ttcn | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/library/M3UA_CodecPort.ttcn b/library/M3UA_CodecPort.ttcn index 94d16d64..e88b6a0d 100644 --- a/library/M3UA_CodecPort.ttcn +++ b/library/M3UA_CodecPort.ttcn @@ -15,6 +15,7 @@ module M3UA_CodecPort { import from IPL4asp_PortType all; import from IPL4asp_Types all; + import from M3UA_CodecPort_CtrlFunct all; import from M3UA_Types all; type record M3UA_RecvFrom { @@ -37,7 +38,7 @@ module M3UA_CodecPort { type record M3UA_Send { ConnectionId connId, - integer stream, + integer stream optional, PDU_M3UA msg } @@ -59,14 +60,18 @@ module M3UA_CodecPort { private function M3UA_to_IPL4_Send(in M3UA_Send pin, out ASP_Send pout) { pout.connId := pin.connId; - pout.proto := { - sctp := { - sinfo_stream := pin.stream, - sinfo_ppid := 3, - remSocks := omit, - assocId := omit - } - }; + if (ispresent(pin.stream)) { + pout.proto := { + sctp := { + sinfo_stream := pin.stream, + sinfo_ppid := 3, + remSocks := omit, + assocId := omit + } + }; + } else { + pout.proto := { tcp := { } }; + } pout.msg := enc_PDU_M3UA(pin.msg); } with { extension "prototype(fast)" }; @@ -80,5 +85,12 @@ module M3UA_CodecPort { in(ASP_RecvFrom -> M3UA_RecvFrom: function(IPL4_to_M3UA_RecvFrom); ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple; ASP_Event -> ASP_Event: simple)" + }; + + function f_set_tcp_segmentation(M3UA_CODEC_PT pt, ConnectionId connId) { + /* Set function for dissecting the binary stream into packets */ + var f_IPL4_getMsgLen vl_f := refers(f_IPL4_fixedMsgLen); + /* Offset: 4, size of length: 4, delta: 0, multiplier: 1, big-endian */ + M3UA_CodecPort_CtrlFunct.f_IPL4_setGetMsgLen(pt, connId, vl_f, {4, 4, 0, 1, 0}); } } |