gsmmap

package module
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 7 Imported by: 0

README

go-gsmmap

Go CI Go Reference Go Report Card Go Version

Quality Gate Status Coverage Bugs Vulnerabilities

A robust, lightweight implementation of the MAP (Mobile Application Part) protocol in Go.

Overview

The go-gsmmap package provides simple and painless handling of MAP in the mobile networks, implemented in the Go Programming Language. It's designed to be straightforward to integrate into existing Go applications that need to interact with mobile networks.

The GSM-MAP structures in this library are directly defined as go structs with ASN.1 tags, making them lightweight and efficient.

Installation

go get github.com/gomaja/go-gsmmap

Supported Features

MAP Messages
MAP Message Abbreviation Reference Supported
Invoke Send Routing Info For Short Message SRI-for-SM-Req 3GPP TS 29.002 version 15.5.0 Release 15
Return Result Last Send Routing Info For Short Message SRI-SM-Resp 3GPP TS 29.002 version 15.5.0 Release 15
Invoke Mt Forward Short Message MT-ForwardSM 3GPP TS 29.002 version 15.5.0 Release 15
Invoke MO Forward Short Message MO-ForwardSM 3GPP TS 29.002 version 15.5.0 Release 15
Invoke Update Location UpdateLocation 3GPP TS 29.002 version 15.5.0 Release 15
Return Result Update Location UpdateLocation-Res 3GPP TS 29.002 version 15.5.0 Release 15
Invoke Update GPRS Location UpdateGprsLocation 3GPP TS 29.002 version 15.5.0 Release 15
Return Result Update GPRS Location UpdateGprsLoc-Res 3GPP TS 29.002 version 15.5.0 Release 15

Dependencies

Author

Marwan Jadid

License

This project is licensed under the MIT License—see the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocationInfoWithLMSI

type LocationInfoWithLMSI struct {
	NetworkNodeNumber string
}

type MoFsm

type MoFsm struct {
	ServiceCentreAddressDA string
	MSISDN                 string
	TPDU                   tpdu.TPDU // tpdu.MO (Submit type TPDU)
}

func ParseMoFsm

func ParseMoFsm(dataIE []byte) (*MoFsm, []byte, error)

ParseMoFsm takes a complete bytes IE

func (*MoFsm) Marshal

func (moFsm *MoFsm) Marshal() ([]byte, error)

type MtFsm

type MtFsm struct {
	IMSI                   string
	ServiceCentreAddressOA string
	TPDU                   tpdu.TPDU // tpdu.MT (Deliver type TPDU)

	MoreMessagesToSend bool
}

func ParseMtFsm

func ParseMtFsm(dataIE []byte) (*MtFsm, []byte, error)

ParseMtFsm takes a complete bytes IE

func (*MtFsm) Marshal

func (mtFsm *MtFsm) Marshal() ([]byte, error)

type SGSNCapability added in v1.1.1

type SGSNCapability struct {
	GprsEnhancementsSupportIndicator bool
	SupportedLCSCapabilitySets       *SupportedLCSCapabilitySets
}

type SriSm

type SriSm struct {
	MSISDN               string
	SmRpPri              bool
	ServiceCentreAddress string
}

func ParseSriSm

func ParseSriSm(dataIE []byte) (*SriSm, []byte, error)

ParseSriSm takes a complete bytes IE with any ASN1 encoding (DER and non-DER)

func ParseSriSmDER added in v1.1.0

func ParseSriSmDER(dataIE []byte) (*SriSm, []byte, error)

ParseSriSmDER takes a complete bytes IE with DER ASN1 encoding

func (*SriSm) Marshal

func (sriSm *SriSm) Marshal() ([]byte, error)

type SriSmResp

type SriSmResp struct {
	IMSI                 string
	LocationInfoWithLMSI LocationInfoWithLMSI
}

func ParseSriSmResp

func ParseSriSmResp(dataIE []byte) (*SriSmResp, []byte, error)

func (*SriSmResp) Marshal

func (sriSmResp *SriSmResp) Marshal() ([]byte, error)

type SupportedCamelPhases added in v1.1.1

