|
Yate
|
SIGTRAN MTP2 User Peer-to-Peer Adaptation Layer. More...
#include <yatesig.h>
Public Types | |
| enum | m2paState { Alignment = 1 , ProvingNormal = 2 , ProvingEmergency = 3 , Ready = 4 , ProcessorOutage = 5 , ProcessorRecovered = 6 , Busy = 7 , BusyEnded = 8 , OutOfService = 9 } |
| enum | msgType { UserData = 1 , LinkStatus = 2 } |
| enum | sctpState { Idle , Associating , Established } |
| enum | M2PAOperations { Pause = SS7Layer2::Pause , Resume = SS7Layer2::Resume , Align = SS7Layer2::Align , Status = SS7Layer2::Status , TransRestart = 0x500 } |
Public Types inherited from SS7Layer2 | |
| enum | LinkStatus { OutOfAlignment = 0 , NormalAlignment = 1 , EmergencyAlignment = 2 , OutOfService = 3 , ProcessorOutage = 4 , Busy = 5 , O = OutOfAlignment , N = NormalAlignment , E = EmergencyAlignment , OS = OutOfService , PO = ProcessorOutage , B = Busy } |
| enum | Operation { Pause = 0x100 , Resume = 0x200 , Align = 0x300 , Status = 0x400 } |
| enum | Inhibitions { Unchecked = 0x01 , Inactive = 0x02 , Local = 0x04 , Remote = 0x08 } |
Public Types inherited from SIGTRAN | |
| enum | MsgClass { MGMT = 0 , TRAN = 1 , SSNM = 2 , ASPSM = 3 , ASPTM = 4 , QPTM = 5 , MAUP = 6 , CLMSG = 7 , COMSG = 8 , RKM = 9 , IIM = 10 , M2PA = 11 } |
| enum | MsgMGMT { MgmtERR = 0 , MgmtNTFY = 1 } |
| enum | MsgSSNM { SsnmDUNA = 1 , SsnmDAVA = 2 , SsnmDAUD = 3 , SsnmSCON = 4 , SsnmDUPU = 5 , SsnmDRST = 6 } |
| enum | MsgASPSM { AspsmUP = 1 , AspsmDOWN = 2 , AspsmBEAT = 3 , AspsmUP_ACK = 4 , AspsmDOWN_ACK = 5 , AspsmBEAT_ACK = 6 } |
| enum | MsgASPTM { AsptmACTIVE = 1 , AsptmINACTIVE = 2 , AsptmACTIVE_ACK = 3 , AsptmINACTIVE_ACK = 4 } |
| enum | MsgRKM { RkmREG_REQ = 1 , RkmREG_RSP = 2 , RkmDEREG_REQ = 3 , RkmDEREG_RSP = 4 } |
| enum | MsgIIM { IimREG_REQ = 1 , IimREG_RSP = 2 , IimDEREG_REQ = 3 , IimDEREG_RSP = 4 } |
Public Member Functions | |
| SS7M2PA (const NamedList ¶ms) | |
| ~SS7M2PA () | |
| virtual bool | initialize (const NamedList *config) |
| virtual bool | control (NamedList ¶ms) |
| virtual bool | control (M2PAOperations oper, NamedList *params=0) |
| virtual bool | control (SS7Layer2::Operation oper, NamedList *params=0) |
| virtual unsigned int | status () const |
| virtual bool | transmitMSU (const SS7MSU &msu) |
| virtual void | notifyLayer (SignallingInterface::Notification status) |
| virtual void | recoverMSU (int sequence) |
| bool | decodeSeq (const DataBlock &data, u_int8_t msgType) |
| void | abortAlignment (const char *info=0) |
| void | transmitLS (int streamId=0) |
| void | setHeader (DataBlock &data) |
| bool | processLinkStatus (DataBlock &data, int streamId) |
| bool | processSLinkStatus (DataBlock &data, int streamId) |
| void | sendAck () |
| bool | removeFrame (u_int32_t bsn) |
| bool | nextBsn (u_int32_t bsn) const |
Public Member Functions inherited from SS7Layer2 | |
| virtual const char * | statusName (unsigned int status, bool brief) const |
| const char * | statusName (bool brief=false) const |
| unsigned int | upTime () const |
| void | attach (SS7L2User *l2user) |
| SS7L2User * | user () const |
| int | sls () const |
| void | sls (int linkSel) |
| int | inhibited () const |
| bool | inhibited (int flags) const |
| virtual unsigned int | congestion () |
| virtual int | getSequence () |
Public Member Functions inherited from SignallingComponent | |
| virtual | ~SignallingComponent () |
| virtual const String & | toString () const |
| virtual NamedList * | controlCreate (const char *oper=0) |
| virtual bool | controlExecute (NamedList *params) |
| virtual void | engine (SignallingEngine *eng) |
| SignallingEngine * | engine () const |
| int | debugLevel (int level) |
| const String & | componentType () const |
Public Member Functions inherited from RefObject | |
| RefObject () | |
| virtual | ~RefObject () |
| virtual void * | getObject (const String &name) const |
| virtual bool | alive () const |
| bool | ref () |
| bool | deref () |
| int | refcount () const |
| virtual void | destruct () |
Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () |
| virtual const String & | traceId () const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
Public Member Functions inherited from DebugEnabler | |
| DebugEnabler (int level=TelEngine::debugLevel(), bool enabled=true) | |
| int | debugLevel () const |
| int | debugLevel (int level) |
| bool | debugEnabled () const |
| void | debugEnabled (bool enable) |
| const char * | debugName () const |
| bool | debugAt (int level) const |
| bool | debugChained () const |
| void | debugChain (const DebugEnabler *chain=0) |
| void | debugCopy (const DebugEnabler *original=0) |
Public Member Functions inherited from SIGTRAN | |
| SIGTRAN (u_int32_t payload=0, u_int16_t port=0) | |
| virtual | ~SIGTRAN () |
| virtual void | attach (SIGTransport *trans) |
| SIGTransport * | transport () const |
| u_int32_t | payload () const |
| u_int16_t | defPort () const |
| bool | connected (int streamId=0) const |
| bool | transmitMSG (unsigned char msgVersion, unsigned char msgClass, unsigned char msgType, const DataBlock &msg, int streamId=0) const |
| bool | transmitMSG (unsigned char msgClass, unsigned char msgType, const DataBlock &msg, int streamId=0) const |
| bool | restart (bool force) |
| bool | getSocketParams (const String ¶ms, NamedList &result) |
| virtual bool | transportNotify (SIGTransport *newTransport, const SocketAddr &addr) |
| bool | hasTransportThread () |
| void | stopTransportThread () |
Static Public Member Functions | |
| static u_int32_t | increment (u_int32_t &nr) |
| static u_int32_t | getNext (u_int32_t nr) |
Static Public Member Functions inherited from SignallingComponent | |
| static bool | resolveConfig (const String &cmpName, NamedList ¶ms, const NamedList *config) |
Static Public Member Functions inherited from RefObject | |
| static bool | alive (const RefObject *obj) |
| static bool | efficientIncDec () |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
Static Public Member Functions inherited from SIGTRAN | |
| static const TokenDict * | classNames () |
| static const char * | typeName (unsigned char msgClass, unsigned char msgType, const char *defValue=0) |
Protected Member Functions | |
| virtual void | timerTick (const Time &when) |
| virtual bool | aligned () const |
| virtual bool | operational () const |
| virtual bool | processMSG (unsigned char msgVersion, unsigned char msgClass, unsigned char msgType, const DataBlock &msg, int streamId) |
| void | startAlignment (bool emergency=false) |
| void | retransData () |
| virtual void | destroyed () |
Protected Member Functions inherited from SS7Layer2 | |
| SS7Layer2 () | |
| bool | receivedMSU (const SS7MSU &msu) |
| bool | recoveredMSU (const SS7MSU &msu) |
| void | notify () |
| bool | inhibit (int setFlags, int clrFlags=0) |
| bool | getEmergency (NamedList *params=0, bool emg=false) const |
Protected Member Functions inherited from SignallingComponent | |
| SignallingComponent (const char *name=0, const NamedList *params=0, const char *type="unknown") | |
| void | insert (SignallingComponent *component) |
| virtual void | detach () |
| void | setName (const char *name) |
| void | setCompType (const char *type) |
| unsigned long | tickSleep (unsigned long usec=1000000) const |
Protected Member Functions inherited from RefObject | |
| virtual void | zeroRefs () |
| bool | resurrect () |
Protected Member Functions inherited from DebugEnabler | |
| void | debugName (const char *name) |
Additional Inherited Members | |
Protected Attributes inherited from SS7Layer2 | |
| bool | m_autoEmergency |
| int | m_lastSeqRx |
| unsigned int | m_congestion |
SIGTRAN MTP2 User Peer-to-Peer Adaptation Layer.
RFC4165 SS7 Layer 2 implementation over SCTP/IP. M2PA is intended to be used as a symmetrical Peer-to-Peer replacement of a hardware based SS7 data link.
| ~SS7M2PA | ( | ) |
Destructor
| void abortAlignment | ( | const char * | info = 0 | ) |
Helper method called when an error was detected Change state to OutOfService and notifys upper layer
| info | Debuging purpose, Information about detected error |
|
protectedvirtual |
Check if the link is aligned. The link may not be operational, the other side may be still proving.
|
virtual |
Execute a control operation. Operations can change the link status or can query the aligned status.
| oper | Operation to execute |
| params | Optional parameters for the operation |
|
virtual |
|
inlinevirtual |
Execute a control operation. Operations can change the link status or can query the aligned status.
| oper | Operation to execute |
| params | Optional parameters for the operation |
Reimplemented from SS7Layer2.
References control().
| bool decodeSeq | ( | const DataBlock & | data, |
| u_int8_t | msgType ) |
Decode sequence numbers from message and process them
| data | The message |
| msgType | The message type |
|
protectedvirtual |
This method is called to clean up and destroy the object after the reference counter becomes zero
Reimplemented from SignallingComponent.
References status().
|
inlinestatic |
Obtain next sequence number
| nr | The current sequence number |
|
inlinestatic |
Increment the given sequence number
| nr | Reference of the number to increment |
|
virtual |
Configure and initialize M2PA and its transport
| config | Optional configuration parameters override |
Reimplemented from SignallingComponent.
| bool nextBsn | ( | u_int32_t | bsn | ) | const |
Check if a sequence number may be a valid next BSN
| bsn | Backward Sequence Number to check |
|
virtual |
|
protectedvirtual |
Check if the link is aligned and operational
Implements SS7Layer2.
| bool processLinkStatus | ( | DataBlock & | data, |
| int | streamId ) |
Decode and process link status message
| data | The message |
| streamId | The stream id witch received the message |
|
protectedvirtual |
Process a complete message
| msgVersion | Version of the protocol |
| msgClass | Class of the message |
| msgType | Type of the message, depends on the class |
| msg | Message data, may be empty |
| streamId | Identifier of the stream the message was received on |
Implements SIGTRAN.
| bool processSLinkStatus | ( | DataBlock & | data, |
| int | streamId ) |
Decode and process link status message in more strict manner
| data | The message |
| streamId | The stream id witch received the message |
|
virtual |
Remove the MSUs waiting in the transmit queue and return them
| sequence | First sequence number to recover, flush earlier packets |
Reimplemented from SS7Layer2.
| bool removeFrame | ( | u_int32_t | bsn | ) |
Remove a frame from acknowledgement list
| bsn | The sequence number of the frame to be removed |
|
protected |
Retransmit unacknowledged data
| void sendAck | ( | ) |
Helper method used to acknowledge the last received message when no data are to transmit
| void setHeader | ( | DataBlock & | data | ) |
Create M2PA header (sequence numbers)
| data | The data where the header will be stored |
|
protected |
Initiates alignment and proving procedure
| emergency | True if emergency alignment is desired |
|
virtual |
Retrieve the current link status indications
Reimplemented from SS7Layer2.
Referenced by destroyed(), and notifyLayer().
|
protectedvirtual |
| void transmitLS | ( | int | streamId = 0 | ) |
Send link status message to inform the peer about ouer curent state
| streamId | The id of the stream who should send the message |
|
virtual |
Push a Message Signal Unit down the protocol stack
| msu | MSU data to transmit |
Implements SS7Layer2.