aboutsummaryrefslogtreecommitdiffstats
path: root/sualibrary/sua/sua_cl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sualibrary/sua/sua_cl.cpp')
-rw-r--r--sualibrary/sua/sua_cl.cpp60
1 files changed, 45 insertions, 15 deletions
diff --git a/sualibrary/sua/sua_cl.cpp b/sualibrary/sua/sua_cl.cpp
index ab873fe..6c21b39 100644
--- a/sualibrary/sua/sua_cl.cpp
+++ b/sualibrary/sua/sua_cl.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
- * $Id: sua_cl.cpp,v 1.8 2002/10/29 16:00:54 p82609 Exp $
+ * $Id: sua_cl.cpp,v 1.4 2003/02/17 14:38:08 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*
@@ -97,15 +97,15 @@ extern vector<sua_save_str> rec_msg_pool;
/* sua_send_Message */
/***********************************************************************/
int sua_send_Message( signed int sctp_assoc_id,
- short int sctp_stream_id,
- int sctp_delivery_type,
- unsigned int sctp_loadshare,
- char *databuf,
- unsigned int datalen
- )
+ short int sctp_stream_id,
+ int sctp_delivery_type,
+ unsigned int sctp_loadshare,
+ char *databuf,
+ unsigned int datalen
+ )
{
signed int result;
- /* send data to SCTP */
+ /* send data to SCTP */
/* yes it does, continue, no problem, send the msg */
#ifdef DEBUG
/* display byte array */
@@ -245,7 +245,7 @@ int sua_send_UDTService ( Sua_container &org_msg,
/***********************************************************************/
/* sua_route_Message */
/***********************************************************************/
-int sua_route_Message( unsigned int sctp_assoc_id,
+int sua_route_Message( unsigned int &sctp_assoc_id,
unsigned int local_sua_id,
Sua_container &msg,
sccp_addr_str &called_pty_address,
@@ -691,9 +691,10 @@ short process_unitdata_msg ( int local_sua_id,
Sua_container &msg
)
{
- sua_save_str temp;
- int result = 0;
- int sctp_assoc_id = 0;
+ sua_save_str temp;
+ int result = 0;
+ unsigned int sctp_assoc_id = 0;
+ char digit_char;
temp.primitive = N_UNITDATA;
temp.user_ref = 0;
@@ -747,7 +748,19 @@ short process_unitdata_msg ( int local_sua_id,
}
if (msg.sua_prim.source_addr.gt_pres == TRUE)
{
- cout << "Global Title : unsupported address format\n";
+ temp.calling_pty_address.address_fields_present.name_gt = GT_present;
+ temp.calling_pty_address.name.GT.Translation_Type = msg.sua_prim.source_addr.gt.translation_type ;
+ temp.calling_pty_address.name.GT.Numbering_Plan = msg.sua_prim.source_addr.gt.num_plan ;
+ temp.calling_pty_address.name.GT.Nature_of_Address = msg.sua_prim.source_addr.gt.nat_addr ;
+ temp.calling_pty_address.name.GT.nr_of_digits = msg.sua_prim.source_addr.gt.nr_of_digits ;
+
+ for (int i=0; i < temp.calling_pty_address.name.GT.nr_of_digits; i++){
+ sprintf(&digit_char, "%d", msg.sua_prim.source_addr.gt.digits[i]);
+ temp.calling_pty_address.name.GT.digits[i] = digit_char;
+ }
+
+ temp.calling_pty_address.name.GT.digits[temp.calling_pty_address.name.GT.nr_of_digits] = '\0';
+
}
if (msg.sua_prim.source_addr.hostname_pres == TRUE)
{
@@ -811,6 +824,23 @@ short process_unitdata_msg ( int local_sua_id,
temp.called_pty_address.pc.ss7.ITU24.pc = msg.sua_prim.dest_addr.pc;
}
+ if (msg.sua_prim.dest_addr.gt_pres == TRUE)
+ {
+ temp.called_pty_address.address_fields_present.name_gt = GT_present;
+ temp.called_pty_address.name.GT.Translation_Type = msg.sua_prim.dest_addr.gt.translation_type ;
+ temp.called_pty_address.name.GT.Numbering_Plan = msg.sua_prim.dest_addr.gt.num_plan ;
+ temp.called_pty_address.name.GT.Nature_of_Address = msg.sua_prim.dest_addr.gt.nat_addr ;
+ temp.called_pty_address.name.GT.nr_of_digits = msg.sua_prim.dest_addr.gt.nr_of_digits ;
+
+ for (int i=0; i < temp.called_pty_address.name.GT.nr_of_digits; i++){
+ sprintf(&digit_char, "%d", msg.sua_prim.dest_addr.gt.digits[i]);
+ temp.called_pty_address.name.GT.digits[i] = digit_char;
+ }
+
+ temp.called_pty_address.name.GT.digits[temp.called_pty_address.name.GT.nr_of_digits] = '\0';
+
+ }
+
if (msg.sua_prim.dest_addr.hostname_pres == TRUE)
{
temp.called_pty_address.address_fields_present.name_gt = hostname_present;
@@ -885,8 +915,8 @@ short process_UDTService_msg ( int local_sua_id,
)
{
sua_save_str temp;
- int i, result = 0;
- int sctp_assoc_id = 0;
+ int i, result = 0;
+ unsigned int sctp_assoc_id = 0;
temp.primitive = N_NOTICE;
temp.user_ref = 0;