All Projects → wmnsk → Go Gtp

wmnsk / Go Gtp

Licence: mit
GTP(GPRS Tunneling Protocol) implemented in pure Golang.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Go Gtp

Ionic Framework
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
Stars: ✭ 45,802 (+39384.48%)
Mutual labels:  mobile
Embla Carousel
A lightweight carousel library with fluid motion and great swipe precision.
Stars: ✭ 1,874 (+1515.52%)
Mutual labels:  mobile
Redcon
Redis compatible server framework for Go
Stars: ✭ 1,683 (+1350.86%)
Mutual labels:  protocol
Dex Protocols
A list of protocols for decentralized exchange
Stars: ✭ 109 (-6.03%)
Mutual labels:  protocol
Create Apollo App
Create Apollo App is a command-line tool designed to generate fully-configured starter Apollo GraphQL projects with essential dependencies for developing web, server and mobile applications and zero build configuration.
Stars: ✭ 110 (-5.17%)
Mutual labels:  mobile
Randomkit
Random data generation in Swift
Stars: ✭ 1,458 (+1156.9%)
Mutual labels:  protocol
Corona
Solar2D Game Engine main repository (ex Corona SDK)
Stars: ✭ 1,679 (+1347.41%)
Mutual labels:  mobile
Swiftlysalesforce
The swiftest way to build iOS apps that connect to Salesforce
Stars: ✭ 115 (-0.86%)
Mutual labels:  mobile
Nativescript Ui Feedback
This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Stars: ✭ 110 (-5.17%)
Mutual labels:  mobile
Catapult Server
Catapult server
Stars: ✭ 111 (-4.31%)
Mutual labels:  protocol
Sdp
RFC 4566 SDP implementation in go
Stars: ✭ 109 (-6.03%)
Mutual labels:  protocol
Appstoreconnect Cli
An easy to use command-line tool for interacting with the Apple AppStore Connect API
Stars: ✭ 110 (-5.17%)
Mutual labels:  mobile
Flutter Status Alert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow.
Stars: ✭ 111 (-4.31%)
Mutual labels:  mobile
Gocmpp
An implementation of China Mobile Peer to Peer protocol in golang for both client and server sides.
Stars: ✭ 108 (-6.9%)
Mutual labels:  protocol
Powerup Android
PowerUp is an educational choose-your-own-adventure game that utilizes a users uploaded curriculum to empower pre-adolescents to take charge of their reproductive health. This is the Android version of the game.
Stars: ✭ 114 (-1.72%)
Mutual labels:  mobile
Ot Node
OriginTrail network node
Stars: ✭ 107 (-7.76%)
Mutual labels:  protocol
Presently
Android app for recording gratitude journal entries
Stars: ✭ 109 (-6.03%)
Mutual labels:  mobile
Bodyweight Fitness Ios
Bodyweight Fitness (iOS)
Stars: ✭ 115 (-0.86%)
Mutual labels:  mobile
Vux 2.0
根据vux修改升级的vux2,基于vue,weui的ui组件库
Stars: ✭ 115 (-0.86%)
Mutual labels:  mobile
Dayvsnight
DayVsNight - A Xamarin.Forms UI Challenge
Stars: ✭ 112 (-3.45%)
Mutual labels:  mobile

go-gtp: GTP in Golang

Package gtp provides simple and painless handling of GTP(GPRS Tunneling Protocol), implemented in the Go Programming Language.

CircleCI golangci-lint Go Reference GitHub

Features

  • Flexible enough to control everything in GTP protocol.;
    • For developing mobile core network nodes (see examples).
    • For developing testing tools like traffic simulators or fuzzers.
  • Many helpers kind to developers provided, like session, bearer, and TEID associations.
  • Easy handling of multiple connections with fixed IP and Port with UDP (or other net.PacketConn).
  • No platform-specific codes inside, so it works almost everywhere Golang works. Currently it works only on Linux and macOS since netlink support is introduced. I'll make them separated from the base to let it work even on Windows in the future.

Getting Started

Prerequisites

go-gtp supports Go Modules. Just run go mod tidy in your project's directory to collect the required packages automatically.

go mod tidy

This project follows the Release Policy of Go.

Running examples

Examples works as it is by go build and executing commands in the following way.

Note for MacOs users: before running any go service, make sure to execute ./mac_local_host_enabler.sh you will find at examples/utils

  1. Open four terminals on a machine and start capturing on loopback interface.

  2. Start P-GW on terminal #1 and #2

// on terminal #1
./pgw

// on terminal #2
./pgw -s5c 127.0.0.53 -s5u 127.0.0.5
  1. Start S-GW on terminal #3
// on terminal #3
./sgw
  1. Start MME on terminal #4
// on terminal #4
./mme
  1. You will see the nodes exchanging Create Session and Modify Bearer on C-Plane, and ICMP Echo on U-Plane afterwards.

If you want to see fewer number of subscribers, please comment-out the v2.Subscriber definitions in example/mme/main.go.

Developing by your own

Each version has net.PacketConn-like APIs and GTP-specific ones which is often version-specific. The basic idea behind the current implementation is;

  • Dial or ListenAndServe to create a connection(Conn) between nodes.
  • Register handlers to the Conn for specific messages with AddHandler, which allows users to handle the messages coming from the remote endpoint as flexible as possible, with less pain.
  • CreateXXX to create session or PDP context with arbitrary IEs given. Session/PDP context is structured and they also have some helpers like AddTEID to handle known TEID properly.

For the detailed usage of specific version, see README.md under each version's directory.

Version Details
GTPv0 README.md
GTPv1 README.md
GTPv2 README.md

And don't forget testing once you are done with your changes

go test ./...

Note for MacOs users: the first time you run any test, make sure to execute ./mac_local_host_enabler.sh you will find at examples/utils. You will have to run the script again after each reboot

Supported Features

Note that "supported" means that the package provides helpers which makes it easier to handle. In other words, even if a message/IE is not marked as "Yes", you can make it work with some additional effort.

Your contribution is welcome to implement helpers for all the types, of course!

Version Messages IEs Networking (state machine) Details
GTPv0 35.7% 81.8% not implemented yet Supported Features
GTPv1 26.6% 30.1% v1-U is functional,
v1-C is not implemented yet
Supported Features
GTPv2 41.0% 43.2% almost functional Supported Features
GTP'
(Prime)
N/A N/A N/A not planned

Disclaimer

This is still an experimental project. Any part of implementations(including exported APIs) may be changed before released as v1.0.0.

Author(s)

Yoshiyuki Kurauchi (Twitter / LinkedIn)

I'm always open to welcome co-authors! Please feel free to talk to me.

LICENSE

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].