Documentation
¶
Overview ¶
Package gtp provides simple and painless handling of GTP(GPRS Tunneling Protocol), implemented in the Go Programming Language.
This package is the wrapper of all versions of GTP that is available. Please see the godocs of each version instead.
GTPv0: https://godoc.org/github.com/wmnsk/go-gtp/v0
GTPv1: https://godoc.org/github.com/wmnsk/go-gtp/v1
GTPv2: https://godoc.org/github.com/wmnsk/go-gtp/v2
Please also see README.md for detailed usage of the APIs provided by this package, as well as how to run the examples.
https://github.com/wmnsk/go-gtp/blob/master/README.md
https://github.com/wmnsk/go-gtp/tree/master/examples/gw-tester
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidVersion = errors.New("got invalid version") ErrInvalidLength = errors.New("length value is invalid") ErrTooShortToParse = errors.New("too short to decode as GTP") ErrTooShortToMarshal = errors.New("too short to serialize") )
Common error definitions.
Functions ¶
Types ¶
type Message ¶
type Message interface {
MarshalTo([]byte) error
UnmarshalBinary(b []byte) error
MarshalLen() int
Version() int
MessageType() uint8
MessageTypeName() string
// deprecated
SerializeTo([]byte) error
DecodeFromBytes(b []byte) error
}
Message is an interface that defines all versions of GTP messages.
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
mme
command
Command mme is a reference implementation of MME with go-gtp.
|
Command mme is a reference implementation of MME with go-gtp. |
|
pgw
command
Command pgw is a dead simple implementation of P-GW only with GTP-related features.
|
Command pgw is a dead simple implementation of P-GW only with GTP-related features. |
|
sgw
command
Command sgw is a dead simple implementation of S-GW only with GTP-related features.
|
Command sgw is a dead simple implementation of S-GW only with GTP-related features. |
|
gw-tester/enb
module
|
|
|
gw-tester/mme
module
|
|
|
gw-tester/pgw
module
|
|
|
gw-tester/sgw
module
|
|
|
Package utils provides some utilities which might be useful specifically for GTP(or other telco protocols).
|
Package utils provides some utilities which might be useful specifically for GTP(or other telco protocols). |
|
Package v0 provides the simple and painless handling of GTPv1-C and GTPv1-U protocol in pure Golang.
|
Package v0 provides the simple and painless handling of GTPv1-C and GTPv1-U protocol in pure Golang. |
|
ies
Package ies provides encoding/decoding feature of GTPv0 Information Elements.
|
Package ies provides encoding/decoding feature of GTPv0 Information Elements. |
|
messages
Package messages provides encoding/decoding feature of GTPv0 protocol.
|
Package messages provides encoding/decoding feature of GTPv0 protocol. |
|
testutils
Package testutils is an internal package to be used for unit tests.
|
Package testutils is an internal package to be used for unit tests. |
|
Package v1 provides the simple and painless handling of GTPv1-C and GTPv1-U protocol in pure Golang.
|
Package v1 provides the simple and painless handling of GTPv1-C and GTPv1-U protocol in pure Golang. |
|
ies
Package ies provides encoding/decoding feature of GTPv1 Information Elements.
|
Package ies provides encoding/decoding feature of GTPv1 Information Elements. |
|
messages
Package messages provides encoding/decoding feature of GTPv1 protocol.
|
Package messages provides encoding/decoding feature of GTPv1 protocol. |
|
testutils
Package testutils is an internal package to be used for unit tests.
|
Package testutils is an internal package to be used for unit tests. |
|
Package v2 provides the simple and painless handling of GTPv2-C protocol in pure Golang.
|
Package v2 provides the simple and painless handling of GTPv2-C protocol in pure Golang. |
|
ies
Package ies provides encoding/decoding feature of GTPv2 Information Elements.
|
Package ies provides encoding/decoding feature of GTPv2 Information Elements. |
|
messages
Package messages provides encoding/decoding feature of GTPv2 protocol.
|
Package messages provides encoding/decoding feature of GTPv2 protocol. |
|
testutils
Package testutils is an internal package to be used for unit tests.
|
Package testutils is an internal package to be used for unit tests. |