Fixed maximum MSU size, it's 273 including SIO.
git-svn-id: http://yate.null.ro/svn/yate/trunk@6278 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
03a41bb9ee
commit
8d9f34b9db
|
@ -550,11 +550,11 @@
|
|||
; A value of 8 or higher disables load balancing.
|
||||
;
|
||||
; Size represents the maximum MSU size that can be transported on this route.
|
||||
; The default vaue is 272 -> maximum MSU size on TDM.
|
||||
; The default value is 273 -> maximum MSU size on TDM.
|
||||
; If the route can transport more data, a value up to 4000 should be set to
|
||||
; avoid SCCP message fragmentation.
|
||||
;
|
||||
; Example: route=ITU,2-2-2,100,1,272
|
||||
; Example: route=ITU,2-2-2,100,1,273
|
||||
;route=
|
||||
|
||||
; adjacent: string: Build an adjacent route for the SS7 network (A, E and F links)
|
||||
|
@ -565,11 +565,11 @@
|
|||
; The priority is always zero so an adjacent route will always match first.
|
||||
;
|
||||
; Size represents the maximum MSU size that can be transported on this route.
|
||||
; The default vaue is 272 -> maximum MSU size on TDM.
|
||||
; The default value is 273 -> maximum MSU size on TDM.
|
||||
; If the route can transport more data, a value up to 4000 should be set to
|
||||
; avoid SCCP message fragmentation
|
||||
;
|
||||
; Example: adjacent=ANSI,40-50-60,272
|
||||
; Example: adjacent=ANSI,40-50-60,273
|
||||
;adjacent=
|
||||
|
||||
; local: string: Declare a local pointcode for the SS7 network
|
||||
|
|
|
@ -77,7 +77,8 @@ SS7MSU::~SS7MSU()
|
|||
|
||||
bool SS7MSU::valid() const
|
||||
{
|
||||
return (3 < length()) && (length() < 273);
|
||||
// Routing label + data without SIO is between 2 and 272 octets (Q.703 2.3.8)
|
||||
return (3 <= length()) && (length() <= MAX_TDM_MSU_SIZE);
|
||||
}
|
||||
|
||||
#define CASE_STR(x) case x: return #x
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
using namespace TelEngine;
|
||||
|
||||
#define MAX_TDM_DATA_SIZE 272
|
||||
|
||||
static const TokenDict s_dict_control[] = {
|
||||
{ "show", SS7MTP3::Status },
|
||||
{ "pause", SS7MTP3::Pause },
|
||||
|
@ -180,7 +178,7 @@ bool SS7Layer3::buildRoutes(const NamedList& params)
|
|||
continue;
|
||||
unsigned int prio = 0;
|
||||
unsigned int shift = 0;
|
||||
unsigned int maxLength = MAX_TDM_DATA_SIZE;
|
||||
unsigned int maxLength = MAX_TDM_MSU_SIZE;
|
||||
bool local = false;
|
||||
if (ns->name() == YSTRING("local"))
|
||||
local = true;
|
||||
|
@ -211,10 +209,10 @@ bool SS7Layer3::buildRoutes(const NamedList& params)
|
|||
if (!(obj = obj->skipNext()) || local)
|
||||
break;
|
||||
maxLength = obj->get()->toString().toInteger(maxLength);
|
||||
if (maxLength < MAX_TDM_DATA_SIZE) {
|
||||
if (maxLength < MAX_TDM_MSU_SIZE) {
|
||||
Debug(this,DebugNote,"MaxDataLength is too small %d. Setting it to %d",
|
||||
maxLength,MAX_TDM_DATA_SIZE);
|
||||
maxLength = MAX_TDM_DATA_SIZE;
|
||||
maxLength,MAX_TDM_MSU_SIZE);
|
||||
maxLength = MAX_TDM_MSU_SIZE;
|
||||
}
|
||||
} while (false);
|
||||
TelEngine::destruct(route);
|
||||
|
@ -247,12 +245,12 @@ bool SS7Layer3::buildRoutes(const NamedList& params)
|
|||
unsigned int SS7Layer3::getRouteMaxLength(SS7PointCode::Type type, unsigned int packedPC)
|
||||
{
|
||||
if (type == SS7PointCode::Other || (unsigned int)type > YSS7_PCTYPE_COUNT || !packedPC)
|
||||
return MAX_TDM_DATA_SIZE;
|
||||
return MAX_TDM_MSU_SIZE;
|
||||
Lock lock(m_routeMutex);
|
||||
SS7Route* route = findRoute(type,packedPC);
|
||||
if (route)
|
||||
return route->m_maxDataLength;
|
||||
return MAX_TDM_DATA_SIZE;
|
||||
return MAX_TDM_MSU_SIZE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3253,12 +3253,12 @@ void SS7SCCP::getMaxDataLen(const SS7MsgSCCP* msg, const SS7Label& label,
|
|||
}
|
||||
|
||||
unsigned int maxLen = network()->getRouteMaxLength(m_type,label.dpc().pack(m_type));
|
||||
if (maxLen < 272) {
|
||||
if (maxLen < MAX_TDM_MSU_SIZE) {
|
||||
DDebug(this,DebugInfo,"Received MSU size (%d) lower than maximum TDM!",
|
||||
maxLen);
|
||||
maxLen = 272;
|
||||
maxLen = MAX_TDM_MSU_SIZE;
|
||||
}
|
||||
bool ludtSupport = maxLen > 272; // 272 maximum msu size
|
||||
bool ludtSupport = maxLen > MAX_TDM_MSU_SIZE; // Maximum MSU size (SIO + Label + data)
|
||||
maxLen -= (label.length() + 1); // subtract label length and SIO octet
|
||||
// Now max length represents the maximum length of SCCP message
|
||||
// Adjust maxLen to represent maximum data in the message.
|
||||
|
|
|
@ -3905,6 +3905,9 @@ private:
|
|||
*/
|
||||
YSIG_API String& operator<<(String& str, const SS7Label& label);
|
||||
|
||||
// Maximum size of a MTP2 MSU including SIO + Routing Label + data (Q.703 2.3.8)
|
||||
#define MAX_TDM_MSU_SIZE 273
|
||||
|
||||
/**
|
||||
* A raw data block with a little more understanding about MSU format
|
||||
* @short A block of data that holds a Message Signal Unit
|
||||
|
@ -5981,7 +5984,7 @@ public:
|
|||
*/
|
||||
inline SS7Route(unsigned int packed, SS7PointCode::Type type,
|
||||
unsigned int priority = 0, unsigned int shift = 0,
|
||||
unsigned int maxDataLength = 272)
|
||||
unsigned int maxDataLength = MAX_TDM_MSU_SIZE)
|
||||
: Mutex(true,"SS7Route"), m_packed(packed), m_type(type),
|
||||
m_priority(priority), m_shift(shift),m_maxDataLength(maxDataLength),
|
||||
m_state(Unknown),m_buffering(0), m_congCount(0),m_congBytes(0)
|
||||
|
@ -6413,7 +6416,7 @@ public:
|
|||
* This method is thread safe
|
||||
* @param type Destination point code type
|
||||
* @param packedPC The packed point code
|
||||
* @return The maximum data length that can be transported on the route. Maximum msu size (272) if no route to the given point code
|
||||
* @return The maximum data length that can be transported on the route. Maximum msu size (273) if no route to the given point code
|
||||
*/
|
||||
unsigned int getRouteMaxLength(SS7PointCode::Type type, unsigned int packedPC);
|
||||
|
||||
|
|
Loading…
Reference in New Issue