Documentation
¶
Overview ¶
Package messages provides encoding/decoding feature of GTPv1 protocol.
Index ¶
- Constants
- Variables
- func NewHeaderFlags(v, p, e, s, n int) uint8
- func Serialize(g Message) ([]byte, error)
- type CreatePDPContextRequest
- func (c *CreatePDPContextRequest) DecodeFromBytes(b []byte) error
- func (c *CreatePDPContextRequest) Len() int
- func (c *CreatePDPContextRequest) MessageTypeName() string
- func (c *CreatePDPContextRequest) Serialize() ([]byte, error)
- func (c *CreatePDPContextRequest) SerializeTo(b []byte) error
- func (c *CreatePDPContextRequest) SetLength()
- func (c *CreatePDPContextRequest) TEID() uint32
- type CreatePDPContextResponse
- func (c *CreatePDPContextResponse) DecodeFromBytes(b []byte) error
- func (c *CreatePDPContextResponse) Len() int
- func (c *CreatePDPContextResponse) MessageTypeName() string
- func (c *CreatePDPContextResponse) Serialize() ([]byte, error)
- func (c *CreatePDPContextResponse) SerializeTo(b []byte) error
- func (c *CreatePDPContextResponse) SetLength()
- func (c *CreatePDPContextResponse) TEID() uint32
- type DeletePDPContextRequest
- func (d *DeletePDPContextRequest) DecodeFromBytes(b []byte) error
- func (d *DeletePDPContextRequest) Len() int
- func (d *DeletePDPContextRequest) MessageTypeName() string
- func (d *DeletePDPContextRequest) Serialize() ([]byte, error)
- func (d *DeletePDPContextRequest) SerializeTo(b []byte) error
- func (d *DeletePDPContextRequest) SetLength()
- func (d *DeletePDPContextRequest) TEID() uint32
- type DeletePDPContextResponse
- func (d *DeletePDPContextResponse) DecodeFromBytes(b []byte) error
- func (d *DeletePDPContextResponse) Len() int
- func (d *DeletePDPContextResponse) MessageTypeName() string
- func (d *DeletePDPContextResponse) Serialize() ([]byte, error)
- func (d *DeletePDPContextResponse) SerializeTo(b []byte) error
- func (d *DeletePDPContextResponse) SetLength()
- func (d *DeletePDPContextResponse) TEID() uint32
- type EchoRequest
- func (e *EchoRequest) DecodeFromBytes(b []byte) error
- func (e *EchoRequest) Len() int
- func (e *EchoRequest) MessageTypeName() string
- func (e *EchoRequest) Serialize() ([]byte, error)
- func (e *EchoRequest) SerializeTo(b []byte) error
- func (e *EchoRequest) SetLength()
- func (e *EchoRequest) TEID() uint32
- type EchoResponse
- func (e *EchoResponse) DecodeFromBytes(b []byte) error
- func (e *EchoResponse) Len() int
- func (e *EchoResponse) MessageTypeName() string
- func (e *EchoResponse) Serialize() ([]byte, error)
- func (e *EchoResponse) SerializeTo(b []byte) error
- func (e *EchoResponse) SetLength()
- func (e *EchoResponse) TEID() uint32
- type ErrorIndication
- func (e *ErrorIndication) DecodeFromBytes(b []byte) error
- func (e *ErrorIndication) Len() int
- func (e *ErrorIndication) MessageTypeName() string
- func (e *ErrorIndication) Serialize() ([]byte, error)
- func (e *ErrorIndication) SerializeTo(b []byte) error
- func (e *ErrorIndication) SetLength()
- func (e *ErrorIndication) TEID() uint32
- type Generic
- func (g *Generic) AddIE(ie ...*ies.IE)
- func (g *Generic) DecodeFromBytes(b []byte) error
- func (g *Generic) Len() int
- func (g *Generic) MessageTypeName() string
- func (g *Generic) Serialize() ([]byte, error)
- func (g *Generic) SerializeTo(b []byte) error
- func (g *Generic) SetLength()
- func (g *Generic) TEID() uint32
- type Header
- func (h *Header) DecodeFromBytes(b []byte) error
- func (h *Header) HasSequence() bool
- func (h *Header) Len() int
- func (h *Header) MessageType() uint8
- func (h *Header) Sequence() uint16
- func (h *Header) Serialize() ([]byte, error)
- func (h *Header) SerializeTo(b []byte) error
- func (h *Header) SetLength()
- func (h *Header) SetSequenceNumber(seq uint16)
- func (h *Header) SetTEID(teid uint32)
- func (h *Header) String() string
- func (h *Header) Version() int
- type Message
- type TPDU
- type UpdatePDPContextRequest
- func (u *UpdatePDPContextRequest) DecodeFromBytes(b []byte) error
- func (u *UpdatePDPContextRequest) Len() int
- func (u *UpdatePDPContextRequest) MessageTypeName() string
- func (u *UpdatePDPContextRequest) Serialize() ([]byte, error)
- func (u *UpdatePDPContextRequest) SerializeTo(b []byte) error
- func (u *UpdatePDPContextRequest) SetLength()
- func (u *UpdatePDPContextRequest) TEID() uint32
- type UpdatePDPContextResponse
- func (u *UpdatePDPContextResponse) DecodeFromBytes(b []byte) error
- func (u *UpdatePDPContextResponse) Len() int
- func (u *UpdatePDPContextResponse) MessageTypeName() string
- func (u *UpdatePDPContextResponse) Serialize() ([]byte, error)
- func (u *UpdatePDPContextResponse) SerializeTo(b []byte) error
- func (u *UpdatePDPContextResponse) SetLength()
- func (u *UpdatePDPContextResponse) TEID() uint32
- type VersionNotSupported
- func (v *VersionNotSupported) DecodeFromBytes(b []byte) error
- func (v *VersionNotSupported) Len() int
- func (v *VersionNotSupported) MessageTypeName() string
- func (v *VersionNotSupported) Serialize() ([]byte, error)
- func (v *VersionNotSupported) SerializeTo(b []byte) error
- func (v *VersionNotSupported) SetLength()
- func (v *VersionNotSupported) TEID() uint32
Constants ¶
const ( MsgTypeEchoRequest uint8 MsgTypeEchoResponse MsgTypeVersionNotSupported MsgTypeNodeAliveRequest MsgTypeNodeAliveResponse MsgTypeRedirectionRequest MsgTypeRedirectionResponse MsgTypeCreatePDPContextRequest // 16 MsgTypeCreatePDPContextResponse MsgTypeUpdatePDPContextRequest MsgTypeUpdatePDPContextResponse MsgTypeDeletePDPContextRequest MsgTypeDeletePDPContextResponse MsgTypeCreateAAPDPContextRequest MsgTypeCreateAAPDPContextResponse MsgTypeDeleteAAPDPContextRequest MsgTypeDeleteAAPDPContextResponse MsgTypeErrorIndication MsgTypePDUNotificationRequest MsgTypePDUNotificationResponse MsgTypePDUNotificationRejectRequest MsgTypePDUNotificationRejectResponse MsgTypeSendRoutingInfoRequest MsgTypeSendRoutingInfoResponse MsgTypeFailureReportRequest MsgTypeFailureReportResponse MsgTypeNoteMSPresentRequest MsgTypeNoteMSPresentResponse MsgTypeIdentificationRequest // 48 MsgTypeIdentificationResponse MsgTypeSGSNContextRequest MsgTypeSGSNContextResponse MsgTypeSGSNContextAcknowledge MsgTypeDataRecordTransferRequest uint8 = 240 MsgTypeDataRecordTransferResponse uint8 = 241 MsgTypeTPDU uint8 = 255 )
Message Type definitions.
Variables ¶
var ( ErrInvalidLength = errors.New("got invalid length ") ErrTooShortToSerialize = errors.New("too short to serialize") ErrTooShortToDecode = errors.New("too short to decode as GTPv1") ErrInvalidMessageType = errors.New("got invalid message type") )
Error definitions.
Functions ¶
func NewHeaderFlags ¶
NewHeaderFlags returns a Header Flag built by its components given as arguments.
Types ¶
type CreatePDPContextRequest ¶
type CreatePDPContextRequest struct {
*Header
IMSI *ies.IE
RAI *ies.IE
Recovery *ies.IE
SelectionMode *ies.IE
TEIDDataI *ies.IE
TEIDCPlane *ies.IE
NSAPI *ies.IE
LinkedNSAPI *ies.IE
ChargingCharacteristics *ies.IE
TraceReference *ies.IE
TraceType *ies.IE
EndUserAddress *ies.IE
APN *ies.IE
PCO *ies.IE
SGSNAddressForSignalling *ies.IE
SGSNAddressForUserTraffic *ies.IE
MSISDN *ies.IE
QoSProfile *ies.IE
TFT *ies.IE
TriggerID *ies.IE
OMCIdentity *ies.IE
CommonFlags *ies.IE
APNRestriction *ies.IE
RATType *ies.IE
UserLocationInformation *ies.IE
MSTimeZone *ies.IE
IMEI *ies.IE
CAMELChargingInformationContainer *ies.IE
AdditionalTraceInfo *ies.IE
CorrelationID *ies.IE
EvolvedARPI *ies.IE
ExtendedCommonFlags *ies.IE
UCI *ies.IE
APNAMBR *ies.IE
SignallingPriorityIndication *ies.IE
CNOperatorSelectionEntity *ies.IE
MappedUEUsageType *ies.IE
UPFunctionSelectionIndicationFlags *ies.IE
PrivateExtension *ies.IE
AdditionalIEs []*ies.IE
}
CreatePDPContextRequest is a CreatePDPContextRequest Header and its IEs above.
func DecodeCreatePDPContextRequest ¶
func DecodeCreatePDPContextRequest(b []byte) (*CreatePDPContextRequest, error)
DecodeCreatePDPContextRequest decodes a given byte sequence as a CreatePDPContextRequest.
func NewCreatePDPContextRequest ¶
func NewCreatePDPContextRequest(teid uint32, seq uint16, ie ...*ies.IE) *CreatePDPContextRequest
NewCreatePDPContextRequest creates a new GTPv1 CreatePDPContextRequest.
func (*CreatePDPContextRequest) DecodeFromBytes ¶
func (c *CreatePDPContextRequest) DecodeFromBytes(b []byte) error
DecodeFromBytes decodes a given byte sequence as a CreatePDPContextRequest.
func (*CreatePDPContextRequest) Len ¶
func (c *CreatePDPContextRequest) Len() int
Len returns the actual length of Data.
func (*CreatePDPContextRequest) MessageTypeName ¶
func (c *CreatePDPContextRequest) MessageTypeName() string
MessageTypeName returns the name of protocol.
func (*CreatePDPContextRequest) Serialize ¶
func (c *CreatePDPContextRequest) Serialize() ([]byte, error)
Serialize returns the byte sequence generated from a CreatePDPContextRequest.
func (*CreatePDPContextRequest) SerializeTo ¶
func (c *CreatePDPContextRequest) SerializeTo(b []byte) error
SerializeTo puts the byte sequence in the byte array given as b.
func (*CreatePDPContextRequest) SetLength ¶
func (c *CreatePDPContextRequest) SetLength()
SetLength sets the length in Length field.
func (*CreatePDPContextRequest) TEID ¶
func (c *CreatePDPContextRequest) TEID() uint32
TEID returns the TEID in human-readable string.
type CreatePDPContextResponse ¶
type CreatePDPContextResponse struct {
*Header
Cause *ies.IE
ReorderingRequired *ies.IE
Recovery *ies.IE
TEIDDataI *ies.IE
TEIDCPlane *ies.IE
NSAPI *ies.IE
ChargingID *ies.IE
EndUserAddress *ies.IE
PCO *ies.IE
GGSNAddressForCPlane *ies.IE
GGSNAddressForUserTraffic *ies.IE
AltGGSNAddressForCPlane *ies.IE
AltGGSNAddressForUserTraffic *ies.IE
QoSProfile *ies.IE
ChargingGatewayAddress *ies.IE
AltChargingGatewayAddress *ies.IE
CommonFlags *ies.IE
APNRestriction *ies.IE
MSInfoChangeReportingAction *ies.IE
BearerControlMode *ies.IE
EvolvedARPI *ies.IE
ExtendedCommonFlag *ies.IE
CSGInformationReportingAction *ies.IE
APNAMBR *ies.IE
GGSNBackOffTime *ies.IE
ExtendedCommonFlagsII *ies.IE
PrivateExtension *ies.IE
AdditionalIEs []*ies.IE
}
CreatePDPContextResponse is a CreatePDPContextResponse Header and its IEs above.
func DecodeCreatePDPContextResponse ¶
func DecodeCreatePDPContextResponse(b []byte) (*CreatePDPContextResponse, error)
DecodeCreatePDPContextResponse decodes a given byte sequence as a CreatePDPContextResponse.
func NewCreatePDPContextResponse ¶
func NewCreatePDPContextResponse(teid uint32, seq uint16, ie ...*ies.IE) *CreatePDPContextResponse
NewCreatePDPContextResponse creates a new GTPv1 CreatePDPContextResponse.
func (*CreatePDPContextResponse) DecodeFromBytes ¶
func (c *CreatePDPContextResponse) DecodeFromBytes(b []byte) error
DecodeFromBytes decodes a given byte sequence as a CreatePDPContextResponse.
func (*CreatePDPContextResponse) Len ¶
func (c *CreatePDPContextResponse) Len() int
Len returns the actual length of Data.
func (*CreatePDPContextResponse) MessageTypeName ¶
func (c *CreatePDPContextResponse) MessageTypeName() string
MessageTypeName returns the name of protocol.
func (*CreatePDPContextResponse) Serialize ¶
func (c *CreatePDPContextResponse) Serialize() ([]byte, error)
Serialize returns the byte sequence generated from a CreatePDPContextResponse.
func (*CreatePDPContextResponse) SerializeTo ¶
func (c *CreatePDPContextResponse) SerializeTo(b []byte) error
SerializeTo puts the byte sequence in the byte array given as b.
func (*CreatePDPContextResponse) SetLength ¶
func (c *CreatePDPContextResponse) SetLength()
SetLength sets the length in Length field.
func (*CreatePDPContextResponse) TEID ¶
func (c *CreatePDPContextResponse) TEID() uint32
TEID returns the TEID in human-readable string.
type DeletePDPContextRequest ¶
type DeletePDPContextRequest struct {
*Header
Cause *ies.IE
TeardownInd *ies.IE
NSAPI *ies.IE
PCO *ies.IE
ULI *ies.IE
MSTimeZone *ies.IE
ExtendedCommonFlags *ies.IE
ULITimestamp *ies.IE
PrivateExtension *ies.IE
AdditionalIEs []*ies.IE
}
DeletePDPContextRequest is a DeletePDPContextRequest Header and its IEs above.
func DecodeDeletePDPContextRequest ¶
func DecodeDeletePDPContextRequest(b []byte) (*DeletePDPContextRequest, error)
DecodeDeletePDPContextRequest decodes a given byte sequence as a DeletePDPContextRequest.
func NewDeletePDPContextRequest ¶
func NewDeletePDPContextRequest(teid uint32, seq uint16, ie ...*ies.IE) *DeletePDPContextRequest
NewDeletePDPContextRequest creates a new GTPv1 DeletePDPContextRequest.
func (*DeletePDPContextRequest) DecodeFromBytes ¶
func (d *DeletePDPContextRequest) DecodeFromBytes(b []byte) error
DecodeFromBytes decodes a given byte sequence as a DeletePDPContextRequest.
func (*DeletePDPContextRequest) Len ¶
func (d *DeletePDPContextRequest) Len() int
Len returns the actual length of Data.
func (*DeletePDPContextRequest) MessageTypeName ¶
func (d *DeletePDPContextRequest) MessageTypeName() string
MessageTypeName returns the name of protocol.
func (*DeletePDPContextRequest) Serialize ¶
func (d *DeletePDPContextRequest) Serialize() ([]byte, error)
Serialize returns the byte sequence generated from a DeletePDPContextRequest.
func (*DeletePDPContextRequest) SerializeTo ¶
func (d *DeletePDPContextRequest) SerializeTo(b []byte) error
SerializeTo puts the byte sequence in the byte array given as b.
func (*DeletePDPContextRequest) SetLength ¶
func (d *DeletePDPContextRequest) SetLength()
SetLength sets the length in Length field.
func (*DeletePDPContextRequest) TEID ¶
func (d *DeletePDPContextRequest) TEID() uint32
TEID returns the TEID in human-readable string.
type DeletePDPContextResponse ¶
type DeletePDPContextResponse struct {
*Header
Cause *ies.IE
PCO *ies.IE
ULI *ies.IE
MSTimeZone *ies.IE
ULITimestamp *ies.IE
PrivateExtension *ies.IE
AdditionalIEs []*ies.IE
}
DeletePDPContextResponse is a DeletePDPContextResponse Header and its IEs above.
func DecodeDeletePDPContextResponse ¶
func DecodeDeletePDPContextResponse(b []byte) (*DeletePDPContextResponse, error)
DecodeDeletePDPContextResponse decodes a given byte sequence as a DeletePDPContextResponse.
func NewDeletePDPContextResponse ¶
func NewDeletePDPContextResponse(teid uint32, seq uint16, ie ...*ies.IE) *DeletePDPContextResponse
NewDeletePDPContextResponse creates a new GTPv1 DeletePDPContextResponse.
func (*DeletePDPContextResponse) DecodeFromBytes ¶
func (d *DeletePDPContextResponse) DecodeFromBytes(b []byte) error
DecodeFromBytes decodes a given byte sequence as a DeletePDPContextResponse.
func (*DeletePDPContextResponse) Len ¶
func (d *DeletePDPContextResponse) Len() int
Len returns the actual length of Data.
func (*DeletePDPContextResponse) MessageTypeName ¶
func (d *DeletePDPContextResponse) MessageTypeName() string
MessageTypeName returns the name of protocol.
func (*DeletePDPContextResponse) Serialize ¶
func (d *DeletePDPContextResponse) Serialize() ([]byte, error)
Serialize returns the byte sequence generated from a DeletePDPContextResponse.
func (*DeletePDPContextResponse) SerializeTo ¶
func (d *DeletePDPContextResponse) SerializeTo(b []byte) error
SerializeTo puts the byte sequence in the byte array given as b.
func (*DeletePDPContextResponse) SetLength ¶
func (d *DeletePDPContextResponse) SetLength()
SetLength sets the length in Length field.
func (*DeletePDPContextResponse) TEID ¶
func (d *DeletePDPContextResponse) TEID() uint32
TEID returns the TEID in human-readable string.
type EchoRequest ¶
EchoRequest is a EchoRequest Header and its IEs above.
func DecodeEchoRequest ¶
func DecodeEchoRequest(b []byte) (*EchoRequest, error)
DecodeEchoRequest decodes a given byte sequence as a EchoRequest.
func NewEchoRequest ¶
func NewEchoRequest(seq uint16, ie ...*ies.IE) *EchoRequest
NewEchoRequest creates a new GTP.
func (*EchoRequest) DecodeFromBytes ¶
func (e *EchoRequest) DecodeFromBytes(b []byte) error
DecodeFromBytes decodes a given byte sequence as a EchoRequest.
func (*EchoRequest) MessageTypeName ¶
func (e *EchoRequest) MessageTypeName() string
MessageTypeName returns the name of protocol.
func (*EchoRequest) Serialize ¶
func (e *EchoRequest) Serialize() ([]byte, error)
Serialize returns the byte sequence generated from a EchoRequest.
func (*EchoRequest) SerializeTo ¶
func (e *EchoRequest) SerializeTo(b []byte) error
SerializeTo puts the byte sequence in the byte array given as b.
func (*EchoRequest) SetLength ¶
func (e *EchoRequest) SetLength()
SetLength sets the length in Length field.
func (*EchoRequest) TEID ¶
func (e *EchoRequest) TEID() uint32
TEID returns the TEID in human-readable string.
type EchoResponse ¶
type EchoResponse struct {
*Header
Recovery *ies.IE
PrivateExtension *ies.IE
AdditionalIEs []*ies.IE
}
EchoResponse is a EchoResponse Header and its IEs above.
func DecodeEchoResponse ¶
func DecodeEchoResponse(b []byte) (*EchoResponse, error)
DecodeEchoResponse decodes a given byte sequence as a EchoResponse.
func NewEchoResponse ¶
func NewEchoResponse(seq uint16, ie ...*ies.IE) *EchoResponse
NewEchoResponse creates a new GTPv1 EchoResponse.
func (*EchoResponse) DecodeFromBytes ¶
func (e *EchoResponse) DecodeFromBytes(b []byte) error
DecodeFromBytes decodes a given byte sequence as a EchoResponse.
func (*EchoResponse) MessageTypeName ¶
func (e *EchoResponse) MessageTypeName() string
MessageTypeName returns the name of protocol.
func (*EchoResponse) Serialize ¶
func (e *EchoResponse) Serialize() ([]byte, error)
Serialize returns the byte sequence generated from a EchoResponse.
func (*EchoResponse) SerializeTo ¶
func (e *EchoResponse) SerializeTo(b []byte) error
SerializeTo puts the byte sequence in the byte array given as b.
func (*EchoResponse) SetLength ¶
func (e *EchoResponse) SetLength()
SetLength sets the length in Length field.
func (*EchoResponse) TEID ¶
func (e *EchoResponse) TEID() uint32
TEID returns the TEID in human-readable string.
type ErrorIndication ¶
type ErrorIndication struct {
*Header
TEIDDataI *ies.IE
GTPUPeerAddress *ies.IE
PrivateExtension *ies.IE
AdditionalIEs []*ies.IE
}
ErrorIndication is a ErrorIndication Header and its IEs above.
func DecodeErrorIndication ¶
func DecodeErrorIndication(b []byte) (*ErrorIndication, error)
DecodeErrorIndication decodes a given byte sequence as a ErrorIndication.
func NewErrorIndication ¶
func NewErrorIndication(teid uint32, seq uint16, ie ...*ies.IE) *ErrorIndication
NewErrorIndication creates a new GTPv1 NewErrorIndication.
func (*ErrorIndication) DecodeFromBytes ¶
func (e *ErrorIndication) DecodeFromBytes(b []byte) error
DecodeFromBytes decodes a given byte sequence as a ErrorIndication.
func (*ErrorIndication) Len ¶
func (e *ErrorIndication) Len() int
Len returns the actual length of Data.
func (*ErrorIndication) MessageTypeName ¶
func (e *ErrorIndication) MessageTypeName() string
MessageTypeName returns the name of protocol.
func (*ErrorIndication) Serialize ¶
func (e *ErrorIndication) Serialize() ([]byte, error)
Serialize returns the byte sequence generated from a ErrorIndication.
func (*ErrorIndication) SerializeTo ¶
func (e *ErrorIndication) SerializeTo(b []byte) error
SerializeTo puts the byte sequence in the byte array given as b.
func (*ErrorIndication) SetLength ¶
func (e *ErrorIndication) SetLength()
SetLength sets the length in Length field.
func (*ErrorIndication) TEID ¶
func (e *ErrorIndication) TEID() uint32
TEID returns the TEID in human-readable string.
type Generic ¶
Generic is a Generic Header and its IEs above. This is for handling a non-implemented type of message.
func DecodeGeneric ¶
DecodeGeneric decodes a given byte sequence as a Generic.
func NewGeneric ¶
NewGeneric creates a new GTPv1 Generic.
func (*Generic) DecodeFromBytes ¶
DecodeFromBytes decodes a given byte sequence as a Generic.
func (*Generic) MessageTypeName ¶
MessageTypeName returns the name of protocol.
func (*Generic) SerializeTo ¶
SerializeTo puts the byte sequence in the byte array given as b.
type Header ¶
type Header struct {
Flags uint8
Type uint8
Length uint16
TEID uint32
SequenceNumber uint16
Reserved uint16
Payload []byte
}
Header is a GTPv1 common header.
func DecodeHeader ¶
DecodeHeader decodes given byte sequence as a GTPv1 header.
func (*Header) DecodeFromBytes ¶
DecodeFromBytes sets the values retrieved from byte sequence in GTPv1 header.
func (*Header) HasSequence ¶
HasSequence determines whether a GTP Header has TEID inside by checking the flag.
func (*Header) MessageType ¶
MessageType returns the type of message.
func (*Header) SerializeTo ¶
SerializeTo puts the byte sequence in the byte array given as b.
func (*Header) SetSequenceNumber ¶
SetSequenceNumber sets the SequenceNumber in Header.
type Message ¶
type Message interface {
SerializeTo([]byte) error
DecodeFromBytes(b []byte) error
Len() int
Version() int
MessageType() uint8
MessageTypeName() string
TEID() uint32
SetTEID(uint32)
Sequence() uint16
SetSequenceNumber(uint16)
}
Message is an interface that defines Message messages.
type TPDU ¶
type TPDU struct {
*Header
}
TPDU is a TPDU.
func DecodeTPDU ¶
DecodeTPDU decodes a given byte sequence as a TPDU.
func NewTPDUWithSequence ¶
NewTPDUWithSequence creates a new G-PDU message.
func (*TPDU) Decapsulate ¶
Decapsulate returns payload as raw []byte.
func (*TPDU) DecodeFromBytes ¶
DecodeFromBytes decodes a given byte sequence as a TPDU.
func (*TPDU) MessageTypeName ¶
MessageTypeName returns the name of protocol.
func (*TPDU) SerializeTo ¶
SerializeTo puts the byte sequence in the byte array given as b.
type UpdatePDPContextRequest ¶
type UpdatePDPContextRequest struct {
*Header
IMSI *ies.IE
RAI *ies.IE
Recovery *ies.IE
TEIDDataI *ies.IE
TEIDCPlane *ies.IE
NSAPI *ies.IE
TraceReference *ies.IE
TraceType *ies.IE
PCO *ies.IE
SGSNAddressForCPlane *ies.IE
SGSNAddressForUserTraffic *ies.IE
AlternativeSGSNAddressForCPlane *ies.IE
AlternativeSGSNAddressForUserTraffic *ies.IE
QoSProfile *ies.IE
TFT *ies.IE
TriggerID *ies.IE
OMCIdentity *ies.IE
CommonFlags *ies.IE
RATType *ies.IE
ULI *ies.IE
MSTimeZone *ies.IE
AdditionalTraceInfo *ies.IE
DirectTunnelFlags *ies.IE
EvolvedARPI *ies.IE
ExtendedCommonFlags *ies.IE
UCI *ies.IE
APNAMBR *ies.IE
SignallingPriorityIndication *ies.IE
CNOperatorSelectionEntity *ies.IE
IMEI *ies.IE
PrivateExtension *ies.IE
AdditionalIEs []*ies.IE
}
UpdatePDPContextRequest is a UpdatePDPContextRequest Header and its IEs above.
func DecodeUpdatePDPContextRequest ¶
func DecodeUpdatePDPContextRequest(b []byte) (*UpdatePDPContextRequest, error)
DecodeUpdatePDPContextRequest decodes a given byte sequence as a UpdatePDPContextRequest.
func NewUpdatePDPContextRequest ¶
func NewUpdatePDPContextRequest(teid uint32, seq uint16, ie ...*ies.IE) *UpdatePDPContextRequest
NewUpdatePDPContextRequest creates a new GTPv1 UpdatePDPContextRequest.
func (*UpdatePDPContextRequest) DecodeFromBytes ¶
func (u *UpdatePDPContextRequest) DecodeFromBytes(b []byte) error
DecodeFromBytes decodes a given byte sequence as a UpdatePDPContextRequest.
func (*UpdatePDPContextRequest) Len ¶
func (u *UpdatePDPContextRequest) Len() int
Len returns the actual length of Data.
func (*UpdatePDPContextRequest) MessageTypeName ¶
func (u *UpdatePDPContextRequest) MessageTypeName() string
MessageTypeName returns the name of protocol.
func (*UpdatePDPContextRequest) Serialize ¶
func (u *UpdatePDPContextRequest) Serialize() ([]byte, error)
Serialize returns the byte sequence generated from a UpdatePDPContextRequest.
func (*UpdatePDPContextRequest) SerializeTo ¶
func (u *UpdatePDPContextRequest) SerializeTo(b []byte) error
SerializeTo puts the byte sequence in the byte array given as b.
func (*UpdatePDPContextRequest) SetLength ¶
func (u *UpdatePDPContextRequest) SetLength()
SetLength sets the length in Length field.
func (*UpdatePDPContextRequest) TEID ¶
func (u *UpdatePDPContextRequest) TEID() uint32
TEID returns the TEID in human-readable string.
type UpdatePDPContextResponse ¶
type UpdatePDPContextResponse struct {
*Header
Cause *ies.IE
Recovery *ies.IE
TEIDDataI *ies.IE
TEIDCPlane *ies.IE
ChargingID *ies.IE
PCO *ies.IE
GGSNAddressForCPlane *ies.IE
GGSNAddressForUserTraffic *ies.IE
AltGGSNAddressForCPlane *ies.IE
AltGGSNAddressForUserTraffic *ies.IE
QoSProfile *ies.IE
ChargingGatewayAddress *ies.IE
AltChargingGatewayAddress *ies.IE
CommonFlags *ies.IE
APNRestriction *ies.IE
BearerControlMode *ies.IE
MSInfoChangeReportingAction *ies.IE
EvolvedARPI *ies.IE
CSGInformationReportingAction *ies.IE
APNAMBR *ies.IE
PrivateExtension *ies.IE
AdditionalIEs []*ies.IE
}
UpdatePDPContextResponse is a UpdatePDPContextResponse Header and its IEs above.
func DecodeUpdatePDPContextResponse ¶
func DecodeUpdatePDPContextResponse(b []byte) (*UpdatePDPContextResponse, error)
DecodeUpdatePDPContextResponse decodes a given byte sequence as a UpdatePDPContextResponse.
func NewUpdatePDPContextResponse ¶
func NewUpdatePDPContextResponse(teid uint32, seq uint16, ie ...*ies.IE) *UpdatePDPContextResponse
NewUpdatePDPContextResponse creates a new GTPv1 UpdatePDPContextResponse.
func (*UpdatePDPContextResponse) DecodeFromBytes ¶
func (u *UpdatePDPContextResponse) DecodeFromBytes(b []byte) error
DecodeFromBytes decodes a given byte sequence as a UpdatePDPContextResponse.
func (*UpdatePDPContextResponse) Len ¶
func (u *UpdatePDPContextResponse) Len() int
Len returns the actual length of Data.
func (*UpdatePDPContextResponse) MessageTypeName ¶
func (u *UpdatePDPContextResponse) MessageTypeName() string
MessageTypeName returns the name of protocol.
func (*UpdatePDPContextResponse) Serialize ¶
func (u *UpdatePDPContextResponse) Serialize() ([]byte, error)
Serialize returns the byte sequence generated from a UpdatePDPContextResponse.
func (*UpdatePDPContextResponse) SerializeTo ¶
func (u *UpdatePDPContextResponse) SerializeTo(b []byte) error
SerializeTo puts the byte sequence in the byte array given as b.
func (*UpdatePDPContextResponse) SetLength ¶
func (u *UpdatePDPContextResponse) SetLength()
SetLength sets the length in Length field.
func (*UpdatePDPContextResponse) TEID ¶
func (u *UpdatePDPContextResponse) TEID() uint32
TEID returns the TEID in human-readable string.
type VersionNotSupported ¶
VersionNotSupported is a VersionNotSupported Header and its IEs above.
func DecodeVersionNotSupported ¶
func DecodeVersionNotSupported(b []byte) (*VersionNotSupported, error)
DecodeVersionNotSupported decodes a given byte sequence as a VersionNotSupported.
func NewVersionNotSupported ¶
func NewVersionNotSupported(teid uint32, seq uint16, ie ...*ies.IE) *VersionNotSupported
NewVersionNotSupported creates a new GTPv1 VersionNotSupported.
func (*VersionNotSupported) DecodeFromBytes ¶
func (v *VersionNotSupported) DecodeFromBytes(b []byte) error
DecodeFromBytes decodes a given byte sequence as a VersionNotSupported.
func (*VersionNotSupported) Len ¶
func (v *VersionNotSupported) Len() int
Len returns the actual length of Data.
func (*VersionNotSupported) MessageTypeName ¶
func (v *VersionNotSupported) MessageTypeName() string
MessageTypeName returns the name of protocol.
func (*VersionNotSupported) Serialize ¶
func (v *VersionNotSupported) Serialize() ([]byte, error)
Serialize returns the byte sequence generated from a VersionNotSupported.
func (*VersionNotSupported) SerializeTo ¶
func (v *VersionNotSupported) SerializeTo(b []byte) error
SerializeTo puts the byte sequence in the byte array given as b.
func (*VersionNotSupported) SetLength ¶
func (v *VersionNotSupported) SetLength()
SetLength sets the length in Length field.
func (*VersionNotSupported) TEID ¶
func (v *VersionNotSupported) TEID() uint32
TEID returns the TEID in human-readable string.