From dbb57eb57dd61f436cbc554c9596b450aedcddfd Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 13 Oct 2018 13:15:51 +0200 Subject: [PATCH] make osmpy IPA code aware of RSPRO RSPRO (Remote Sim PROtocol) is used by osmo-remsim and basd on the IPA multiplex. Let's add knowledge about this stream identifier to osmopy. Change-Id: I5c0e674390c5672ee1083b1226c206557f6a980b --- osmopy/osmo_ipa.py | 2 +- osmopy/twisted_ipa.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/osmopy/osmo_ipa.py b/osmopy/osmo_ipa.py index a1fcaf6..246101d 100755 --- a/osmopy/osmo_ipa.py +++ b/osmopy/osmo_ipa.py @@ -34,7 +34,7 @@ class IPA(object): # OpenBSC extensions: OSMO, MGCP_OLD PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC) # ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol - EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6) + EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6, RSPRO=7) # OpenBSC extension: SCCP_OLD MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF) _IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8) diff --git a/osmopy/twisted_ipa.py b/osmopy/twisted_ipa.py index 533bfae..70c1ef0 100755 --- a/osmopy/twisted_ipa.py +++ b/osmopy/twisted_ipa.py @@ -84,6 +84,12 @@ class IPACommon(basic.Int16StringReceiver): """ self.dbg('OSMO OAP received %s' % data) + def osmo_RSPRO(self, data): + """ + OSMO RSPRO (Remote Sim Protocol) extension + """ + self.dbg('OSMO RSPRO received %s' % data) + def osmo_UNKNOWN(self, data): """ OSMO defaul extension handler