Yate
|
Main router for SS7 message transfer and applications. More...
#include <yatesig.h>
Public Types | |
enum | Operation { Pause = 0x100, Resume = 0x200, Restart = 0x300, Status = 0x400, Traffic = 0x500, Advertise = 0x600 } |
Public Member Functions | |
SS7Router (const NamedList ¶ms) | |
virtual | ~SS7Router () |
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 bool | restart () |
virtual void | attach (SS7Layer3 *network) |
virtual void | detach (SS7Layer3 *network) |
void | attach (SS7Layer4 *service) |
void | detach (SS7Layer4 *service) |
bool | uninhibit (SS7Layer3 *network, int sls, bool remote) |
bool | inhibit (const SS7Label &link, int setFlags, int clrFlags=0, bool notLast=false) |
bool | inhibited (const SS7Label &link, int flags) |
int | getSequence (const SS7Label &link) |
void | recoverMSU (const SS7Label &link, int sequence) |
virtual void | receivedUPU (SS7PointCode::Type type, const SS7PointCode node, SS7MSU::Services part, unsigned char cause, const SS7Label &label, int sls) |
bool | transfer () const |
bool | transferring () const |
bool | starting () const |
SS7Management * | getManagement () const |
virtual unsigned char | getNI (SS7PointCode::Type pcType, unsigned char defNI) const |
virtual unsigned int | getDefaultLocal (SS7PointCode::Type type) const |
Protected Member Functions | |
void | clearView (const SS7Layer3 *network) |
SS7Route::State | getRouteView (SS7PointCode::Type type, unsigned int packedPC, unsigned int remotePC=0, const SS7Layer3 *network=0) |
bool | setRouteState (SS7PointCode::Type type, unsigned int packedPC, SS7Route::State state, unsigned int remotePC=0, const SS7Layer3 *network=0) |
bool | setRouteState (SS7PointCode::Type type, const SS7PointCode &dest, SS7Route::State state, unsigned int remotePC=0, const SS7Layer3 *network=0) |
void | loadLocalPC (const NamedList ¶ms) |
virtual void | timerTick (const Time &when) |
virtual HandledMSU | receivedMSU (const SS7MSU &msu, const SS7Label &label, SS7Layer3 *network, int sls) |
void | updateRoutes (SS7Layer3 *network) |
void | removeRoutes (SS7Layer3 *network) |
void | notifyRoutes (SS7Route::State states=SS7Route::AnyState, unsigned int onlyPC=0) |
void | notifyRoutes (SS7Route::State states, const SS7Layer3 *network) |
virtual void | routeChanged (const SS7Route *route, SS7PointCode::Type type, unsigned int remotePC=0, const SS7Layer3 *network=0, unsigned int onlyPC=0, bool forced=false) |
virtual void | notify (SS7Layer3 *network, int sls) |
virtual bool | control (NamedList ¶ms) |
virtual void | destroyed () |
Protected Attributes | |
ObjList | m_layer3 |
ObjList | m_layer4 |
int | m_changes |
bool | m_transfer |
bool | m_phase2 |
bool | m_started |
SignallingTimer | m_restart |
SignallingTimer | m_isolate |
Main router for SS7 message transfer and applications.
A message router between Transfer and Application layers. Messages are distributed according to the service type.
enum Operation |
Control primitives
Default constructor
params | The list with the parameters |
virtual ~SS7Router | ( | ) | [virtual] |
Destructor
Attach a SS7 Layer 3 (network) to the router. Attach the router to the given network
network | Pointer to network to attach |
Implements SS7L3User.
Attach a SS7 Layer 4 (service) to the router. Attach itself to the service
service | Pointer to service to attach |
Reset state of all routes of a network to Unknown
Query or modify the management settings or operational parameters
params | The list of parameters to query or change |
Reimplemented from SignallingComponent.
virtual void destroyed | ( | ) | [protected, virtual] |
Detach management
Reimplemented from SignallingComponent.
Detach a SS7 Layer 3 (network) from the router. Detach the router from the given network
network | Pointer to network to detach |
Detach a SS7 Layer 4 (service) from the router. Detach itself from the service
service | Pointer to service to detach |
virtual unsigned int getDefaultLocal | ( | SS7PointCode::Type | type | ) | const [virtual] |
Retrieve the default local Point Code for a specific Point Code type
type | Desired Point Code type |
Reimplemented from SS7Layer3.
SS7Management* getManagement | ( | ) | const [inline] |
Get access to the Management component if available
virtual unsigned char getNI | ( | SS7PointCode::Type | pcType, |
unsigned char | defNI | ||
) | const [virtual] |
Get the Network Indicator bits that would match a Point Code type
pcType | Point Code type to search for |
defNI | Default Network Indicator bits to use |
Reimplemented from SS7Layer3.
SS7Route::State getRouteView | ( | SS7PointCode::Type | type, |
unsigned int | packedPC, | ||
unsigned int | remotePC = 0 , |
||
const SS7Layer3 * | network = 0 |
||
) | [protected] |
Get the state of a route as seen from another network or adjacent point code
type | Point Code type to search for |
packedPC | The packed point code whose state is viewed |
remotePC | The point code of an adjacent viewer, its network is skipped |
network | The network that will be not included in the view |
int getSequence | ( | const SS7Label & | link | ) |
Get the sequence number of the last MSU received on a link
link | Routing label identifying the link to retrieve the sequence from |
Set and clear inhibition flags on a link of an attached network
link | Signalling Link to modify identified by a routing label |
setFlags | Flag bits to set ORed together |
clrFlags | Flag bits to clear ORed together (optional) |
notLast | Do not apply inhibition to the last usable link |
Check inhibition flags on a link of a router attached network
link | Signalling Link to check identified by a routing label |
flags | Flag bits to check ORed together |
virtual bool initialize | ( | const NamedList * | config | ) | [virtual] |
Configure and initialize the router, maintenance and management
config | Optional configuration parameters override |
Reimplemented from SS7Layer3.
void loadLocalPC | ( | const NamedList & | params | ) | [protected] |
Load the default local Point Codes from a list of parameters
params | List of parameters to load "local=" entries from |
Process a notification generated by the attached network layer
network | Network or linkset that generated the notification |
sls | Signallink Link that generated the notification, negative if none |
Reimplemented from SS7L3User.
void notifyRoutes | ( | SS7Route::State | states = SS7Route::AnyState , |
unsigned int | onlyPC = 0 |
||
) | [protected] |
Trigger the route changed notification for each route that is not Unknown
states | Mask of required states of the route |
onlyPC | The only point code that should receive notifications |
void notifyRoutes | ( | SS7Route::State | states, |
const SS7Layer3 * | network | ||
) | [protected] |
Trigger the route changed notification for each route that is not Unknown
states | Mask of required states of the route |
network | Notify to adjacent nodes of this network |
virtual bool operational | ( | int | sls = -1 | ) | const [virtual] |
Check if the router is fully operational
sls | Signalling Link to check, negative to check if any is operational |
Implements SS7Layer3.
virtual HandledMSU receivedMSU | ( | const SS7MSU & | msu, |
const SS7Label & | label, | ||
SS7Layer3 * | network, | ||
int | sls | ||
) | [protected, virtual] |
virtual void receivedUPU | ( | SS7PointCode::Type | type, |
const SS7PointCode | node, | ||
SS7MSU::Services | part, | ||
unsigned char | cause, | ||
const SS7Label & | label, | ||
int | sls | ||
) | [virtual] |
Notification for receiving User Part Unavailable
type | Type of Point Code |
node | Node on which the User Part is unavailable |
part | User Part (service) reported unavailable |
cause | Unavailability cause - Q.704 15.17.5 |
label | Routing label of the UPU message |
sls | Signaling link the UPU was received on |
Reimplemented from SS7L3User.
void recoverMSU | ( | const SS7Label & | link, |
int | sequence | ||
) |
Remove the MSUs waiting in the transmit queue and return them
link | Routing label identifying the link to recover MSUs |
sequence | First sequence number to recover, flush earlier packets |
void removeRoutes | ( | SS7Layer3 * | network | ) | [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
network | The network to remove |
virtual bool restart | ( | ) | [virtual] |
Initiate a MTP restart procedure
Reimplemented from SS7Layer3.
virtual void routeChanged | ( | const SS7Route * | route, |
SS7PointCode::Type | type, | ||
unsigned int | remotePC = 0 , |
||
const SS7Layer3 * | network = 0 , |
||
unsigned int | onlyPC = 0 , |
||
bool | forced = false |
||
) | [protected, virtual] |
Notification callback when a route state changed to other than Unknown. This method is called with the route mutex locked
route | Pointer to the route whose state has changed |
type | Type of the pointcode of the route |
remotePC | The point code that caused the route change |
network | The network that caused the route change |
onlyPC | If set only advertise to this point code |
forced | Notify even if the route view didn't change |
bool setRouteState | ( | SS7PointCode::Type | type, |
unsigned int | packedPC, | ||
SS7Route::State | state, | ||
unsigned int | remotePC = 0 , |
||
const SS7Layer3 * | network = 0 |
||
) | [protected] |
Set the current state of a route by packed Point Code. This method is thread safe
type | Destination point code type |
packedPC | The packed point code |
state | The new state of the route |
remotePC | The point code that caused the route change |
network | The network that caused the route change |
bool setRouteState | ( | SS7PointCode::Type | type, |
const SS7PointCode & | dest, | ||
SS7Route::State | state, | ||
unsigned int | remotePC = 0 , |
||
const SS7Layer3 * | network = 0 |
||
) | [inline, protected] |
Set the current state of a route by unpacked Point Code. This method is thread safe
type | Destination point code type |
dest | The destination point code |
state | The new state of the route |
remotePC | The point code that caused the route change |
network | The network that caused the route change |
References SS7PointCode::pack(), and SS7Router::setRouteState().
Referenced by SS7Router::setRouteState().
bool starting | ( | ) | const [inline] |
Check if the MTP is restarting
Periodical timer tick used to perform state transition and housekeeping
when | Time to use as computing base for events and timeouts |
Reimplemented from SignallingComponent.
bool transfer | ( | ) | const [inline] |
Check if the transfer function and STP management is enabled
bool transferring | ( | ) | const [inline] |
Check if the messages are transferred even if STP management may be disabled
virtual int transmitMSU | ( | const SS7MSU & | msu, |
const SS7Label & | label, | ||
int | sls = -1 |
||
) | [virtual] |
Push a Message Signal Unit down the protocol stack
msu | Message data, starting with Service Indicator Octet |
label | Routing label of the MSU to use in routing |
sls | Signalling Link Selection, negative to choose best |
Implements SS7Layer3.
Management request uninhibiting a signaling link
network | SS7 Layer 3 owning the link to uninhibit |
sls | Signalink Link Selection |
remote | True to uninhibit the remote side of the link |
void updateRoutes | ( | SS7Layer3 * | network | ) | [protected] |
Add a network to the routing table. Clear all its routes before appending it to the table This method is thread safe
network | The network to add to the routing table |
int m_changes [protected] |
Counter used to spot changes in the lists of L3 or L4
SignallingTimer m_isolate [protected] |
MTP isolation timer T1
bool m_phase2 [protected] |
STP phase 2 of restart procedure in effect
SignallingTimer m_restart [protected] |
MTP overall restart timer T20
bool m_started [protected] |
MTP restart procedure has completed
bool m_transfer [protected] |
Locally unhandled MSUs are to be routed to other networks