2017-07-14 20:05:56 +00:00
|
|
|
/* dual-faced port that wraps an IPL4asp port and encodes/decodes GSMTAP */
|
|
|
|
module GSMTAP_PortType {
|
|
|
|
import from GSMTAP_Types all;
|
|
|
|
import from IPL4asp_PortType all;
|
|
|
|
import from IPL4asp_Types all;
|
|
|
|
|
|
|
|
/* just like ASP_ReacFrom but with decoded GsmtapMessage */
|
|
|
|
type record GSMTAP_RecvFrom {
|
|
|
|
ConnectionId connId,
|
|
|
|
HostName remName,
|
|
|
|
PortNumber remPort,
|
|
|
|
HostName locName,
|
|
|
|
PortNumber locPort,
|
|
|
|
ProtoTuple proto,
|
|
|
|
UserData userData,
|
|
|
|
GsmtapMessage msg
|
|
|
|
}
|
|
|
|
|
|
|
|
/* just like ASP_Send but with decoded GsmtapMessage */
|
|
|
|
type record GSMTAP_Send {
|
|
|
|
ConnectionId connId,
|
|
|
|
ProtoTuple proto,
|
|
|
|
GsmtapMessage msg
|
|
|
|
}
|
|
|
|
|
|
|
|
/* just like ASP_SendTo but with decoded GsmtapMessage */
|
|
|
|
type record GSMTAP_SendTo {
|
|
|
|
ConnectionId connId,
|
|
|
|
HostName remName,
|
|
|
|
PortNumber remPort,
|
|
|
|
ProtoTuple proto,
|
|
|
|
GsmtapMessage msg
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert RecvFrom from ASP to GSMTAP decoded */
|
|
|
|
private function IPL4_to_GSMTAP(in ASP_RecvFrom pin, out GSMTAP_RecvFrom pout) {
|
|
|
|
pout.connId := pin.connId;
|
|
|
|
pout.remName := pin.remName;
|
|
|
|
pout.remPort := pin.remPort;
|
|
|
|
pout.locName := pin.locName;
|
|
|
|
pout.locPort := pin.locPort;
|
|
|
|
pout.proto := pin.proto;
|
|
|
|
pout.userData := pin.userData;
|
|
|
|
pout.msg := dec_GsmtapMessage(pin.msg);
|
|
|
|
} with { extension "prototype(fast)" }
|
|
|
|
|
|
|
|
/* Convert SendTo from GSMTAP to ASP */
|
|
|
|
private function GSMTAP_to_IPL4_SendTo(in GSMTAP_SendTo pin, out ASP_SendTo pout) {
|
|
|
|
pout.connId := pin.connId;
|
|
|
|
pout.remName := pin.remName;
|
|
|
|
pout.remPort := pin.remPort;
|
|
|
|
pout.proto := pin.proto;
|
|
|
|
pout.msg := enc_GsmtapMessage(pin.msg);
|
|
|
|
} with { extension "prototype(fast)" }
|
|
|
|
|
|
|
|
/* Convert SendTo from GSMTAP to ASP */
|
|
|
|
private function GSMTAP_to_IPL4_Send(in GSMTAP_Send pin, out ASP_Send pout) {
|
|
|
|
pout.connId := pin.connId;
|
|
|
|
pout.proto := pin.proto;
|
|
|
|
pout.msg := enc_GsmtapMessage(pin.msg);
|
|
|
|
} with { extension "prototype(fast)" }
|
|
|
|
|
|
|
|
/* dual-faced port that converts from octetstring to decoded
|
|
|
|
* GSMTAP and vice-versa */
|
|
|
|
type port GSMTAP_PT message {
|
|
|
|
out GSMTAP_Send
|
|
|
|
out GSMTAP_SendTo
|
|
|
|
in GSMTAP_RecvFrom
|
|
|
|
in ASP_Event
|
2017-11-19 08:29:51 +00:00
|
|
|
in ASP_ConnId_ReadyToRelease
|
2017-07-14 20:05:56 +00:00
|
|
|
} with { extension "user IPL4asp_PT
|
|
|
|
out(GSMTAP_Send -> ASP_Send: function(GSMTAP_to_IPL4_Send);
|
|
|
|
GSMTAP_SendTo -> ASP_SendTo: function(GSMTAP_to_IPL4_SendTo))
|
|
|
|
in(ASP_RecvFrom -> GSMTAP_RecvFrom: function(IPL4_to_GSMTAP);
|
2017-11-19 08:29:51 +00:00
|
|
|
ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple;
|
2017-07-14 20:05:56 +00:00
|
|
|
ASP_Event -> ASP_Event: simple)" }
|
|
|
|
|
|
|
|
}
|