class SS7Layer3

Abstract SS7 layer 3 (network) message transfer part. More...

Contains pure virtuals
Full nameTelEngine::SS7Layer3
Definition#include <libs/ysig/yatesig.h>
InheritsTelEngine::SignallingComponent [virtual public ]
Inherited bySS7M3UA, SS7MTP3, SS7Router
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Protected Members


Detailed Description

An interface to a Layer 3 (network) SS7 message transfer part

 ~SS7Layer3 ()

~SS7Layer3

[virtual]

Destructor

bool  initialize (const NamedList* config)

initialize

[virtual]

Initialize the network layer, connect it to the SS7 router

Parameters:
configOptional configuration parameters override

Returns: True if the network was initialized properly

Reimplemented from SignallingComponent.

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

transmitMSU

[pure virtual]

Push a Message Signal Unit down the protocol stack

Parameters:
msuMessage data, starting with Service Indicator Octet
labelRouting label of the MSU to use in routing
slsSignalling Link Selection, negative to choose best

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

bool  operational (int sls = -1)

operational

[const pure virtual]

Check if the network/linkset is fully operational

Parameters:
slsSignalling Link to check, negative to check if any is operational

Returns: True if the linkset is enabled and operational

int  inhibited (int sls)

inhibited

[const virtual]

Retrieve inhibition flags of a specific link

Parameters:
slsSignalling Link to check

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

inline bool  inhibited (int sls, int flags)

inhibited

[const]

Check some of the inhibition flags of a specific link

Parameters:
slsSignalling Link to check
flagsFlags to check for, ORed together

Returns: True if any of the specified inhibition flags is active

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

inhibit

[virtual]

Set and clear inhibition flags on the links

Parameters:
slsSignalling Link to modify
setFlagsFlag bits to set ORed together
clrFlagsFlag bits to clear ORed together (optional)

Returns: True if inhibition flags were set

inline bool  inService (int sls, int ignore = 0)

inService

Check if a link is operational and not inhibited

Parameters:
slsSignalling Link to check
ignoreInhibition flags to ignore, ORed together

Returns: True if the link is operational and not inhibited

unsigned int  congestion (int sls)

congestion

[virtual]

Get the current congestion level of a link

Parameters:
slsSignalling Link to check for congestion, -1 for maximum

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

int  getSequence (int sls)

getSequence

[const virtual]

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

Parameters:
slsSignalling Link to retrieve MSU number from

Returns: Last FSN received, negative if not available

void  recoverMSU (int sls, int sequence)

recoverMSU

[virtual]

Remove the MSUs waiting in the transmit queue and return them

Parameters:
slsSignalling Link to recover MSUs from
sequenceFirst sequence number to recover, flush earlier packets

bool  restart ()

restart

[virtual]

Initiate a MTP restart procedure if supported by the network layer

Returns: True if a restart was initiated

void  attach (SS7L3User* l3user)

attach

Attach a Layer 3 user component to this network. Detach the old user if valid. Attach itself to the given user

Parameters:
l3userPointer to Layer 3 user component to attach

inline SS7L3User*  user ()

user

[const]

Retrieve the Layer 3 user component to which this network is attached

Returns: Pointer to the Layer 3 user this network is attached to

SS7PointCode::Type  type (unsigned char netType)

type

[const]

Retrieve the point code type of this Layer 3 component for a MSU type

Parameters:
netTypeType of the network like coded in the MSU NI field

Returns: The type of codepoint this component will use

void  setType (SS7PointCode::Type type, unsigned char netType)

setType

Set the point code of this Layer 3 component for a network type

Parameters:
typePoint code type to set for the network type
netTypeType of the network like coded in the MSU NI field

void  setType (SS7PointCode::Type type)

setType

Set the point code of this Layer 3 component for all network types

Parameters:
typePoint code type to set

bool  hasType (SS7PointCode::Type pcType)

hasType

[const]

Check if the network can possibly handle a Point Code type

Parameters:
pcTypePoint code type to check

Returns: True if there is one network type that can handle the Point Code

unsigned char  getNI (SS7PointCode::Type pcType, unsigned char defNI)

getNI

[const virtual]

Get the Network Indicator bits that would match a Point Code type

Parameters:
pcTypePoint Code type to search for
defNIDefault Network Indicator bits to use

Returns: Network Indicator bits matching the Point Code type

inline unsigned char  getNI (SS7PointCode::Type pcType)

getNI

[const]

Get the Network Indicator bits that would match a Point Code type

Parameters:
pcTypePoint Code type to search for

Returns: Network Indicator bits matching the Point Code type

inline unsigned char  getNI ()

getNI

[const]

Get the default Network Indicator bits

Returns: Default Network Indicator bits for this layer

void  setNI (unsigned char defNI)

setNI

Set the default Network Indicator bits

Parameters:
defNINetwork Indicator bits to set as defaults

bool  buildRoutes (const NamedList& params)

buildRoutes

Build the list of outgoing routes serviced by this network. Clear the list before re-building it. This method is thread safe

Parameters:
paramsThe parameter list

Returns: False if no route available

unsigned int  getRouteMaxLength (SS7PointCode::Type type, unsigned int packedPC)

getRouteMaxLength

Get the maximum data length of a route by packed Point Code. This method is thread safe

Parameters:
typeDestination point code type
packedPCThe packed point code

Returns: The maximum data length that can be transported on the route. Maximum msu size (272) if no route to the given point code

unsigned int  getRoutePriority (SS7PointCode::Type type, unsigned int packedPC)

getRoutePriority

Get the priority of a route by packed Point Code. This method is thread safe

Parameters:
typeDestination point code type
packedPCThe packed point code

Returns: The priority of the route. -1 if no route to the given point code

inline unsigned int  getRoutePriority (SS7PointCode::Type type, const SS7PointCode& dest)

getRoutePriority

Get the priority of a route by unpacked Point Code. This method is thread safe

Parameters:
typeDestination point code type
destThe destination point code

Returns: The priority of the route. -1 if no route to the given point code

SS7Route::State  getRouteState (SS7PointCode::Type type, unsigned int packedPC, bool checkAdjacent = false)

getRouteState

Get the current state of a route by packed Point Code. This method is thread safe

Parameters:
typeDestination point code type
packedPCThe packed point code
checkAdjacentTrue to take into account the adjacent STP

Returns: The state of the route, SS7Route::Unknown if no route to the given point code

inline SS7Route::State  getRouteState (SS7PointCode::Type type, const SS7PointCode& dest, bool checkAdjacent = false)

getRouteState

Get the current state of a route by unpacked Point Code. This method is thread safe

Parameters:
typeDestination point code type
destThe destination point code
checkAdjacentTrue to take into account the adjacent STP

Returns: The state of the route, SS7Route::Unknown if no route to the given point code

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:
typeDestination point code type
packedPCThe destination point code

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

void  printRoutes ()

printRoutes

Print the destinations or routing table to output

inline unsigned int  getLocal (SS7PointCode::Type type)

getLocal

[const]

Retrieve the local Point Code for a specific Point Code type

Parameters:
typeDesired Point Code type

Returns: Packed local Point Code, zero if not set

unsigned int  getDefaultLocal (SS7PointCode::Type type)

getDefaultLocal

[const virtual]

Retrieve the default local Point Code for a specific Point Code type

Parameters:
typeDesired Point Code type

Returns: Packed local Point Code, zero if not set

 SS7Layer3 (SS7PointCode::Type type = SS7PointCode::Other)

SS7Layer3

[protected]

Constructor

Parameters:
typeDefault point code type

inline HandledMSU  receivedMSU (const SS7MSU& msu, const SS7Label& label, int sls)

receivedMSU

[protected]

Push a received Message Signal Unit up the protocol stack

Parameters:
msuMessage data, starting with Service Indicator Octet
labelRouting label of the received MSU
slsSignalling Link the MSU was received from

Returns: Result of MSU processing by user part

inline bool  recoveredMSU (const SS7MSU& msu, const SS7Label& label, int sls)

recoveredMSU

[protected]

Push a recovered Message Signal Unit back up the protocol stack

Parameters:
msuMessage data, starting with Service Indicator Octet
labelRouting label of the recovered MSU
slsSignalling Link the MSU was recovered from

Returns: True if the MSU was successfully rerouted

inline void  notify (int sls = -1)

notify

[protected]

Notify out user part about a status change

Parameters:
slsLink that generated the notification, -1 if none

void  linkChecked (int sls, bool remote)

linkChecked

[protected virtual]

Callback called from maintenance when valid SLTA or SLTM are received

Parameters:
slsLink that was checked by maintenance
remoteTrue if remote checked the link, false if local success

bool  maintenance (const SS7MSU& msu, const SS7Label& label, int sls)

maintenance

[protected virtual]

Default processing of a MTN (Maintenance MSU)

Parameters:
msuMessage data, starting with Service Indicator Octet
labelRouting label of the received MSU
slsSignalling Link the MSU was received from

Returns: True if the MSU was processed

bool  management (const SS7MSU& msu, const SS7Label& label, int sls)

management

[protected virtual]

Default processing of a SNM (Management MSU)

Parameters:
msuMessage data, starting with Service Indicator Octet
labelRouting label of the received MSU
slsSignalling Link the MSU was received from

Returns: True if the MSU was processed

bool  unavailable (const SS7MSU& msu, const SS7Label& label, int sls, unsigned char cause = 0)

unavailable

[protected virtual]

Default processing of an unknown MSU - emit an User Part Unavailable

Parameters:
msuMessage data, starting with Service Indicator Octet
labelRouting label of the received MSU
slsSignalling Link the MSU was received from
causeUnavailability cause code (Q.704 15.17.5)

Returns: True if the MSU was processed

bool  prohibited (unsigned char ssf, const SS7Label& label, int sls)

prohibited

[protected virtual]

Send a Transfer Prohibited if an unexpected MSU is received in STP mode

Parameters:
ssfSubservice Field of received MSU
labelRouting label of the received MSU
slsSignalling Link the MSU was received from

Returns: True if the TFP was sent

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

SS7Route*  findRoute (SS7PointCode::Type type, unsigned int packed)

findRoute

[protected]

Find a route having the specified point code type and packed point code. This method is thread safe

Parameters:
typeThe point code type used to choose the list of packed point codes
packedThe packed point code to find in the list

Returns: SS7Route pointer or 0 if type is invalid or the given packed point code was not found

inline ObjList*  getRoutes (SS7PointCode::Type type)

getRoutes

[protected]

Retrieve the route table for a specific Point Code type

Parameters:
typePoint Code type of the desired table

Returns: Pointer to the list of SS7Route or NULL if no such route

inline const ObjList*  getRoutes (SS7PointCode::Type type)

getRoutes

[protected const]

Retrieve the route table for a specific Point Code type

Parameters:
typePoint Code type of the desired table

Returns: Pointer to the list of SS7Route or NULL if no such route

Mutex m_routeMutex

m_routeMutex

[protected]

ObjList m_route[YSS7_PCTYPE_COUNT]

m_route[YSS7_PCTYPE_COUNT]

[protected]


Generated by: paulc on bussard on Sun Oct 20 21:06:06 2013, using kdoc 2.0a54.