class SS7Router

Main router for SS7 message transfer and applications. More...

Full nameTelEngine::SS7Router
Definition#include <libs/ysig/yatesig.h>
InheritsTelEngine::Mutex [public ], TelEngine::SS7L3User [public ], TelEngine::SS7Layer3 [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Protected Methods

Protected Members


Detailed Description

A message router between Transfer and Application layers. Messages are distributed according to the service type.

enum Operation { Pause = 0x100, Resume = 0x200, Restart = 0x300, Status = 0x400, Traffic = 0x500, Advertise = 0x600, }

Operation

Control primitives

 SS7Router (const NamedList& params)

SS7Router

Default constructor

Parameters:
paramsThe list with the parameters

 ~SS7Router ()

~SS7Router

[virtual]

Destructor

bool  initialize (const NamedList* config)

initialize

[virtual]

Configure and initialize the router, maintenance and management

Parameters:
configOptional configuration parameters override

Returns: True if the router was initialized properly

Reimplemented from SignallingComponent.

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

transmitMSU

[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

Reimplemented from SS7Layer3.

bool  operational (int sls = -1)

operational

[const virtual]

Check if the router is fully operational

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

Returns: True if the router is enabled and operational

Reimplemented from SS7Layer3.

bool  restart ()

restart

[virtual]

Initiate a MTP restart procedure

Returns: True if a restart was initiated

Reimplemented from SS7Layer3.

void  attach (SS7Layer3* network)

attach

[virtual]

Attach a SS7 Layer 3 (network) to the router. Attach the router to the given network

Parameters:
networkPointer to network to attach

Reimplemented from SS7L3User.

void  detach (SS7Layer3* network)

detach

[virtual]

Detach a SS7 Layer 3 (network) from the router. Detach the router from the given network

Parameters:
networkPointer to network to detach

Reimplemented from SignallingComponent.

void  attach (SS7Layer4* service)

attach

Attach a SS7 Layer 4 (service) to the router. Attach itself to the service

Parameters:
servicePointer to service to attach

Reimplemented from SS7L3User.

void  detach (SS7Layer4* service)

detach

Detach a SS7 Layer 4 (service) from the router. Detach itself from the service

Parameters:
servicePointer to service to detach

Reimplemented from SignallingComponent.

bool  uninhibit (SS7Layer3* network, int sls, bool remote)

uninhibit

Management request uninhibiting a signaling link

Parameters:
networkSS7 Layer 3 owning the link to uninhibit
slsSignalink Link Selection
remoteTrue to uninhibit the remote side of the link

Returns: True if an uninhibition request was sent

bool  inhibit (const SS7Label& link, int setFlags, int clrFlags = 0, bool notLast = false)

inhibit

Set and clear inhibition flags on a link of an attached network

Parameters:
linkSignalling Link to modify identified by a routing label
setFlagsFlag bits to set ORed together
clrFlagsFlag bits to clear ORed together (optional)
notLastDo not apply inhibition to the last usable link

Returns: True if inhibition flags were set

Reimplemented from SS7Layer3.

bool  inhibited (const SS7Label& link, int flags)

inhibited

Check inhibition flags on a link of a router attached network

Parameters:
linkSignalling Link to check identified by a routing label
flagsFlag bits to check ORed together

Returns: True if any of the specified inhibition flags are set

Reimplemented from SS7Layer3.

int  getSequence (const SS7Label& link)

getSequence

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

Parameters:
linkRouting label identifying the link to retrieve the sequence from

Returns: Last FSN received, negative if not available

Reimplemented from SS7Layer3.

void  recoverMSU (const SS7Label& link, int sequence)

recoverMSU

Remove the MSUs waiting in the transmit queue and return them

Parameters:
linkRouting label identifying the link to recover MSUs
sequenceFirst sequence number to recover, flush earlier packets

Reimplemented from SS7Layer3.

void  receivedUPU (SS7PointCode::Type type, const SS7PointCode node, SS7MSU::Services part, unsigned char cause, const SS7Label& label, int sls)

receivedUPU

[virtual]

Notification for receiving User Part Unavailable

Parameters:
typeType of Point Code
nodeNode on which the User Part is unavailable
partUser Part (service) reported unavailable
causeUnavailability cause - Q.704 15.17.5
labelRouting label of the UPU message
slsSignaling link the UPU was received on

Reimplemented from SS7L3User.

inline bool  transfer ()

transfer

[const]

Check if the transfer function and STP management is enabled

Returns: True if acting as a full STP

inline bool  transferring ()

transferring

[const]

Check if the messages are transferred even if STP management may be disabled

Returns: True if messages are transferred between networks

inline bool  starting ()

starting

[const]

Check if the MTP is restarting

Returns: True if MTP restart procedure is in progress

inline SS7Management*  getManagement ()

getManagement

[const]

Get access to the Management component if available

Returns: A pointer to the SS7Management or NULL if not created

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

Reimplemented from SS7Layer3.

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

Reimplemented from SS7Layer3.

void  clearView (const SS7Layer3* network)

clearView

[protected]

Reset state of all routes of a network to Unknown

SS7Route::State  getRouteView (SS7PointCode::Type type, unsigned int packedPC, unsigned int remotePC = 0, const SS7Layer3* network = 0)

getRouteView

[protected]

Get the state of a route as seen from another network or adjacent point code

Parameters:
typePoint Code type to search for
packedPCThe packed point code whose state is viewed
remotePCThe point code of an adjacent viewer, its network is skipped
networkThe network that will be not included in the view

Returns: State of the route as viewed from the specified point code or network

bool  setRouteState (SS7PointCode::Type type, unsigned int packedPC, SS7Route::State state, unsigned int remotePC = 0, const SS7Layer3* network = 0)

setRouteState

[protected]

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

Parameters:
typeDestination point code type
packedPCThe packed point code
stateThe new state of the route
remotePCThe point code that caused the route change
networkThe network that caused the route change

Returns: True if the route was found and its state changed

inline bool  setRouteState (SS7PointCode::Type type, const SS7PointCode& dest, SS7Route::State state, unsigned int remotePC = 0, const SS7Layer3* network = 0)

setRouteState

[protected]

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

Parameters:
typeDestination point code type
destThe destination point code
stateThe new state of the route
remotePCThe point code that caused the route change
networkThe network that caused the route change

Returns: True if the route was found and its state changed

void  loadLocalPC (const NamedList& params)

loadLocalPC

[protected]

Load the default local Point Codes from a list of parameters

Parameters:
paramsList of parameters to load "local=" entries from

void  timerTick (const Time& when)

timerTick

[protected virtual]

Periodical timer tick used to perform state transition and housekeeping

Parameters:
whenTime to use as computing base for events and timeouts

Reimplemented from SignallingComponent.

HandledMSU  receivedMSU (const SS7MSU& msu, const SS7Label& label, SS7Layer3* network, int sls)

receivedMSU

[protected virtual]

Process a MSU received from the Layer 3 component

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

Returns: Result of MSU processing

Reimplemented from SS7L3User.

void  updateRoutes (SS7Layer3* network)

updateRoutes

[protected]

Add a network to the routing table. Clear all its routes before appending it to the table This method is thread safe

Parameters:
networkThe network to add to the routing table

void  removeRoutes (SS7Layer3* network)

removeRoutes

[protected]

Remove the given network from all destinations in the routing table. Remove the entry in the routing table if empty (no more routes to the point code). This method is thread safe

Parameters:
networkThe network to remove

void  notifyRoutes (SS7Route::State states = SS7Route::AnyState, unsigned int onlyPC = 0)

notifyRoutes

[protected]

Trigger the route changed notification for each route that is not Unknown

Parameters:
statesMask of required states of the route
onlyPCThe only point code that should receive notifications

void  notifyRoutes (SS7Route::State states, const SS7Layer3* network)

notifyRoutes

[protected]

Trigger the route changed notification for each route that is not Unknown

Parameters:
statesMask of required states of the route
networkNotify to adjacent nodes of this network

void  routeChanged (const SS7Route* route, SS7PointCode::Type type, unsigned int remotePC = 0, const SS7Layer3* network = 0, unsigned int onlyPC = 0, bool forced = false)

routeChanged

[protected virtual]

Notification callback when a route state changed to other than Unknown. This method is called with the route mutex locked

Parameters:
routePointer to the route whose state has changed
typeType of the pointcode of the route
remotePCThe point code that caused the route change
networkThe network that caused the route change
onlyPCIf set only advertise to this point code
forcedNotify even if the route view didn't change

void  notify (SS7Layer3* network, int sls)

notify

[protected virtual]

Process a notification generated by the attached network layer

Parameters:
networkNetwork or linkset that generated the notification
slsSignallink Link that generated the notification, negative if none

Returns: True if notification was processed

Reimplemented from SS7L3User.

bool  control (NamedList& params)

control

[protected virtual]

Query or modify the management settings or operational parameters

Parameters:
paramsThe list of parameters to query or change

Returns: True if the control operation was executed

Reimplemented from SignallingComponent.

void  destroyed ()

destroyed

[protected virtual]

Detach management

Reimplemented from SignallingComponent.

ObjList m_layer3

m_layer3

[protected]

ObjList m_layer4

m_layer4

[protected]

int m_changes

m_changes

[protected]

bool m_transfer

m_transfer

[protected]

bool m_phase2

m_phase2

[protected]

bool m_started

m_started

[protected]

SignallingTimer m_restart

m_restart

[protected]

SignallingTimer m_isolate

m_isolate

[protected]


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