osmocom.gsup

GSUP protocol (Osmocom TCAP/MAP alternative)

This is an encoder/decoder implementation for the Osmocom GSUP protocol, built upon the osmocom.tlv and osmocom.construct infrastructure.

class osmocom.gsup.message.GSUP_TLV_IE(**kwargs)

Class representing the TLV format as used in Osmocom GSUP. It’s a simple ‘8-bit tag / 8-bit length / value’ variant.

class osmocom.gsup.message.GsupMessage(msg_type: MsgType | int)

Represents a single message within the GSUP protocol.

classmethod from_bytes(encoded: bytes) GsupMessage

Create a GsupMessage instance from the decode of the given bytes.

classmethod from_dict(decoded: dict) GsupMessage

Create a GsupMessage instance from the decoded dict.

to_bytes()

Encode a GsupMessage instance into bytes.

to_dict()

Encode a GsupMessage instance into a json-serializable dict.

class osmocom.gsup.message.MsgType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

GSUP protocol message type. Keep this in sync with https://gitea.osmocom.org/osmocom/libosmocore/src/branch/master/include/osmocom/gsm/gsup.h

class osmocom.gsup.message.tlv

TLV definitions for the GSUP IEs, utilizing the osmocom.tlv code. Keep this in sync with https://gitea.osmocom.org/osmocom/libosmocore/src/branch/master/include/osmocom/gsm/gsup.h

class AnApdu(**kwargs)
class AuthTuple(**kwargs)
nested_collection_cls

alias of auto_collection_AuthTuple

class CancelType(**kwargs)
class Cause(**kwargs)
class CauseBssap(**kwargs)
class CauseRr(**kwargs)
class CauseSm(**kwargs)
class CnDomain(**kwargs)
class CurrentRatType(**kwargs)
class DestinationName(**kwargs)
class FreezePTMSI(**kwargs)
class HlrNumber(**kwargs)
class IMEI(**kwargs)
class IMSI(**kwargs)
class IeCollection(desc=None, **kwargs)
class ImeiCheckResult(**kwargs)
class MSISDN(**kwargs)
class MessageClass(**kwargs)
class NumVectorsReq(**kwargs)
class PCO(**kwargs)
class PdpInfo(**kwargs)
nested_collection_cls

alias of auto_collection_PdpInfo

class PdpInfoCompl(**kwargs)
class SessionId(**kwargs)
class SessionState(**kwargs)
class SmAlert(**kwargs)
class SmRpCause(**kwargs)
class SmRpDa(**kwargs)
class SmRpMms(**kwargs)
class SmRpMr(**kwargs)
class SmRpOa(**kwargs)
class SmRpUi(**kwargs)
class SourceName(**kwargs)
class SupplementaryServiceInfo(**kwargs)
class SupportedRatTypes(**kwargs)
class auth

Nested TLV IEs within the AuthTuple.

class AUTN(**kwargs)
class AUTS(**kwargs)
class CK(**kwargs)
class IK(**kwargs)
class Kc(**kwargs)
class RAND(**kwargs)
class RES(**kwargs)
class SRES(**kwargs)
class pdp

Nested TLV IEs within the PdpInfo.

class AccessPointName(**kwargs)
class PdpAddress(**kwargs)
class PdpChargingCharacteristics(**kwargs)
class PdpContextId(**kwargs)
class Qos(**kwargs)