type SupportedCamelPhases struct {
	Phase1 bool
	Phase2 bool
	Phase3 bool
	Phase4 bool
}

type SupportedLCSCapabilitySets added in v1.1.1

type SupportedLCSCapabilitySets struct {
	LcsCapabilitySet1 bool
	LcsCapabilitySet2 bool
	LcsCapabilitySet3 bool
	LcsCapabilitySet4 bool
	LcsCapabilitySet5 bool
}

type UpdateGprsLocation added in v1.1.1

type UpdateGprsLocation struct {
	IMSI        string
	SGSNNumber  string
	SGSNAddress string

	SGSNCapability *SGSNCapability
}

func ParseUpdateGprsLocation added in v1.1.1

func ParseUpdateGprsLocation(dataIE []byte) (*UpdateGprsLocation, []byte, error)

ParseUpdateGprsLocation takes a complete bytes IE with any ASN1 encoding (DER and non-DER)

func ParseUpdateGprsLocationDER added in v1.1.1

func ParseUpdateGprsLocationDER(dataIE []byte) (*UpdateGprsLocation, []byte, error)

ParseUpdateGprsLocationDER takes a complete bytes IE with DER ASN1 encoding

func (*UpdateGprsLocation) Marshal added in v1.1.1

func (updGprsLoc *UpdateGprsLocation) Marshal() ([]byte, error)

type UpdateGprsLocationRes added in v1.1.2

type UpdateGprsLocationRes struct {
	HLRNumber string
}

func ParseUpdateGprsLocationRes added in v1.1.2

func ParseUpdateGprsLocationRes(dataIE []byte) (*UpdateGprsLocationRes, []byte, error)

ParseUpdateGprsLocationRes takes a complete bytes IE with any ASN1 encoding (DER and non-DER)

func ParseUpdateGprsLocationResDER added in v1.1.2

func ParseUpdateGprsLocationResDER(dataIE []byte) (*UpdateGprsLocationRes, []byte, error)

ParseUpdateGprsLocationResDER takes a complete bytes IE with DER ASN1 encoding

func (*UpdateGprsLocationRes) Marshal added in v1.1.2

func (updGprsLocRes *UpdateGprsLocationRes) Marshal() ([]byte, error)

type UpdateLocation added in v1.1.1

type UpdateLocation struct {
	IMSI      string
	MSCNumber string
	VLRNumber string

	VlrCapability *VlrCapability
}

func ParseUpdateLocation added in v1.1.1

func ParseUpdateLocation(dataIE []byte) (*UpdateLocation, []byte, error)

ParseUpdateLocation takes a complete bytes IE with any ASN1 encoding (DER and non-DER)

func ParseUpdateLocationDER added in v1.1.1

func ParseUpdateLocationDER(dataIE []byte) (*UpdateLocation, []byte, error)

ParseUpdateLocationDER takes a complete bytes IE with DER ASN1 encoding

func (*UpdateLocation) Marshal added in v1.1.1

func (updLoc *UpdateLocation) Marshal() ([]byte, error)

type UpdateLocationRes added in v1.1.2

type UpdateLocationRes struct {
	HLRNumber string
}

func ParseUpdateLocationRes added in v1.1.2

func ParseUpdateLocationRes(dataIE []byte) (*UpdateLocationRes, []byte, error)

ParseUpdateLocationRes takes a complete bytes IE with any ASN1 encoding (DER and non-DER)

func ParseUpdateLocationResDER added in v1.1.2

func ParseUpdateLocationResDER(dataIE []byte) (*UpdateLocationRes, []byte, error)

ParseUpdateLocationResDER takes a complete bytes IE with DER ASN1 encoding

func (*UpdateLocationRes) Marshal added in v1.1.2

func (updLocRes *UpdateLocationRes) Marshal() ([]byte, error)

type VlrCapability added in v1.1.1

type VlrCapability struct {
	SupportedCamelPhases       *SupportedCamelPhases
	SupportedLCSCapabilitySets *SupportedLCSCapabilitySets
}

Directories

Path Synopsis
examples
mtFsm command
sriSm command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL