# class SS7MTP3 | SS7 Layer 3 implementation on top of Layer 2. More...
Full name | `TelEngine::SS7MTP3`
Definition | `#include <libs/ysig/yatesig.h>`
Inherits | TelEngine::Mutex [public ], TelEngine::SS7L2User [public ], TelEngine::SS7Layer3 [public ], TelEngine::SignallingDumpable [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum Operation { Pause = 0x100, Resume = 0x200, Restart = 0x300, Status = 0x400, }

#### Public Methods

- SS7MTP3 (const NamedList& params)
- virtual ~SS7MTP3 ()
- virtual bool initialize (const NamedList* config)
- virtual int transmitMSU (const SS7MSU& msu, const SS7Label& label, int sls = -1)
- virtual bool operational (int sls = -1) const
- virtual int inhibited (int sls) const
- virtual bool inhibit (int sls, int setFlags, int clrFlags = 0)
- virtual unsigned int congestion (int sls)
- virtual int getSequence (int sls) const
- virtual void recoverMSU (int sls, int sequence)
- virtual bool control (Operation oper, NamedList* params = 0)
- virtual void attach (SS7Layer2* link)
- virtual void detach (SS7Layer2* link)
- virtual bool control (NamedList& params)
- virtual bool allowedTo (SS7PointCode::Type type, unsigned int packedPC) const
- inline unsigned int linksTotal () const
- inline unsigned int linksChecked () const
- inline unsigned int linksActive () const
- inline const ObjList* links () const

#### Protected Methods

- virtual void destroyed ()
- virtual void timerTick (const Time& when)
- virtual void linkChecked (int sls, bool remote)
- virtual bool responder () const
- virtual bool receivedMSU (const SS7MSU& msu, SS7Layer2* link, int sls)
- virtual bool recoveredMSU (const SS7MSU& msu, SS7Layer2* link, int sls)
- virtual void notify (SS7Layer2* link)
- unsigned int countLinks ()

## Detailed Description

Q.704 SS7 Layer 3 (Network) implementation on top of SS7 Layer 2

enum Operation { Pause = 0x100, Resume = 0x200, Restart = 0x300, Status = 0x400, } | ### Operation

Control primitives

SS7MTP3 (const NamedList& params) | ### SS7MTP3

Constructor

Parameters:

params | Layer's parameters

~SS7MTP3 () | ### ~SS7MTP3

[virtual]

Destructor

bool initialize (const NamedList* config) | ### initialize

[virtual]

Configure and initialize the MTP3 and all its links

Parameters:

config | Optional configuration parameters override

Returns: True if MTP3 and at least one link were initialized properly

Reimplemented from SS7Layer3.

int transmitMSU (const SS7MSU& msu, const SS7Label& label, int sls = -1) | ### transmitMSU

[virtual]

Push a Message Signal Unit down the protocol stack

Parameters:

msu | Message data, starting with Service Indicator Octet
label | Routing label of the MSU used in routing
sls | Signalling Link Selection, negative to choose best

Returns: Link the message was successfully queued to, negative for error

Reimplemented from SS7Layer3.

bool operational (int sls = -1) | ### operational

[const virtual]

Check if the network/linkset is fully operational

Parameters:

sls | Signalling Link to check, negative to check if any is operational

Returns: True if the linkset is enabled and operational

Reimplemented from SS7Layer3.

int inhibited (int sls) | ### inhibited

[const virtual]

Retrieve inhibition flags of a specific link

Parameters:

sls | Signalling Link to check

Returns: Inhibitions of the specified link, zero if not inhibited

Reimplemented from SS7Layer3.

bool inhibit (int sls, int setFlags, int clrFlags = 0) | ### inhibit

[virtual]

Set and clear inhibition flags on the links

Parameters:

sls | Signalling Link to modify
setFlags | Flag bits to set ORed together
clrFlags | Flag bits to clear ORed together (optional)

Returns: True if inhibition flags were set

Reimplemented from SS7Layer3.

unsigned int congestion (int sls) | ### congestion

[virtual]

Get the current congestion level of a link

Parameters:

sls | Signalling Link to check for congestion, -1 for maximum

Returns: Congestion level, 0 if not congested, 3 if maximum congestion

Reimplemented from SS7Layer3.

int getSequence (int sls) | ### getSequence

[const virtual]

Get the sequence number of the last MSU received on a link

Parameters:

sls | Signalling Link to retrieve MSU number from

Returns: Last FSN received, negative if not available

Reimplemented from SS7Layer3.

void recoverMSU (int sls, int sequence) | ### recoverMSU

[virtual]

Remove the MSUs waiting in the transmit queue and return them

Parameters:

sls | Signalling Link to recover MSUs from
sequence | First sequence number to recover, flush earlier packets

Reimplemented from SS7Layer3.

bool control (Operation oper, NamedList* params = 0) | ### control

[virtual]

Execute a control operation on the linkset

Parameters:

oper | Operation to execute
params | Optional parameters for the operation

Returns: True if the command completed successfully, for query operations also indicates the linkset is enabled and operational

Reimplemented from SignallingComponent.

void attach (SS7Layer2* link) | ### attach

[virtual]

Attach a SS7 Layer 2 (data link) to the network transport. Attach itself to the link

Parameters:

link | Pointer to data link to attach

Reimplemented from SS7Layer3.

void detach (SS7Layer2* link) | ### detach

[virtual]

Detach a SS7 Layer 2 (data link) from the network transport. Remove the link's L2 user

Parameters:

link | Pointer to data link to detach

Reimplemented from SignallingComponent.

bool control (NamedList& params) | ### control

[virtual]

Query or modify layer's settings or operational parameters

Parameters:

params | The list of parameters to query or change

Returns: True if the control operation was executed

Reimplemented from SignallingComponent.

bool allowedTo (SS7PointCode::Type type, unsigned int packedPC) | ### allowedTo

[const virtual]

Check if access to a specific Point Code is allowed from this network

Parameters:

type | Destination point code type
packedPC | The destination point code

Returns: True if access to the specified Point Code is allowed

Reimplemented from SS7Layer3.

inline unsigned int linksTotal () | ### linksTotal

[const]

Get the total number of links attached

Returns: Number of attached data links

inline unsigned int linksChecked () | ### linksChecked

[const]

Get the number of links that are checked by maintenance

Returns: Number of MTN checked data links

inline unsigned int linksActive () | ### linksActive

[const]

Get the number of links that are currently operational

Returns: Number of operational data links

inline const ObjList* links () | ### links

[const]

Get a list of the links held by this linkset

Returns: A list containing the links

void destroyed () | ### destroyed

[protected virtual]

Detach all links and user. Destroys the object, disposes the memory

Reimplemented from SignallingComponent.

void timerTick (const Time& when) | ### timerTick

[protected virtual]

Periodical timer tick used to perform housekeeping and link checking

Parameters:

when | Time to use as computing base for events and timeouts

Reimplemented from SignallingComponent.

void linkChecked (int sls, bool remote) | ### linkChecked

[protected virtual]

Callback called from maintenance when valid SLTA or SLTM are received

Parameters:

sls | Link that was checked by maintenance
remote | True if remote checked the link, false if local success

Reimplemented from SS7Layer3.

bool responder () | ### responder

[protected const virtual]

Check if we should answer with SLTA to received SLTM in maintenance()

Returns: True to send a SLTA for each good received SLTM

Reimplemented from SS7Layer3.

bool receivedMSU (const SS7MSU& msu, SS7Layer2* link, int sls) | ### receivedMSU

[protected virtual]

Process a MSU received from the Layer 2 component

Parameters:

msu | Message data, starting with Service Indicator Octet
link | Data link that delivered the MSU
sls | Signalling Link the MSU was received from

Returns: True if the MSU was processed

Reimplemented from SS7Layer3.

bool recoveredMSU (const SS7MSU& msu, SS7Layer2* link, int sls) | ### recoveredMSU

[protected virtual]

Process a MSU recovered from the Layer 2 component after failure

Parameters:

msu | Message data, starting with Service Indicator Octet
link | Data link from where the MSU was recovered
sls | Signalling Link the MSU was recovered from

Returns: True if the MSU was processed

Reimplemented from SS7Layer3.

void notify (SS7Layer2* link) | ### notify

[protected virtual]

Process a notification generated by the attached data link

Parameters:

link | Data link that generated the notification

Returns: True if notification was processed

Reimplemented from SS7Layer3.

unsigned int countLinks () | ### countLinks

[protected]

Count the total and active number of links

Returns: Number of active links

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.