|
|
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:
params | The list with the parameters |
~SS7Router ()
| ~SS7Router |
[virtual]
Destructor
bool initialize (const NamedList* config)
| initialize |
[virtual]
Configure and initialize the router, maintenance and management
Parameters:
config | Optional 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:
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 |
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:
sls | Signalling 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:
network | Pointer 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:
network | Pointer 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:
service | Pointer 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:
service | Pointer to service to detach |
Reimplemented from SignallingComponent.
bool uninhibit (SS7Layer3* network, int sls, bool remote)
| uninhibit |
Management request uninhibiting a signaling link
Parameters:
network | SS7 Layer 3 owning the link to uninhibit |
sls | Signalink Link Selection |
remote | True 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:
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 |
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:
link | Signalling Link to check identified by a routing label |
flags | Flag 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:
link | Routing 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:
link | Routing label identifying the link to recover MSUs |
sequence | First 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:
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.
inline bool transfer ()
| transfer |
[const]
Check if the transfer function is enabled
Returns: True if acting as a STP
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:
pcType | Point Code type to search for |
defNI | Default 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:
type | Desired 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:
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 |
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:
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 |
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:
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 |
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:
params | List 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:
when | Time 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:
msu | Message data, starting with Service Indicator Octet |
label | Routing label of the received MSU |
network | Network layer that delivered the MSU |
sls | Signalling 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:
network | The 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:
network | The 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:
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)
| notifyRoutes |
[protected]
Trigger the route changed notification for each route that is not Unknown
Parameters:
states | Mask of required states of the route |
network | Notify 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:
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 |
void notify (SS7Layer3* network, int sls)
| notify |
[protected virtual]
Process a notification generated by the attached network layer
Parameters:
network | Network or linkset that generated the notification |
sls | Signallink 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:
params | The list of parameters to query or change |
Returns: True if the control operation was executed
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 Fri Apr 1 18:17:10 2011, using kdoc 2.0a54. |