Documentation ¶
Overview ¶
Package sccp provides encoding/decoding feature of Signalling Connection Control Part used in SS7/SIGTRAN protocol stack.
This is still an experimental project, and currently in its very early stage of development. Any part of implementations (including exported APIs) may be changed before released as v1.0.0.
Index ¶
- type Header
- type Message
- type MsgType
- type UDT
- func (u *UDT) CdGT() string
- func (u *UDT) CgGT() string
- func (u *UDT) MarshalBinary() ([]byte, error)
- func (u *UDT) MarshalLen() int
- func (u *UDT) MarshalTo(b []byte) error
- func (u *UDT) MessageType() MsgType
- func (u *UDT) MessageTypeName() string
- func (u *UDT) SetLength()
- func (u *UDT) String() string
- func (u *UDT) UnmarshalBinary(b []byte) error
- type UnsupportedTypeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
Header is a SCCP common header.
func ParseHeader ¶
ParseHeader decodes given byte sequence as a SCCP common header.
func (*Header) MarshalBinary ¶
MarshalBinary returns the byte sequence generated from a Header instance.
func (*Header) UnmarshalBinary ¶
UnmarshalBinary sets the values retrieved from byte sequence in a SCCP common header.
type Message ¶
type Message interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler MarshalTo([]byte) error MarshalLen() int MessageType() MsgType MessageTypeName() string fmt.Stringer }
Message is an interface that defines SCCP messages.
func ParseMessage ¶
ParseMessage decodes the byte sequence into Message by Message Type. Currently this only supports UDT type of message only.
type MsgType ¶
type MsgType uint8
MsgType is type of SCCP message.
const ( MsgTypeCR MsgType MsgTypeCC MsgTypeCREF MsgTypeRLSD MsgTypeRLC MsgTypeDT1 MsgTypeDT2 MsgTypeAK MsgTypeUDT MsgTypeUDTS MsgTypeED MsgTypeEA MsgTypeRSR MsgTypeRSC MsgTypeERR MsgTypeIT MsgTypeXUDT MsgTypeXUDTS MsgTypeLUDT MsgTypeLUDTS )
Message Type definitions.
type UDT ¶
type UDT struct { Type MsgType params.ProtocolClass Ptr1, Ptr2, Ptr3 uint8 CalledPartyAddress *params.PartyAddress CallingPartyAddress *params.PartyAddress DataLength uint8 Data []byte }
UDT represents a SCCP Message Unit Data(UDT).
func (*UDT) MarshalBinary ¶
MarshalBinary returns the byte sequence generated from a UDT instance.
func (*UDT) MarshalTo ¶
MarshalTo puts the byte sequence in the byte array given as b. SCCP is dependent on the Pointers when serializing, which means that it might fail when invalid Pointers are set.
func (*UDT) MessageType ¶
MessageType returns the Message Type in int.
func (*UDT) MessageTypeName ¶
MessageTypeName returns the Message Type in string.
func (*UDT) UnmarshalBinary ¶
UnmarshalBinary sets the values retrieved from byte sequence in a SCCP UDT.
type UnsupportedTypeError ¶
type UnsupportedTypeError byte
UnsupportedTypeError indicates the value in Version field is invalid.
func (UnsupportedTypeError) Error ¶
func (e UnsupportedTypeError) Error() string
Error returns the type of receiver and some additional message.
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
client
Command client sends given payload on top of SCCP UDT message.
|
Command client sends given payload on top of SCCP UDT message. |
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). |