Yate
|
A SS7 MSU route. More...
#include <yatesig.h>
Public Types | |
enum | State { Unknown = 0x80, Prohibited = 0x01, Restricted = 0x02, Congestion = 0x04, Allowed = 0x08, NotAllowed = 0x77, NotCongested = 0x78, NotRestricted = 0x7c, NotProhibited = 0x7e, KnownState = 0x7f, AnyState = 0xff } |
Public Member Functions | |
SS7Route (unsigned int packed, SS7PointCode::Type type, unsigned int priority=0, unsigned int shift=0, unsigned int maxDataLength=272) | |
SS7Route (const SS7Route &original) | |
virtual | ~SS7Route () |
State | state () const |
const char * | stateName () const |
unsigned int | priority () const |
unsigned int | getMaxDataLength () const |
unsigned int | packed () const |
unsigned int | shift () const |
void | attach (SS7Layer3 *network, SS7PointCode::Type type) |
bool | detach (SS7Layer3 *network) |
bool | hasNetwork (const SS7Layer3 *network) |
bool | hasNetwork (const SS7Layer3 *network) const |
bool | operational (int sls=-1) |
int | transmitMSU (const SS7Router *router, const SS7MSU &msu, const SS7Label &label, int sls, State states, const SS7Layer3 *source=0) |
bool | congested () |
void | reroute () |
Static Public Member Functions | |
static const TokenDict * | stateNames () |
static const char * | stateName (State state) |
Friends | |
class | SS7Layer3 |
class | SS7Router |
A SS7 MSU route.
Keeps a packed destination point code, a network priority or a list of networks used to route to the enclosed destination point code
enum State |
Route state
SS7Route | ( | unsigned int | packed, |
SS7PointCode::Type | type, | ||
unsigned int | priority = 0 , |
||
unsigned int | shift = 0 , |
||
unsigned int | maxDataLength = 272 |
||
) | [inline] |
Constructor
packed | The packed value of the destination point code |
type | The destination point code type |
priority | Optional value of the network priority |
shift | SLS right shift to apply for balancing between linksets |
maxDataLength | The maximum data that can be transported on this route |
Copy constructor
original | The original route |
virtual ~SS7Route | ( | ) | [inline, virtual] |
Destructor
void attach | ( | SS7Layer3 * | network, |
SS7PointCode::Type | type | ||
) |
Attach a network to use for this destination or change its priority. This method is thread safe
network | The network to attach or change priority |
type | The point code type used to get the priority from the given network or the networks already in the list |
bool congested | ( | ) |
Check the current congestion status according to Q.704 11.2.3.1
Remove a network from the list without deleting it. This method is thread safe
network | The network to remove |
unsigned int getMaxDataLength | ( | ) | const [inline] |
Get the maximum data length that can be transported on this route
bool hasNetwork | ( | const SS7Layer3 * | network | ) |
Check if this route goes to a specific network
network | Pointer to the network to search |
bool hasNetwork | ( | const SS7Layer3 * | network | ) | const |
Check if this route goes to a specific network
network | Pointer to the network to search |
bool operational | ( | int | sls = -1 | ) |
Check if the at least one network/linkset is fully operational
sls | Signalling Link to check, negative to check if any is operational |
unsigned int packed | ( | ) | const [inline] |
Get the packed Point Code of this route
unsigned int priority | ( | ) | const [inline] |
Get the priority of this route
void reroute | ( | ) |
Initiate controlled rerouting procedure, buffer user part messages for T6
unsigned int shift | ( | ) | const [inline] |
Get the SLS right shift for this route
const char* stateName | ( | ) | const [inline] |
Retrieve the name of the current state
References TelEngine::lookup().
Retrieve the name of an arbitrary state
state | Route state whose name to return |
References TelEngine::lookup().
static const TokenDict* stateNames | ( | ) | [static] |
Retrieve the state names token table
int transmitMSU | ( | const SS7Router * | router, |
const SS7MSU & | msu, | ||
const SS7Label & | label, | ||
int | sls, | ||
State | states, | ||
const SS7Layer3 * | source = 0 |
||
) |
Try to transmit a MSU through one of the attached networks. This method is thread safe
router | The router requesting the operation (used for debug) |
msu | Message data, starting with Service Indicator Octet |
label | Routing label of the MSU |
sls | Signalling Link Selection, negative to choose best |
source | Avoided network where the packet was received from |
states | The states a network can have to be a transmission candidate |