gtpv0

package
v0.8.12 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: MIT Imports: 0 Imported by: 0

README

v0: GTPv0 in Golang

Package v0 provides simple and painless handling of GTPv0 protocol in pure Golang.

Getting Started

This package is still under construction. See the source codes for what you can do with the current implementation.

Creating a PDP Context as a client

NOT IMPLEMENTED YET!

Waiting for a PDP Context to be created as a server

NOT IMPLEMENTED YET!

Opening a U-Plane connection

NOT IMPLEMENTED YET!

Supported Features

The following Messages marked with "Yes" are currently available with their own useful constructors.

Even there are some missing Messages, you can create any kind of Message by using message.NewGeneric().

Messages
ID Name Supported
0 (Spare/Reserved) -
1 Echo Request Yes
2 Echo Response Yes
3 Version Not Supported
4 Node Alive Request
5 Node Alive Response
6 Redirection Request
7 Redirection Response
8-15 (Spare/Reserved) -
16 Create PDP Context Request Yes
17 Create PDP Context Response Yes
18 Update PDP Context Request Yes
19 Update PDP Context Response Yes
20 Delete PDP Context Request Yes
21 Delete PDP Context Response Yes
22 Create AA PDP Context Request
23 Create AA PDP Context Response
24 Delete AA PDP Context Request
25 Delete AA PDP Context Response
26 Error Indication
27 PDU Notification Request
28 PDU Notification Response
29 PDU Notification Reject Request
30 PDU Notification Reject Response
31 (Spare/Reserved) -
32 Send Routeing Information for GPRS Request
33 Send Routeing Information for GPRS Response
34 Failure Report Request
35 Failure Report Response
36 Note MS GPRS Present Request
37 Note MS GPRS Present Response
38-47 (Spare/Reserved) -
48 Identification Request
49 Identification Response
50 SGSN Context Request
51 SGSN Context Response
52 SGSN Context Acknowledge
53-239 (Spare/Reserved) -
240 Data Record Transfer Request
241 Data Record Transfer Response
242-254 (Spare/Reserved) -
255 T-PDU Yes
Information Elements

The following Information Elements marked with "Yes" are currently available with their own useful constructors.

Even there are some missing IEs, you can create any kind of IEs by using ie.New() function or by initializing ie.IE directly.

ID Name Supported
0 (Spare/Reserved) -
1 Cause Yes
2 IMSI Yes
3 Routeing Area Identity (RAI) Yes
4 Temporary Logical Link Identity (TLLI) Yes
5 Packet TMSI (P-TMSI) Yes
6 Quality of Service (QoS) Profile Yes
7 (Spare/Reserved) -
8 Reordering Required Yes
9 Authentication Triplet
10 (Spare/Reserved) -
11 MAP Cause
12 P-TMSI Signature Yes
13 MS Validated
14 Recovery Yes
15 Selection mode Yes
16 Flow Label Data I Yes
17 Flow Label Signalling Yes
18 Flow Label Data II Yes
19 MS Not Reachable Reason Yes
20-126 (Spare/Reserved) -
127 Charging ID Yes
128 End User Address Yes
129 MM Context
130 PDP Context
131 Access Point Name Yes
132 Protocol Configuration Options
133 GSN Address Yes
134 MSISDN Yes
135-250 (Spare/Reserved) -
251 Charging Gateway Address Yes
252-254 (Spare/Reserved) -
255 Private Extension Yes

Documentation

Overview

Package gtpv0 provides simple and painless handling of GTPv0 protocol in pure Golang.

This package is still under construction. The networking feature would be available in the future. Please see README.md for detailed usage of the APIs provided by this package.

https://github.com/wmnsk/go-gtp/blob/main/gtpv0/README.md

Index

Constants

View Source
const (
	CauseRequestIMSI              uint8 = 0
	CauseRequestIMEI              uint8 = 1
	CauseRequestIMSIandIMEI       uint8 = 2
	CauseNoIdentityNeeded         uint8 = 3
	CauseRequestAccepted          uint8 = 128
	CauseNonExistent              uint8 = 192
	CauseInvalidMessageFormat     uint8 = 193
	CauseIMSINotKnown             uint8 = 194
	CauseMSIsGPRSDetached         uint8 = 195
	CauseMSIsNotGPRSResponding    uint8 = 196
	CauseMSRefuses                uint8 = 197
	CauseVersionNotSupported      uint8 = 198
	CauseNoResourcesAvailable     uint8 = 199
	CauseServiceNotSupported      uint8 = 200
	CauseMandatoryIEIncorrect     uint8 = 201
	CauseMandatoryIEMissing       uint8 = 202
	CauseOptionalIEIncorrect      uint8 = 203
	CauseSystemFailure            uint8 = 204
	CauseRoamingRestriction       uint8 = 205
	CausePTMSISignatureMismatch   uint8 = 206
	CauseGPRSConnectionSuspended  uint8 = 207
	CauseAuthenticationFailure    uint8 = 208
	CauseUserAuthenticationFailed uint8 = 209
)

Cause definitions.

View Source
const (
	PDPTypeETSI uint8 = iota | 0xf0
	PDPTypeIETF
)

PDP Type Organization definitions.

View Source
const (
	SelectionModeMSorNetworkProvidedAPNSubscribedVerified uint8 = iota | 0xf0
	SelectionModeMSProvidedAPNSubscriptionNotVerified
	SelectionModeNetworkProvidedAPNSubscriptionNotVerified
)

SelectionMode definitions.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package ie provides encoding/decoding feature of GTPv0 Information Elements.
Package ie provides encoding/decoding feature of GTPv0 Information Elements.
Package message provides encoding/decoding feature of GTPv0 protocol.
Package message provides encoding/decoding feature of GTPv0 protocol.
Package testutils is an internal package to be used for unit tests.
Package testutils is an internal package to be used for unit tests.

Jump to

Keyboard shortcuts

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