|
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 |
Public Member Functions inherited from SignallingComponent | |
| virtual | ~SignallingComponent () |
| virtual const String & | toString () const |
| virtual NamedList * | controlCreate (const char *oper=0) |
| virtual bool | controlExecute (NamedList *params) |
| virtual void | engine (SignallingEngine *eng) |
| SignallingEngine * | engine () const |
| int | debugLevel (int level) |
| const String & | componentType () const |
Public Member Functions inherited from RefObject | |
| RefObject () | |
| virtual | ~RefObject () |
| virtual void * | getObject (const String &name) const |
| virtual bool | alive () const |
| bool | ref () |
| bool | deref () |
| int | refcount () const |
| virtual void | destruct () |
Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () |
| virtual const String & | traceId () const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
Public Member Functions inherited from DebugEnabler | |
| DebugEnabler (int level=TelEngine::debugLevel(), bool enabled=true) | |
| int | debugLevel () const |
| int | debugLevel (int level) |
| bool | debugEnabled () const |
| void | debugEnabled (bool enable) |
| const char * | debugName () const |
| bool | debugAt (int level) const |
| bool | debugChained () const |
| void | debugChain (const DebugEnabler *chain=0) |
| void | debugCopy (const DebugEnabler *original=0) |
Public Member Functions inherited from SS7Layer3 | |
| virtual | ~SS7Layer3 () |
| virtual int | inhibited (int sls) const |
| bool | inhibited (int sls, int flags) const |
| virtual bool | inhibit (int sls, int setFlags, int clrFlags=0) |
| bool | inService (int sls, int ignore=0) |
| virtual unsigned int | congestion (int sls) |
| virtual int | getSequence (int sls) const |
| virtual void | recoverMSU (int sls, int sequence) |
| void | attach (SS7L3User *l3user) |
| SS7L3User * | user () const |
| SS7PointCode::Type | type (unsigned char netType) const |
| void | setType (SS7PointCode::Type type, unsigned char netType) |
| void | setType (SS7PointCode::Type type) |
| bool | hasType (SS7PointCode::Type pcType) const |
| unsigned char | getNI (SS7PointCode::Type pcType) const |
| unsigned char | getNI () const |
| void | setNI (unsigned char defNI) |
| bool | buildRoutes (const NamedList ¶ms) |
| unsigned int | getRouteMaxLength (SS7PointCode::Type type, unsigned int packedPC) |
| unsigned int | getRoutePriority (SS7PointCode::Type type, unsigned int packedPC) |
| unsigned int | getRoutePriority (SS7PointCode::Type type, const SS7PointCode &dest) |
| SS7Route::State | getRouteState (SS7PointCode::Type type, unsigned int packedPC, bool checkAdjacent=false) |
| SS7Route::State | getRouteState (SS7PointCode::Type type, const SS7PointCode &dest, bool checkAdjacent=false) |
| virtual bool | allowedTo (SS7PointCode::Type type, unsigned int packedPC) const |
| void | printRoutes () |
| unsigned int | getLocal (SS7PointCode::Type type) const |
Public Member Functions inherited from Mutex | |
| Mutex (bool recursive=false, const char *name=0) | |
| Mutex (const Mutex &original) | |
| ~Mutex () | |
| Mutex & | operator= (const Mutex &original) |
| virtual bool | lock (long maxwait=-1) |
| virtual bool | unlock () |
| virtual bool | locked () const |
| const char * | owner () const |
| bool | recursive () const |
Public Member Functions inherited from Lockable | |
| virtual | ~Lockable () |
| virtual bool | check (long maxwait=-1) |
| virtual bool | unlockAll () |
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 Member Functions inherited from SS7L3User | |
| virtual bool | recoveredMSU (const SS7MSU &msu, const SS7Label &label, SS7Layer3 *network, int sls) |
| virtual void | routeStatusChanged (SS7PointCode::Type type, const SS7PointCode &node, SS7Route::State state) |
Protected Member Functions inherited from SignallingComponent | |
| SignallingComponent (const char *name=0, const NamedList *params=0, const char *type="unknown") | |
| void | insert (SignallingComponent *component) |
| virtual void | detach () |
| void | setName (const char *name) |
| void | setCompType (const char *type) |
| unsigned long | tickSleep (unsigned long usec=1000000) const |
Protected Member Functions inherited from RefObject | |
| virtual void | zeroRefs () |
| bool | resurrect () |
Protected Member Functions inherited from DebugEnabler | |
| void | debugName (const char *name) |
Protected Member Functions inherited from SS7Layer3 | |
| SS7Layer3 (SS7PointCode::Type type=SS7PointCode::Other) | |
| HandledMSU | receivedMSU (const SS7MSU &msu, const SS7Label &label, int sls) |
| bool | recoveredMSU (const SS7MSU &msu, const SS7Label &label, int sls) |
| void | notify (int sls=-1) |
| virtual void | linkChecked (int sls, bool remote) |
| virtual bool | maintenance (const SS7MSU &msu, const SS7Label &label, int sls) |
| virtual bool | management (const SS7MSU &msu, const SS7Label &label, int sls) |
| virtual bool | unavailable (const SS7MSU &msu, const SS7Label &label, int sls, unsigned char cause=0) |
| virtual bool | prohibited (unsigned char ssf, const SS7Label &label, int sls) |
| virtual bool | responder () const |
| SS7Route * | findRoute (SS7PointCode::Type type, unsigned int packed) |
| ObjList * | getRoutes (SS7PointCode::Type type) |
| const ObjList * | getRoutes (SS7PointCode::Type type) const |
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 |
Protected Attributes inherited from SS7Layer3 | |
| Mutex | m_routeMutex |
| ObjList | m_route [YSS7_PCTYPE_COUNT] |
Additional Inherited Members | |
Static Public Member Functions inherited from SignallingComponent | |
| static bool | resolveConfig (const String &cmpName, NamedList ¶ms, const NamedList *config) |
Static Public Member Functions inherited from RefObject | |
| static bool | alive (const RefObject *obj) |
| static bool | efficientIncDec () |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
Static Public Member Functions inherited from Mutex | |
| static int | count () |
| static int | locks () |
| static bool | efficientTimedLock () |
Static Public Member Functions inherited from Lockable | |
| static void | wait (unsigned long maxwait) |
| static unsigned long | wait () |
| static void | startUsingNow () |
| static void | enableSafety (bool safe=true) |
| static bool | safety () |
Static Protected Member Functions inherited from SS7L3User | |
| static ObjList * | getNetRoutes (SS7Layer3 *network, SS7PointCode::Type type) |
| static const ObjList * | getNetRoutes (const SS7Layer3 *network, SS7PointCode::Type type) |
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 |
Destructor
|
virtual |
Attach a SS7 Layer 3 (network) to the router. Attach the router to the given network
| network | Pointer to network to attach |
Implements SS7L3User.
| void attach | ( | SS7Layer4 * | service | ) |
Attach a SS7 Layer 4 (service) to the router. Attach itself to the service
| service | Pointer to service to attach |
|
protected |
Reset state of all routes of a network to Unknown
|
protectedvirtual |
Query or modify the management settings or operational parameters
| params | The list of parameters to query or change |
Reimplemented from SignallingComponent.
|
protectedvirtual |
Detach management
Reimplemented from SignallingComponent.
|
virtual |
Detach a SS7 Layer 3 (network) from the router. Detach the router from the given network
| network | Pointer to network to detach |
| void detach | ( | SS7Layer4 * | service | ) |
Detach a SS7 Layer 4 (service) from the router. Detach itself from the service
| service | Pointer to service to detach |
|
virtual |
Retrieve the default local Point Code for a specific Point Code type
| type | Desired Point Code type |
Reimplemented from SS7Layer3.
References SS7Layer3::type().
|
inline |
Get access to the Management component if available
|
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.
|
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 |
References SS7Layer3::type().
| 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 |
| bool inhibit | ( | const SS7Label & | link, |
| int | setFlags, | ||
| int | clrFlags = 0, | ||
| bool | notLast = false ) |
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 |
| bool inhibited | ( | const SS7Label & | link, |
| int | flags ) |
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 |
Configure and initialize the router, maintenance and management
| config | Optional configuration parameters override |
Reimplemented from SignallingComponent.
|
protected |
Load the default local Point Codes from a list of parameters
| params | List of parameters to load "local=" entries from |
|
protectedvirtual |
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.
|
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 |
|
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 |
|
virtual |
Check if the router is fully operational
| sls | Signalling Link to check, negative to check if any is operational |
Implements SS7Layer3.
|
protectedvirtual |
Process a MSU received from the Layer 3 component
| 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 |
Implements SS7L3User.
|
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.
References SS7Layer3::type().
| 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 |
|
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 |
Initiate a MTP restart procedure
Reimplemented from SS7Layer3.
|
protectedvirtual |
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 |
References SS7Layer3::type().
|
inlineprotected |
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(), setRouteState(), and SS7Layer3::type().
|
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 |
References SS7Layer3::type().
Referenced by setRouteState().
|
inline |
Check if the MTP is restarting
References m_started.
|
protectedvirtual |
Periodical timer tick used to perform state transition and housekeeping
| when | Time to use as computing base for events and timeouts |
Reimplemented from SignallingComponent.
|
inline |
Check if the transfer function and STP management is enabled
References m_transfer.
|
inline |
Check if the messages are transferred even if STP management may be disabled
References m_transfer.
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.
| bool uninhibit | ( | SS7Layer3 * | network, |
| int | sls, | ||
| bool | remote ) |
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 |
|
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 |
|
protected |
Counter used to spot changes in the lists of L3 or L4
|
protected |
MTP isolation timer T1
|
protected |
List of L3 (networks) attached to this router
|
protected |
List of L4 (services) attached to this router
|
protected |
STP phase 2 of restart procedure in effect
|
protected |
MTP overall restart timer T20
|
protected |
MTP restart procedure has completed
Referenced by starting().
|
protected |
Locally unhandled MSUs are to be routed to other networks
Referenced by transfer(), and transferring().