Yate
|
Abstract SS7 layer 3 (network) message transfer part. More...
#include <yatesig.h>
Public Member Functions | |
virtual | ~SS7Layer3 () |
virtual bool | initialize (const NamedList *config) |
virtual int | transmitMSU (const SS7MSU &msu, const SS7Label &label, int sls=-1)=0 |
virtual bool | operational (int sls=-1) const =0 |
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) |
virtual bool | restart () |
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 |
virtual unsigned char | getNI (SS7PointCode::Type pcType, unsigned char defNI) 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 |
virtual unsigned int | getDefaultLocal (SS7PointCode::Type type) const |
Protected Member Functions | |
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 | |
Mutex | m_routeMutex |
ObjList | m_route [YSS7_PCTYPE_COUNT] |
Friends | |
class | SS7L3User |
class | SS7Router |
class | SS7Route |
Abstract SS7 layer 3 (network) message transfer part.
An interface to a Layer 3 (network) SS7 message transfer part
virtual ~SS7Layer3 | ( | ) | [inline, virtual] |
Destructor
SS7Layer3 | ( | SS7PointCode::Type | type = SS7PointCode::Other | ) | [protected] |
Constructor
type | Default point code type |
virtual bool allowedTo | ( | SS7PointCode::Type | type, |
unsigned int | packedPC | ||
) | const [inline, virtual] |
Check if access to a specific Point Code is allowed from this network
type | Destination point code type |
packedPC | The destination point code |
Reimplemented in SS7MTP3.
Attach a Layer 3 user component to this network. Detach the old user if valid. Attach itself to the given user
l3user | Pointer to Layer 3 user component to attach |
bool buildRoutes | ( | const NamedList & | params | ) |
Build the list of outgoing routes serviced by this network. Clear the list before re-building it. This method is thread safe
params | The parameter list |
virtual unsigned int congestion | ( | int | sls | ) | [inline, virtual] |
Get the current congestion level of a link
sls | Signalling Link to check for congestion, -1 for maximum |
Reimplemented in SS7MTP3.
SS7Route* findRoute | ( | SS7PointCode::Type | type, |
unsigned int | packed | ||
) | [protected] |
Find a route having the specified point code type and packed point code. This method is thread safe
type | The point code type used to choose the list of packed point codes |
packed | The packed point code to find in the list |
virtual unsigned int getDefaultLocal | ( | SS7PointCode::Type | type | ) | const [inline, virtual] |
Retrieve the default local Point Code for a specific Point Code type
type | Desired Point Code type |
Reimplemented in SS7Router.
unsigned int getLocal | ( | SS7PointCode::Type | type | ) | const [inline] |
Retrieve the local Point Code for a specific Point Code type
type | Desired Point Code type |
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 in SS7Router.
unsigned char getNI | ( | SS7PointCode::Type | pcType | ) | const [inline] |
Get the Network Indicator bits that would match a Point Code type
pcType | Point Code type to search for |
References SS7Layer3::getNI().
Referenced by SS7Layer3::getNI().
unsigned char getNI | ( | ) | const [inline] |
Get the default Network Indicator bits
unsigned int getRouteMaxLength | ( | SS7PointCode::Type | type, |
unsigned int | packedPC | ||
) |
Get the maximum data length of a route by packed Point Code. This method is thread safe
type | Destination point code type |
packedPC | The packed point code |
unsigned int getRoutePriority | ( | SS7PointCode::Type | type, |
unsigned int | packedPC | ||
) |
Get the priority of a route by packed Point Code. This method is thread safe
type | Destination point code type |
packedPC | The packed point code |
unsigned int getRoutePriority | ( | SS7PointCode::Type | type, |
const SS7PointCode & | dest | ||
) | [inline] |
Get the priority of a route by unpacked Point Code. This method is thread safe
type | Destination point code type |
dest | The destination point code |
References SS7Layer3::getRoutePriority(), and SS7PointCode::pack().
Referenced by SS7Layer3::getRoutePriority().
ObjList* getRoutes | ( | SS7PointCode::Type | type | ) | [inline, protected] |
Retrieve the route table for a specific Point Code type
type | Point Code type of the desired table |
const ObjList* getRoutes | ( | SS7PointCode::Type | type | ) | const [inline, protected] |
Retrieve the route table for a specific Point Code type
type | Point Code type of the desired table |
SS7Route::State getRouteState | ( | SS7PointCode::Type | type, |
unsigned int | packedPC, | ||
bool | checkAdjacent = false |
||
) |
Get 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 |
checkAdjacent | True to take into account the adjacent STP |
SS7Route::State getRouteState | ( | SS7PointCode::Type | type, |
const SS7PointCode & | dest, | ||
bool | checkAdjacent = false |
||
) | [inline] |
Get 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 |
checkAdjacent | True to take into account the adjacent STP |
References SS7Layer3::getRouteState(), and SS7PointCode::pack().
Referenced by SS7Layer3::getRouteState().
virtual int getSequence | ( | int | sls | ) | const [inline, virtual] |
Get the sequence number of the last MSU received on a link
sls | Signalling Link to retrieve MSU number from |
Reimplemented in SS7MTP3.
bool hasType | ( | SS7PointCode::Type | pcType | ) | const |
Check if the network can possibly handle a Point Code type
pcType | Point code type to check |
virtual bool inhibit | ( | int | sls, |
int | setFlags, | ||
int | clrFlags = 0 |
||
) | [inline, virtual] |
Set and clear inhibition flags on the links
sls | Signalling Link to modify |
setFlags | Flag bits to set ORed together |
clrFlags | Flag bits to clear ORed together (optional) |
Reimplemented in SS7MTP3.
virtual int inhibited | ( | int | sls | ) | const [inline, virtual] |
Retrieve inhibition flags of a specific link
sls | Signalling Link to check |
Reimplemented in SS7MTP3.
bool inhibited | ( | int | sls, |
int | flags | ||
) | const [inline] |
Check some of the inhibition flags of a specific link
sls | Signalling Link to check |
flags | Flags to check for, ORed together |
References SS7Layer3::inhibited().
Referenced by SS7Layer3::inhibited().
virtual bool initialize | ( | const NamedList * | config | ) | [virtual] |
Initialize the network layer, connect it to the SS7 router
config | Optional configuration parameters override |
Reimplemented from SignallingComponent.
bool inService | ( | int | sls, |
int | ignore = 0 |
||
) | [inline] |
Check if a link is operational and not inhibited
sls | Signalling Link to check |
ignore | Inhibition flags to ignore, ORed together |
virtual void linkChecked | ( | int | sls, |
bool | remote | ||
) | [inline, protected, virtual] |
Callback called from maintenance when valid SLTA or SLTM are received
sls | Link that was checked by maintenance |
remote | True if remote checked the link, false if local success |
Reimplemented in SS7MTP3.
virtual bool maintenance | ( | const SS7MSU & | msu, |
const SS7Label & | label, | ||
int | sls | ||
) | [protected, virtual] |
Default processing of a MTN (Maintenance MSU)
msu | Message data, starting with Service Indicator Octet |
label | Routing label of the received MSU |
sls | Signalling Link the MSU was received from |
virtual bool management | ( | const SS7MSU & | msu, |
const SS7Label & | label, | ||
int | sls | ||
) | [protected, virtual] |
Default processing of a SNM (Management MSU)
msu | Message data, starting with Service Indicator Octet |
label | Routing label of the received MSU |
sls | Signalling Link the MSU was received from |
void notify | ( | int | sls = -1 | ) | [inline, protected] |
Notify out user part about a status change
sls | Link that generated the notification, -1 if none |
virtual bool operational | ( | int | sls = -1 | ) | const [pure virtual] |
void printRoutes | ( | ) |
Print the destinations or routing table to output
virtual bool prohibited | ( | unsigned char | ssf, |
const SS7Label & | label, | ||
int | sls | ||
) | [protected, virtual] |
Send a Transfer Prohibited if an unexpected MSU is received in STP mode
ssf | Subservice Field of received MSU |
label | Routing label of the received MSU |
sls | Signalling Link the MSU was received from |
HandledMSU receivedMSU | ( | const SS7MSU & | msu, |
const SS7Label & | label, | ||
int | sls | ||
) | [inline, protected] |
bool recoveredMSU | ( | const SS7MSU & | msu, |
const SS7Label & | label, | ||
int | sls | ||
) | [inline, protected] |
virtual void recoverMSU | ( | int | sls, |
int | sequence | ||
) | [inline, virtual] |
Remove the MSUs waiting in the transmit queue and return them
sls | Signalling Link to recover MSUs from |
sequence | First sequence number to recover, flush earlier packets |
Reimplemented in SS7MTP3.
virtual bool responder | ( | ) | const [inline, protected, virtual] |
Check if we should answer with SLTA to received SLTM in maintenance()
Reimplemented in SS7MTP3.
virtual bool restart | ( | ) | [inline, virtual] |
Initiate a MTP restart procedure if supported by the network layer
Reimplemented in SS7Router.
void setNI | ( | unsigned char | defNI | ) |
Set the default Network Indicator bits
defNI | Network Indicator bits to set as defaults |
void setType | ( | SS7PointCode::Type | type, |
unsigned char | netType | ||
) |
Set the point code of this Layer 3 component for a network type
type | Point code type to set for the network type |
netType | Type of the network like coded in the MSU NI field |
void setType | ( | SS7PointCode::Type | type | ) |
Set the point code of this Layer 3 component for all network types
type | Point code type to set |
virtual int transmitMSU | ( | const SS7MSU & | msu, |
const SS7Label & | label, | ||
int | sls = -1 |
||
) | [pure virtual] |
SS7PointCode::Type type | ( | unsigned char | netType | ) | const |
Retrieve the point code type of this Layer 3 component for a MSU type
netType | Type of the network like coded in the MSU NI field |
virtual bool unavailable | ( | const SS7MSU & | msu, |
const SS7Label & | label, | ||
int | sls, | ||
unsigned char | cause = 0 |
||
) | [protected, virtual] |
Default processing of an unknown MSU - emit an User Part Unavailable
msu | Message data, starting with Service Indicator Octet |
label | Routing label of the received MSU |
sls | Signalling Link the MSU was received from |
cause | Unavailability cause code (Q.704 15.17.5) |
Retrieve the Layer 3 user component to which this network is attached
Outgoing point codes serviced by a network (for each point code type)
Mutex m_routeMutex [protected] |
Mutex to lock routing list operations