update to sualibrary-0.1.3 released 2003-05-28

* Contains Relaying functionality using Global Titles and hostnames.
    * New configuration commands via configuration file.
    * Correct some bugs
    * Compiles and runs on Linux, FreeBSD, Max OS X ....
    * Tested on IPv4 and IPV6 networks
    * interoperable with other SUA implementations
    * corresponds to sua draft v13
    * requires SCTP implementation sctplib-1.0.0-pre19 from www.sctp.de
This commit is contained in:
Harald Welte 2010-07-09 20:58:12 +02:00
parent 3dc72b8cff
commit c9c547aafe
40 changed files with 1581 additions and 1021 deletions

View File

@ -8,7 +8,7 @@ AC_INIT(acconfig.h)
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AM_INIT_AUTOMAKE(sualibrary,0.1.2)
AM_INIT_AUTOMAKE(sualibrary,0.1.3)
AC_PREFIX_DEFAULT(/usr/local)
if test "x$prefix" = "xNONE"; then

View File

@ -24,7 +24,7 @@ ldadd=
ldflags=
[General]
AMChanged=false
AMChanged=true
author=Lode Coene
configure_args=
email=lode.coene@siemens.atea.be

View File

@ -1,5 +1,7 @@
####### kdevelop will overwrite this part!!! (begin)##########
bin_PROGRAMS = sualibrary
sualibrary_SOURCES =
sualibrary_LDADD = ./sua/libsua.a ./testup/libtestup.a
SUBDIRS = docs sua testup

View File

@ -18,7 +18,7 @@ Previous
<H2><A NAME="s1.1">1.1 General concept</A></H2>
<P>
The sualib-0.1.0 library release is the product of a cooperation between Siemens AG (ICM), Munich, Germany and Siemens Atea, Herentals Belgium.
The sualib-0.1.3 library release is the product of a cooperation between Siemens AG (ICM), Munich, Germany and Siemens Atea, Herentals Belgium.
It has been developed since late 2000 and has been planned to become a fairly complete prototype implementation of the SCCP User Adaptation
@ -62,22 +62,31 @@ callbacks for SUA events are passed in a SUA_ulpCallbacks(described more closely
and 6.5).
Then the application either calls the possibly blocking function sua_eventLoop(). While calling the former, it will react to a previously scheduled timer or any file descriptor event (by executing the registered callback functions). In case a timer is scheduled at a very late point in time, and no events happen on registered file descriptors (e.g. sockets), the program will sleep (because the system call poll() is used. In this case, the control flow is handled by the library, and the user must register appropriate callbacks for events and timers before handing control over to the sua_eventLoop() function. The proper use of the sua_eventLoop() is explained in some simple example programs in section 7.
</P>
<P>
See the following chapters for some general infomation on the present features of SUA.</P>
<UL>
<LI><A HREF="index-3.html#ss3.1">3.1 General usage of the SUA library</A>
<LI><A HREF="index-3.html#ss3.2">3.2 Features of the implementation</A>
<LI><A HREF="index-3.html#ss3.3">3.3 What is missing</A>
<LI><A HREF="index-3.html#ss3.4">3.4 SUA configuration file commands</A>
</UL>
<P>
<P>
<H2><A NAME="ss1.2">1.2 Changes</A>
</H2>
Changes in comparison with sualibrary 0.0.5:
Changes in comparison with sualibrary 0.1.2:
<P>
- portable to Darwin (Mac)<P>
- New configuration file syntax<P>
<P>
- Global title addressing supported<P>
<P>
- portable to different UNIX versions<P>
- tested on both Linux and FreeBSD vs 4.4<P>
- tested with both IPv4 and IPv6 networks<P>
- msg syntax updated to <draft-ietf-sigtran-sua-12.txt> (example: DNS names)<P><UL>
<LI><A HREF="index-3.html#ss3.1">3.1 General usage of the SUA library</A>
<LI><A HREF="index-3.html#ss3.2">3.2 Features of the implementation</A>
<LI><A HREF="index-3.html#ss3.3">3.3 What is missing</A>
</UL>
<P>
<H2><A name="ss1.3">1.3 Nomenclature </A></H2>
@ -98,3 +107,18 @@ Previous
<A HREF="index.html#toc1">Contents</A>
</BODY>
</HTML>

View File

@ -51,7 +51,7 @@ autoconf
you should have not trouble
compiling it.
Should you run into problems please report them to the the author at
<A HREF="mailto:lode.coene@siemens.atea.be">Lode Coene</A><P>
<A HREF="mailto:lode.coene@siemens.com">Lode Coene</A><P>
<P>
<P>
@ -61,3 +61,12 @@ Should you run into problems please report them to the the author at
<A HREF="index.html#toc2">Contents</A>
</BODY>
</HTML>

View File

@ -61,13 +61,13 @@ Connectionless : CLDT message transfer
<P>
Connectionoriented: CORE, COAK, RELRE, RELCO, COREF & CODT message transfer
<P>
Adressing options: use of Ipv4 and Ipv6 addresses, SS7 pointcodes, hostname
Adressing options: use of Ipv4 and Ipv6 addresses, SS7 pointcodes, hostname, Global titles
<P>
SUA ASP management(optional)
<P><P>
It has been tested with implementations of 4 companies in the first SUA bakeoff.
<P><P>
The following flags are recognized when reading a configuration file for SUA:
The following flags are recognized when running SUA:
<P>
-s : source address<P>
@ -95,11 +95,11 @@ The following flags are recognized when reading a configuration file for SUA:
example of a association<P>
-s 10.0.1.1 -7s 1 -d 10.0.3.1 -7d 66051 -r 14001 -n 255 -a 1 -t 16<P>
./testup -s 10.0.1.1 -7s 1 -d 10.0.3.1 -7d 66051 -r 14001 -n 255 -a 1 -t 16<P>
example of a local listener<P>
-s be.atea.sua01 n 255 a 1 t 2 <P>
./testup -s 10.0.1.1 -n 255 -a 1 -t 2 <P>
<P>
@ -111,8 +111,7 @@ example of a local listener<P>
<P>
Features to be included in future version:
<P>
- Relaying functionality<P>
<P><P>
- SUA management: ASP , AS management, etc<P>
<P>
@ -130,6 +129,62 @@ patches, and patches are always welcome !
<P>
<P>
<P>
Features not to be included:
<P>
- NIF/interworking with classical SS7 SCCP<P>
- Routing keys<P>
- Registration of Applications<P>
<P>
<P>
<P>
<H2><A NAME="ss3.4">3.4 SUA configuration file commands.</A>
</H2>
<P>
<P>
The following Commands can be used in the SUA configuration file:
<P>
REMARK: Spaces are used to clarify the commands only. They are not allowed or not recognized correctly in the actual configuration file!!!! See example configuration file in the package under sualibrary/testup/pcg729.sua</P>
<P><P>
<P>
- cr host:host_id = j, org_ip= t.t.t.t, org_port= yyyyy \n;</P>
<P>Provides the IP address(ses)(v4/v6) and portnumber of your own host. In most cases only one host entry will be needed, so host_id = 1</P>
<P>
- cr assoc:assoc_id= i, init= false, host_id = j, dest_ip = x.x.x.x, dest_port= yyyy;</P>
<P>Provides the IP addres(ses) and portnumber of the destination to which to set up a association. Each association requires a different association_id. The init flag indicates if the implementation should setup the association immediatly(active assoc setup) or wait for a incomming association from remote node with those particular parameters(passive assoc setup or listening mode).</P>
<P>
- cr orgpc: pc = cccc, host_id = j;</P>
<P>Provides the originating SS7 pointcode for the own node with host_id j.</P>
<P>
- cr orggt: host_id=j,tt=tt,na=nn,np=ppp,digits= 123456789abcdef; </P>
<P>Provides the originating Global title(=Calling party Address) for the own node with host_id j.</P>
<P>
- cr orgname: host_id=j,name=www.xxx.zzz; </P>
<P>Provides the originating Hostname for the own node with host_id j.</P>
<P>
- cr destpc: dest_id = i,pc = cccc;</P>
<P>Provides the Destination Pointcode for the remote node with dest_id i.</P>
<P>
- cr destip: dest_id = i,ip = cccc;</P>
<P>Provides the Destination IP address(es)(v4/v6) for the remote node with dest_id i.</P>
<P>
A node can have both a PC or/and a IP address. If both are present then the dest_id must be the same for that particular node.</P>
<P>
- cr destname: dname_id = i,name = www.sctp.be;</P>
<P>Provides the Destination Hostname for the remote node with dname_id i.</P>
<P>
- cr name: dname_id=k,tt=tt,na=nn,np=ppp,digits= 123456789abcdef;</p>
<P>Provides the Destination Global Title for the remote node with dname_id i. tt = translation identifier, na = Nature of address, np= Numbering plan, digits= digits of the Global Title</P>
<P>
- cr route: dest_id = j, assoc_id = i;</P>
<P>Make the link between a Destination(PC/IP addr) and a association. Destination dest_id j can be reached via the association assoc_id i.</P>
<P>
- cr route: dname_id = j, assoc_id = i;</P>
<P>Make the link between a Destination(GT/Name) and a association. Destination dname_id j can be reached via the association assoc_id i.</P>
<P>
<P>
<HR>
<A HREF="index-4.html">Next</A>
<A HREF="index-2.html">Previous</A>

View File

@ -14,7 +14,7 @@ Next
<H2><A NAME="s6">6. Copyright</A></H2>
<P>
<P>Sualibrary Copyright 2002 Lode Coene , lode.coene@siemens.atea.be
<P>Sualibrary Copyright 2003 Lode Coene , lode.coene@siemens.atea.be
<P>
<P>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -16,9 +16,9 @@ Contents
<H2>Lode Coene <CODE>lode.coene@siemens.atea.be</CODE></H2>
<H2>Gery Verwimp <CODE>gery.verwimp@siemens.atea.be</CODE></H2>
Version 0.1.0 , Friday Feb 15 12:01:21 CET 2002
Version 0.1.3 , Friday May 31 12:01:21 CET 2003
<P><HR>
<EM>This Handbook describes Sualibrary Version 0.1.0</EM>
<EM>This Handbook describes Sualibrary Version 0.1.3</EM>
<HR>
<P>
<H2><A NAME="toc1">1.</A> <A HREF="index-1.html">Introduction</A></H2>
@ -43,6 +43,7 @@ Version 0.1.0 , Friday Feb 15 12:01:21 CET 2002
<LI><A HREF="index-3.html#ss3.1">3.1 General usage of the SUA library</A>
<LI><A HREF="index-3.html#ss3.2">3.2 Features of the implementation</A>
<LI><A HREF="index-3.html#ss3.3">3.3 What is missing</A>
<LI><A HREF="index-3.html#ss3.4">3.4 SUA configuration file commands</A>
</UL>
<P>
<H2><A NAME="toc4">4.</A> <A HREF="index-4.html">SUA Application Program Interface (SUA API)</A></H2>

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua.h,v 1.8 2002/11/12 11:02:49 p82609 Exp $
* $Id: sua.h,v 1.1 2003/01/14 14:15:36 p82609 Exp $
*
* SUA implementation according to SUA draft issue 13.
*
@ -345,8 +345,7 @@ unsigned int sua_read_config_file
#define SUA_REG_NO_ERROR 0
unsigned int sua_registerInstance
( short local_ssn,
Sua_ULP_CallBacks ulp_callback
( Sua_ULP_CallBacks ulp_callback
);

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_adapt.cpp,v 1.5 2002/11/12 11:02:49 p82609 Exp $
* $Id: sua_adapt.cpp,v 1.3 2003/01/31 11:36:39 p82609 Exp $
*
* SUA implementation according to SUA draft issue 13.
*
@ -109,9 +109,7 @@ void sua_initialisation()
sctp_setLibraryParameters(&params);
init_logging_file();
sua.local_sua.initialize();
sua.remote_sua.initialize();
sua.AssocDB.initialize();
sua.initialize();
cout << "Finished initialising SUA data\n ";
} /* end of sua_initialisation */
@ -124,13 +122,10 @@ unsigned int sua_read_config_file( char *pConfFile)
unsigned int result = SUA_CFG_NO_ERROR;
string sua_filename;
sua_filename = pConfFile;
result = read_sua_file( sua_filename,
sua.local_sua,
sua.remote_sua,
sua.AssocDB,
sua.NameDB,
sua.ApplicServ
);
result = read_sua_conf_file( sua_filename,
sua
);
return(result);
}
@ -138,8 +133,7 @@ unsigned int sua_read_config_file( char *pConfFile)
/***********************************************************************/
/* sua_registerInstance */
/***********************************************************************/
unsigned int sua_registerInstance ( short local_ssn,
Sua_ULP_CallBacks ulp_callback
unsigned int sua_registerInstance ( Sua_ULP_CallBacks ulp_callback
)
{
unsigned int result = SUA_REG_NO_ERROR;
@ -154,10 +148,9 @@ unsigned int sua_registerInstance ( short local_ssn,
SCTPCallbackFunctions.restartNotif = &sctp_RestartNotif;
SCTPCallbackFunctions.shutdownCompleteNotif = &sctp_ShutDownCompleteNotif;
result = sua.AssocDB.register_instance ( SCTPCallbackFunctions,
ulp_callback,
sua.local_sua
);
result = sua.local_sua.register_instance ( SCTPCallbackFunctions,
ulp_callback
);
return(result);
}
@ -197,22 +190,20 @@ unsigned int sua_getPath( unsigned int assoc_id,
pathinfo.remote_addr.ssn = sua.remote_sua.instance[sua.AssocDB.instance[assoc_id].remote_sua_id].ssn.ssn;
pathinfo.ASP_status = sua.AssocDB.instance[assoc_id].asp.status;
#ifdef DEBUG
//cout << "remote ssn = " << pathinfo.remote_addr.ssn << "\n";
//cout << "remote sua_id = " << sua.AssocDB.instance[assoc_id].remote_sua_id << "\n";
#endif
}
else
result = SUA_PATH_NO_DEST_ADDR_PRESENT;
pathinfo.local_addr.pc.ipvx.ch = sua.AssocDB.instance[assoc_id].Source.addrs[0].ch;
pathinfo.local_addr.pc.ipvx.ch = sua.local_sua.instance[sua.AssocDB.instance[assoc_id].local_sua_id].Source.addrs[0].ch;
/*memcpy( pathinfo.local_addr.pc.ipvx.ch, sua.AssocDB.instance[assoc_id].Source.addrs[0].ch,24);*/
pathinfo.local_addr.pc.ss7 = sua.AssocDB.instance[assoc_id].Source.pc;
pathinfo.local_addr.pc.ss7 = sua.local_sua.instance[sua.AssocDB.instance[assoc_id].local_sua_id].Source.pc;
pathinfo.local_addr.ssn = sua.local_sua.instance[sua.AssocDB.instance[assoc_id].local_sua_id].ssn.ssn;
pathinfo.local_addr.name.GT = sua.local_sua.instance[sua.AssocDB.instance[assoc_id].local_sua_id].Name.GT;
return (result);
}

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_adapt.h,v 1.2 2002/11/12 11:02:49 p82609 Exp $
* $Id: sua_adapt.h,v 1.1 2003/01/14 14:15:36 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_asp_mgnt.cpp,v 1.3 2002/11/12 11:02:49 p82609 Exp $
* $Id: sua_asp_mgnt.cpp,v 1.1 2003/01/14 14:15:36 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_asp_mgnt.h,v 1.1.1.1 2002/02/04 14:30:41 p82609 Exp $
* $Id: sua_asp_mgnt.h,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*

View File

@ -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;

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_cl.h,v 1.4 2002/04/08 15:28:06 p82609 Exp $
* $Id: sua_cl.h,v 1.2 2003/01/24 11:48:54 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*
@ -72,42 +72,42 @@
using namespace std;
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
);
int sua_route_Message( unsigned int &sctp_assoc_id,
unsigned int local_sua_id,
Sua_container &msg,
sccp_addr_str &called_pty_address,
sccp_addr_str &calling_pty_address
);
int sua_route_Message( unsigned int sctp_assoc_id,
unsigned int local_sua_id,
Sua_container &msg,
sccp_addr_str &called_pty_address,
sccp_addr_str &calling_pty_address
);
int sua_send_Unitdata( sccp_QOS_str &QOS,
sccp_addr_str &called_pty_address,
sccp_addr_str &calling_pty_address,
char *buffer,
unsigned int len
);
sccp_addr_str &called_pty_address,
sccp_addr_str &calling_pty_address,
char *buffer,
unsigned int len
);
int sua_send_UDTService( Sua_container &org_msg,
sccp_addr_str &called_pty_address,
sccp_addr_str &calling_pty_address,
unsigned int UDTS_reason
);
sccp_addr_str &called_pty_address,
sccp_addr_str &calling_pty_address,
unsigned int UDTS_reason
);
short process_unitdata_msg ( int local_sua_id,
unsigned int sua_assoc_id,
Sua_container &sua_msg
);
unsigned int sua_assoc_id,
Sua_container &sua_msg
);
short process_UDTService_msg ( int local_sua_id,
unsigned int sua_assoc_id,
Sua_container &sua_msg
);
unsigned int sua_assoc_id,
Sua_container &sua_msg
);
#endif // SUA_CL_H
@ -115,3 +115,5 @@ short process_UDTService_msg ( int local_sua_id,
// end of module sua_cl.h

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_co.cpp,v 1.7 2002/11/12 11:02:49 p82609 Exp $
* $Id: sua_co.cpp,v 1.5 2003/02/17 14:38:08 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*
@ -1164,12 +1164,13 @@ short process_CORE_msg ( unsigned int sua_assoc_id,
Sua_container &msg
)
{
int i, result = 0;
int sctp_assoc_id = 0;
int result = 0;
unsigned int sctp_assoc_id = 0;
unsigned int local_sua_id = 0;
sua_save_str temp;
unsigned int Sua_Out_ConnId;
tcb_Sua_TCB_str *tcb_out_ptr;
char digit_char;
temp.primitive = N_CONNECT_IND;
temp.user_ref = Sua_ConnId;
@ -1219,24 +1220,25 @@ short process_CORE_msg ( unsigned int sua_assoc_id,
if (msg.sua_prim.source_addr.pc_pres == TRUE)
{
temp.calling_pty_address.address_fields_present.pc = ss7_pc_present;
temp.calling_pty_address.pc.ss7.ITU24.family = ITU24bit;
temp.calling_pty_address.pc.ss7.ITU24.family = sua.AssocDB.instance[sua_assoc_id].Dest.pc.ITU24.family;
temp.calling_pty_address.pc.ss7.ITU24.pc = msg.sua_prim.source_addr.pc;
}
if (msg.sua_prim.source_addr.gt_pres == TRUE)
{
cout << "Global Title : unsupported address format\n";
}
if (msg.sua_prim.source_addr.gt_pres == TRUE)
{
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 (i=0; i < temp.calling_pty_address.name.GT.nr_of_digits; i++)
temp.calling_pty_address.name.GT.digits[i] = msg.sua_prim.source_addr.gt.digits[i];
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)
@ -1303,7 +1305,7 @@ short process_CORE_msg ( unsigned int sua_assoc_id,
if (msg.sua_prim.dest_addr.pc_pres == TRUE)
{
temp.called_pty_address.address_fields_present.pc = ss7_pc_present;
temp.called_pty_address.pc.ss7.ITU24.family = ITU24bit;
temp.called_pty_address.pc.ss7.ITU24.family = sua.AssocDB.instance[sua_assoc_id].Dest.pc.ITU24.family;
temp.called_pty_address.pc.ss7.ITU24.pc = msg.sua_prim.dest_addr.pc;
}
@ -1314,8 +1316,12 @@ short process_CORE_msg ( unsigned int sua_assoc_id,
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 (i=0; i < temp.called_pty_address.name.GT.nr_of_digits; i++)
temp.called_pty_address.name.GT.digits[i] = msg.sua_prim.dest_addr.gt.digits[i];
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';
}
@ -1916,6 +1922,11 @@ short process_CORELCO_msg ( unsigned int sua_assoc_id,
);
delete databuf;
// release the incoming TCB of this connection
tcb_pool.release_TCB(sua_ConnId);
// release outgoing TCB of this connection
tcb_pool.release_TCB(Sua_Out_ConnId);
}
return(0);
@ -2038,6 +2049,12 @@ short process_COREF_msg ( unsigned int sua_assoc_id,
);
delete databuf;
// release the incoming TCB of this connection
tcb_pool.release_TCB(sua_ConnId);
// release outgoing TCB of this connection
tcb_pool.release_TCB(Sua_Out_ConnId);
}
return(0);

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_co.h,v 1.1.1.1 2002/02/04 14:30:41 p82609 Exp $
* $Id: sua_co.h,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_database.cpp,v 1.2 2002/10/30 16:04:09 p82609 Exp $
* $Id: sua_database.cpp,v 1.2 2003/01/16 15:07:56 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*
@ -358,20 +358,55 @@ short db_Sua_LocalList:: unregister_instance(){
/* Sua_LocalList::register_instance */
/***********************************************************************/
short db_Sua_LocalList::
register_instance( unsigned int local_sua_id,
Sua_ULP_CallBacks SUACallbackFunctions,
unsigned int init_association
register_instance( SCTP_ulp_Callbacks APLCallbackFunctions,
Sua_ULP_CallBacks SUACallbackFunctions
){
int i;
short sua_portnumber = SUA_PORT;
#ifdef DEBUG
cout << "Number of local sua instance to register = " << num_of_instance << "\n";
#endif
for(i=1; i <= num_of_instance; i++)
{
#ifdef DEBUG
cout << "Register SUA(& SCTP) local instance nr " << i << ", SSN = "<< instance[i].ssn.ssn <<" \n";
#endif
char logstring[100];
sprintf(logstring, "Register SUA(& SCTP) local instance nr %d, SSN = %d",i,instance[i].ssn.ssn );
event_log("sua_database.c",logstring);
instance[i].SUA_APLCallBack.ulp_ClDataIndNotif = SUACallbackFunctions.ulp_ClDataIndNotif;
instance[i].SUA_APLCallBack.ulp_ConnIndNotif = SUACallbackFunctions.ulp_ConnIndNotif;
instance[i].SUA_APLCallBack.ulp_ConnConfIndNotif = SUACallbackFunctions.ulp_ConnConfIndNotif;
instance[i].SUA_APLCallBack.ulp_ConnDataIndNotif = SUACallbackFunctions.ulp_ConnDataIndNotif;
instance[i].SUA_APLCallBack.ulp_DisConnIndNotif = SUACallbackFunctions.ulp_DisConnIndNotif;
if (instance[i].Source.addrs[0].sa.sa_family == AF_INET)
sua_portnumber = instance[i].Source.addrs[0].sin.sin_port;
else if (instance[i].Source.addrs[0].sa.sa_family == AF_INET6)
sua_portnumber = instance[i].Source.addrs[0].sin6.sin6_port;
instance[i].SCTP_instance_name =
sctp_registerInstance( sua_portnumber,
instance[i].max_streams,
instance[i].max_streams,
instance[i].Source.nr_of_addrs,
instance[i].Source.address_string,
APLCallbackFunctions
);
#ifdef DEBUG
cout << "SCTP instance name = " << instance[i].SCTP_instance_name << " \n";
#endif
sprintf(logstring, "Local SCTP instance nr %d name = %d", i, instance[i].SCTP_instance_name);
event_log("sua_database.c",logstring);
}
return(0);
instance[local_sua_id].SUA_APLCallBack.ulp_ClDataIndNotif = SUACallbackFunctions.ulp_ClDataIndNotif;
instance[local_sua_id].SUA_APLCallBack.ulp_ConnIndNotif = SUACallbackFunctions.ulp_ConnIndNotif;
instance[local_sua_id].SUA_APLCallBack.ulp_ConnConfIndNotif = SUACallbackFunctions.ulp_ConnConfIndNotif;
instance[local_sua_id].SUA_APLCallBack.ulp_ConnDataIndNotif = SUACallbackFunctions.ulp_ConnDataIndNotif;
instance[local_sua_id].SUA_APLCallBack.ulp_DisConnIndNotif = SUACallbackFunctions.ulp_DisConnIndNotif;
instance[local_sua_id].init_assoc_id = init_association;
return(0);
}
@ -424,6 +459,7 @@ void db_Sua_RemoteList:: increase_instance(){
event_log("sua_database.c",logstring);
};
/***********************************************************************/
/* functions of the object class SUA Application Server Process (ASP) */
/***********************************************************************/

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_database.h,v 1.8 2002/11/12 11:02:49 p82609 Exp $
* $Id: sua_database.h,v 1.4 2003/01/31 11:36:39 p82609 Exp $
*
* SUA implementation according to SUA draft issue 8.
*
@ -76,7 +76,7 @@
typedef enum {nc_empty, nc_ipv4, nc_ipv6} db_net_class;
const int db_MAX_MULTIHOME_ADDR = 10;
const int db_MAX_MULTIHOME_ADDR = 2;
const int db_MAX_LOCAL_SUA = 10;
const int db_MAX_REMOTE_SUA = 1000;
const int db_MAX_SSN_SUA = 256;
@ -94,17 +94,36 @@ class db_Sua_SSNObject {
void read_ssn(string ssn);
}; ///:~
/***********************************************************************/
/* Sua_AddressObject */
/***********************************************************************/
class db_Sua_AddressObject {
public:
int nr_of_addrs; // number of ip addresses used(multihoming)
unsigned char address_string[db_MAX_MULTIHOME_ADDR][SCTP_MAX_IP_LEN];
ipvxunion addrs[db_MAX_MULTIHOME_ADDR];
SS7union pc;
public:
void read_addr_param(string address);
void read_pointcode_param(string point_code);
void read_port_num(string port);
}; ///:~
/***********************************************************************/
/* Sua_LocalObject */
/***********************************************************************/
class db_Sua_LocalObject{
public:
db_Sua_SSNObject ssn;
/* contains the initial SUA association */
unsigned int init_assoc_id;
/* the local sua id with which it is linked. */
unsigned int sua_id;
Sua_ULP_CallBacks SUA_APLCallBack;
/* ssn supported */
db_Sua_SSNObject ssn;
/* maximum number of streams for this instance */
unsigned int max_streams;
/* SCTP registered local instance name */
unsigned int SCTP_instance_name;
Sua_ULP_CallBacks SUA_APLCallBack;
/* local source address(es) of instance */
db_Sua_AddressObject Source;
name_str Name;
public:
// functions of the Class
void initialize();
@ -119,9 +138,8 @@ class db_Sua_LocalList{
db_Sua_LocalObject instance[db_MAX_LOCAL_SUA];
void initialize();
void read_ssn(string ssn);
short register_instance( unsigned int local_sua_id,
Sua_ULP_CallBacks SUACallbackFunctions,
unsigned int init_assoc_id
short register_instance( SCTP_ulp_Callbacks APLCallbackFunctions,
Sua_ULP_CallBacks SUACallbackFunctions
);
short unregister_instance();
void increase_instance();
@ -133,10 +151,10 @@ class db_Sua_LocalList{
class db_Sua_RemoteObject{
public:
db_Sua_SSNObject ssn;
/* contains the SCTP assoc id */
unsigned int SCTP_assoc_id;
/* contains the local sua id with which it is linked. */
unsigned int sua_id;
/* contains the association sua id with which it is linked. */
unsigned int SUA_assoc_id;
/* dest address of the remote sua node */
db_Sua_AddressObject Dest;
public:
// functions of the Class
void initialize();
@ -153,23 +171,6 @@ class db_Sua_RemoteList{
void initialize();
void read_ssn(string ssn);
void increase_instance();
}; ///:~
/***********************************************************************/
/* Sua_AddressObject */
/***********************************************************************/
class db_Sua_AddressObject {
public:
int nr_of_addrs; // number of ip addresses used(multihoming)
unsigned char address_string[db_MAX_MULTIHOME_ADDR][SCTP_MAX_IP_LEN];
ipvxunion addrs[db_MAX_MULTIHOME_ADDR];
SS7union pc;
public:
void read_addr_param(string address);
void read_pointcode_param(string point_code);
void read_port_num(string port);
}; ///:~
/***********************************************************************/
@ -190,7 +191,7 @@ class db_Sua_GlobalTitle {
class db_Sua_NameObject {
public:
unsigned int SUA_assoc_id;
unsigned int sctp_assoc_id;
boolean GT_present;
db_Sua_GlobalTitle GT;
string hostname;
public:
@ -207,11 +208,14 @@ class db_Sua_NameList{
db_Sua_NameObject instance[db_MAX_REMOTE_SUA];
public:
void initialize();
string read_host_name( unsigned int sua_assoc_id,
string name
void read_host_name( unsigned int gtname_id,
string name
);
void read_Global_Title( unsigned int sua_assoc_id,
string name
void read_Global_Title( unsigned int gtname_id,
unsigned int tt,
unsigned int na,
unsigned int np,
string digits
);
signed int resolve_host_name( hostname_str& dest_name,
pointcode_str& dest_pc
@ -314,6 +318,7 @@ class db_Sua_AssociationObject {
unsigned int local_sua_id;
short nr_of_inbound_streams;
short nr_of_outbound_streams;
boolean init_assoc;
db_Sua_ASPObject asp;
db_net_class netw; // sort of network(v4/v6) to be used
// ip source/destination addresses , should be the same network type
@ -339,21 +344,7 @@ class db_Sua_AssociationList{
void read_Dest_pointcode(string address);
void read_Source_port(string port);
void read_Dest_port(string port);
void read_Source_GT( db_Sua_NameList &NameDB,
string address
);
void read_Dest_GT( db_Sua_NameList &NameDB,
string address
);
string read_host_name( db_Sua_NameList &NameDB,
string address
);
void read_stream_number(string stream_num);
short register_instance(SCTP_ulp_Callbacks APLCallbackFunctions,
Sua_ULP_CallBacks SUACallbackFunctions,
db_Sua_LocalList& local_sua
);
short unregister_instance();
unsigned int Find_association( unsigned int sctp_assoc_id,
unsigned int &Local_sua_id,
unsigned int &Remote_sua_id
@ -378,14 +369,6 @@ class db_Sua_AssociationList{
);
short Terminate_remote_assoc_instance();
short shutdown();
signed int route_on_IPpc ( ipvxunion& dest_pc,
ipvxunion& org_pc,
int& sua_assoc_id
);
signed int route_on_SS7pc ( SS7union& dest_pc,
SS7union& org_pc,
int& sua_assoc_id
);
void increase_instance();
bool activate( unsigned int sua_id,
short mode
@ -413,6 +396,7 @@ class db_Sua_DatabaseList{
db_Sua_NameList NameDB;
db_Sua_ASList ApplicServ;
public:
void initialize();
unsigned int Find_local_sua( sccp_addr_str& local_address
);
unsigned int Dynamic_Associate( sccp_addr_str& cld,
@ -421,6 +405,14 @@ class db_Sua_DatabaseList{
unsigned short nr_of_input_streams,
unsigned short nr_of_output_streams
);
signed int route_on_SS7pc ( SS7union& dest_pc,
SS7union& org_pc,
int& sua_assoc_id
);
signed int route_on_IPpc ( ipvxunion& dest_pc,
ipvxunion& org_pc,
int& sua_assoc_id
);
signed int route_on_GTname ( hostname_str& dest_name,
hostname_str& org_name,
int& sua_assoc_id,

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_dataname.cpp,v 1.6 2002/11/12 11:04:12 p82609 Exp $
* $Id: sua_dataname.cpp,v 1.2 2003/01/31 11:36:39 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*
@ -89,7 +89,7 @@ void db_Sua_NameObject::initialize(){
// initialise to point to a invalid SUA association
SUA_assoc_id = 0;
sctp_assoc_id = 0;
GT.Translation_Type = 0;
GT.Numbering_Plan = 0;
GT.Nature_of_Address = 0;
@ -119,9 +119,9 @@ void db_Sua_NameList::initialize(){
/***********************************************************************/
/* Sua_NameList::read_host_name */
/***********************************************************************/
string db_Sua_NameList::read_host_name( unsigned int sua_assoc_id,
string name
){
void db_Sua_NameList::read_host_name( unsigned int gtname_id,
string name
){
char *hostname;
const char *ip_addr_ptr;
@ -137,74 +137,66 @@ string db_Sua_NameList::read_host_name( unsigned int sua_assoc_id,
if ((hptr = gethostbyname(hostname)) == NULL){
cout << "Determination of hostname failed\n";
return("127.0.0.1");
}
#ifdef DEBUG
cout << "Hostname " << hptr->h_name << " has the following IP address(es)\n";
#endif
pptr = hptr->h_addr_list;
for ( ; *pptr != NULL;pptr++)
else
{
ip_addr_ptr = inet_ntop(hptr->h_addrtype, *pptr, str,sizeof(str));
addr_str = addr_str + ip_addr_ptr;
if ((*(pptr+1)) != NULL)
/* another ip address is comming after the present one */
addr_str = addr_str + ",";
/*else this is the last ip address */
#ifdef DEBUG
cout << ip_addr_ptr << "\n";
cout << "Hostname " << hptr->h_name << " has the following IP address(es)\n";
#endif
}
pptr = hptr->h_addr_list;
for ( ; *pptr != NULL;pptr++)
{
ip_addr_ptr = inet_ntop(hptr->h_addrtype, *pptr, str,sizeof(str));
addr_str = addr_str + ip_addr_ptr;
if ((*(pptr+1)) != NULL)
/* another ip address is comming after the present one */
addr_str = addr_str + ",";
/*else this is the last ip address */
#ifdef DEBUG
cout << "output IP list = " << addr_str << "\n";
cout << ip_addr_ptr << "\n";
#endif
}
#ifdef DEBUG
cout << "output IP list = " << addr_str << "\n";
#endif
}
/* initialise */
instance[gtname_id].SUA_assoc_id = 0;
instance[num_of_instance].SUA_assoc_id = sua_assoc_id;
/* no GT present -> hostname present */
instance[gtname_id].GT_present = false;
instance[gtname_id].hostname = name;
instance[num_of_instance].hostname = name;
return(addr_str);
return;
}
/***********************************************************************/
/* Sua_NameList::read_Global_Title */
/***********************************************************************/
void db_Sua_NameList::read_Global_Title( unsigned int sua_assoc_id,
string gt
void db_Sua_NameList::read_Global_Title( unsigned int gtname_id,
unsigned int tt,
unsigned int na,
unsigned int np,
string digits
)
{
string GT_TT_str, GT_NP_str, GT_NA_str, GT_Digits_str;
unsigned int first = 0, last = 0;
unsigned int current = gt.find('-', first);
/*unsigned short i;*/
instance[gtname_id].SUA_assoc_id = 0;
first = 1;
last = current - 1;
GT_TT_str = gt.substr( first, last);
first = current + 1;
current = gt.find('-', first);
last = current - 1;
GT_NP_str = gt.substr( first , last);
first = current + 1;
current = gt.find('-', first);
last = current - 1;
GT_NA_str = gt.substr( first , last);
first = current + 1;
last = gt.size();
GT_Digits_str = gt.substr( first , last);
instance[num_of_instance].SUA_assoc_id = sua_assoc_id;
instance[num_of_instance].GT.Translation_Type = atoi(GT_TT_str.c_str());
instance[num_of_instance].GT.Numbering_Plan = atoi(GT_NP_str.c_str());
instance[num_of_instance].GT.Nature_of_Address = atoi(GT_NA_str.c_str());
instance[num_of_instance].GT.digits = GT_Digits_str;
/* GT present */
instance[gtname_id].GT_present = true;
instance[gtname_id].GT.Translation_Type = tt;
instance[gtname_id].GT.Numbering_Plan = np;
instance[gtname_id].GT.Nature_of_Address = na;
instance[gtname_id].GT.digits.resize( digits.length());
instance[gtname_id].GT.digits= "";
instance[gtname_id].GT.digits = digits;
}
@ -283,7 +275,7 @@ signed int db_Sua_NameList::perform_GTT ( global_title_str& cld_in,
/* resolving can be done via: */
/* - local global Titel database */
i= 0;
i= 1;
while (search_gt){
gt_entry_found = ((instance[i].GT.Translation_Type == cld_in.Translation_Type) &&
(instance[i].GT.Numbering_Plan == cld_in.Numbering_Plan) &&
@ -291,6 +283,9 @@ signed int db_Sua_NameList::perform_GTT ( global_title_str& cld_in,
(instance[i].GT.digits == cld_in.digits));
found_gt_entry = i;
search_gt = ((!gt_entry_found) && ( i < num_of_instance));
/* next entry of name table */
i++;
}
@ -305,6 +300,16 @@ signed int db_Sua_NameList::perform_GTT ( global_title_str& cld_in,
};
/***********************************************************************/
/* db_Sua_NameList::increase_instance */
/***********************************************************************/
void db_Sua_NameList:: increase_instance(){
num_of_instance++;
}
// end of module sua_dataname.c

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_datassoc.cpp,v 1.11 2002/11/12 11:04:12 p82609 Exp $
* $Id: sua_datassoc.cpp,v 1.8 2003/02/17 14:38:08 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*
@ -240,98 +240,6 @@ void db_Sua_AssociationList:: read_stream_number(string stream_num){
}
}
/***********************************************************************/
/* Sua_AssociationList::read_Source_GT */
/***********************************************************************/
void db_Sua_AssociationList::read_Source_GT( db_Sua_NameList &NameDB,
string address
)
{
;
}
/***********************************************************************/
/* Sua_AssociationList::read_Dest_GT */
/***********************************************************************/
void db_Sua_AssociationList::read_Dest_GT( db_Sua_NameList &NameDB,
string address
)
{
unsigned int sua_assoc_id = num_of_instance;
NameDB.read_Global_Title( sua_assoc_id,
address
);
NameDB.num_of_instance++;
}
/***********************************************************************/
/* Sua_AssociationList::read_hostname */
/***********************************************************************/
string db_Sua_AssociationList::read_host_name( db_Sua_NameList &NameDB,
string address )
{
unsigned int sua_assoc_id = num_of_instance;
string host_ip_addr;
host_ip_addr = NameDB.read_host_name( sua_assoc_id,
address
);
return(host_ip_addr);
}
/***********************************************************************/
/* Sua_AssociationList::register_instance */
/***********************************************************************/
short db_Sua_AssociationList::
register_instance( SCTP_ulp_Callbacks APLCallbackFunctions,
Sua_ULP_CallBacks SUACallbackFunctions,
db_Sua_LocalList& local_sua
){
int i;
unsigned int local_sua_idx;
short sua_portnumber = SUA_PORT;
for(i=1; i <= num_of_instance; i++)
{
local_sua_idx = instance[i].local_sua_id;
#ifdef DEBUG
cout << "Register SUA(& SCTP) local instance nr " << local_sua_idx << " with association " << i << " ,SSN = "<< local_sua.instance[local_sua_idx].ssn.ssn <<" \n";
#endif
char logstring[100];
sprintf(logstring, "Register SUA(& SCTP) local instance nr %d with association %d, SSN = %d", local_sua_idx,i,local_sua.instance[local_sua_idx].ssn.ssn );
event_log("sua_database.c",logstring);
local_sua.register_instance( instance[i].local_sua_id,
SUACallbackFunctions,
i
);
if (instance[i].Source.addrs[0].sa.sa_family == AF_INET)
sua_portnumber = instance[i].Source.addrs[0].sin.sin_port;
else if (instance[i].Source.addrs[0].sa.sa_family == AF_INET6)
sua_portnumber = instance[i].Source.addrs[0].sin6.sin6_port;
instance[i].SCTP_instance_name =
sctp_registerInstance( sua_portnumber,
instance[i].nr_of_inbound_streams,
instance[i].nr_of_outbound_streams,
instance[i].Source.nr_of_addrs,
instance[i].Source.address_string,
APLCallbackFunctions
);
#ifdef DEBUG
cout << "SCTP instance name = " << instance[i].SCTP_instance_name << " \n";
#endif
sprintf(logstring, "Local SCTP instance nr %d name = %d", i, instance[i].SCTP_instance_name);
event_log("sua_database.c",logstring);
}
return(0);
};
/***********************************************************************/
/* Sua_AssociationList::associate_instance */
@ -359,41 +267,43 @@ associate_instance( db_Sua_LocalList& local_sua,
res = sctp_setAssocDefaults( instance[1].SCTP_assoc_id,
SCTP_assoc_status
);
for(i=1; i <= num_of_instance; i++)
{
if (instance[i].Dest.nr_of_addrs != 0) {
/* init association from this node */
if ((instance[i].init_assoc) && (instance[i].Dest.nr_of_addrs != 0)) {
#ifdef DEBUG
cout << "Associate remote SUA(& SCTP) instance nr " << i << " with local SUA(& SCTP) instance nr " << instance[i].local_sua_id <<" \n";
cout << "Associate remote SUA(& SCTP) instance nr " << i << " with local SUA(& SCTP) instance nr " << instance[i].local_sua_id <<" \n";
#endif
char logstring[100];
sprintf(logstring, "Associate Remote SUA(& SCTP) instance nr %d with local SUA(& SCTP) instance nr %d", i, instance[i].local_sua_id );
event_log("sua_database.c",logstring);
if (instance[i].Dest.addrs[0].sa.sa_family == AF_INET)
sua_portnumber = instance[i].Dest.addrs[0].sin.sin_port;
else if (instance[i].Dest.addrs[0].sa.sa_family == AF_INET6)
sua_portnumber = instance[i].Dest.addrs[0].sin6.sin6_port;
ULPData[0].maximumStreamID = -1;
short unsigned instance_name = instance[i].SCTP_instance_name ;
instance[i].SCTP_assoc_id =
sctp_associate( instance_name,
instance[i].nr_of_outbound_streams,
instance[i].Dest.address_string[0],
sua_portnumber,
NULL
);
/* no msg queued, mark assoc down(from sua management viewpoint)*/
instance[i].asp.status = asp_down;
char logstring[100];
sprintf(logstring, "Associate Remote SUA(& SCTP) instance nr %d with local SUA(& SCTP) instance nr %d", i, instance[i].local_sua_id );
event_log("sua_database.c",logstring);
if (instance[i].Dest.addrs[0].sa.sa_family == AF_INET)
sua_portnumber = instance[i].Dest.addrs[0].sin.sin_port;
else if (instance[i].Dest.addrs[0].sa.sa_family == AF_INET6)
sua_portnumber = instance[i].Dest.addrs[0].sin6.sin6_port;
ULPData[0].maximumStreamID = -1;
instance[i].SCTP_instance_name = local_sua.instance[instance[i].local_sua_id].SCTP_instance_name ;
instance[i].SCTP_assoc_id =
sctp_associate( instance[i].SCTP_instance_name,
instance[i].nr_of_outbound_streams,
instance[i].Dest.address_string[0],
sua_portnumber,
NULL
);
/* no msg queued, mark assoc down(from sua management viewpoint)*/
instance[i].asp.status = asp_down;
#ifdef DEBUG
cout << "SCTP association result = " << instance[i].SCTP_assoc_id <<" \n";
cout << "SCTP association result = " << instance[i].SCTP_assoc_id <<" \n";
#endif
}
remote_sua.instance[instance[i].remote_sua_id].ssn.ssn = local_sua.instance[instance[i].local_sua_id].ssn.ssn;
}
}
return(0);
};
@ -420,7 +330,7 @@ Find_association( unsigned int sctp_assoc_id,
result = (instance[i].SCTP_assoc_id == sctp_assoc_id);
if (result) {
Local_sua_id = instance[i].local_sua_id;
Remote_sua_id = instance[i].remote_sua_id;
/*Remote_sua_id = instance[i].remote_sua_id;*/
sua_assoc_id = i;
}
i++;
@ -434,109 +344,75 @@ Find_association( unsigned int sctp_assoc_id,
/* Sua_AssociationList::passive_associate */
/***********************************************************************/
unsigned int db_Sua_AssociationList::
passive_associate( unsigned int assoc_id,
passive_associate( unsigned int sctp_assoc_id,
db_Sua_LocalList &local_sua,
db_Sua_RemoteList &remote_sua,
unsigned short nr_of_dest_addr,
unsigned short nr_of_input_streams,
unsigned short nr_of_output_streams
){
)
{
SCTP_AssociationStatus status;
SCTP_Path_Status path_x_status;
int result;
short k;
int bla;
short i = 1, assoc_instance_idx = 1;
bool cont, partial_assoc_found = FALSE;
short k, j;
short i = 1, assoc_instance_idx = 0;
bool assoc_found = FALSE;
bool found_addr;
while ((i <= num_of_instance) && !(partial_assoc_found)){
partial_assoc_found = (instance[i].Dest.nr_of_addrs == 0);
if (partial_assoc_found)
assoc_instance_idx = i;
i++;
}
if (!(partial_assoc_found))
{
/* new association added */
num_of_instance++;
assoc_instance_idx = num_of_instance;
instance[assoc_instance_idx].Source = instance[assoc_instance_idx-1].Source;
instance[assoc_instance_idx].nr_of_inbound_streams = nr_of_input_streams ;
instance[assoc_instance_idx].nr_of_outbound_streams = nr_of_input_streams ;
}
remote_sua.increase_instance();
instance[assoc_instance_idx].SCTP_assoc_id = assoc_id;
instance[assoc_instance_idx].remote_sua_id = remote_sua.num_of_instance;
remote_sua.instance[remote_sua.num_of_instance].ssn.ssn = local_sua.instance[local_sua.num_of_instance].ssn.ssn;
// should search for the correct sua local instance(future)
instance[assoc_instance_idx].local_sua_id = local_sua.num_of_instance;
#ifdef DEBUG
cout << "Associate remote SUA(& SCTP) instance nr " << assoc_id << " with local SUA(& SCTP) instance nr " << assoc_instance_idx << " \n";
#endif
char logstring[100];
sprintf(logstring, "Associate Remote SUA(& SCTP) instance nr %d with local SUA(& SCTP) instance nr %d", assoc_id, assoc_instance_idx );
event_log("sua_database.c",logstring);
result = sctp_getAssocStatus( instance[assoc_instance_idx].SCTP_assoc_id,
result = sctp_getAssocStatus( sctp_assoc_id,
&status
);
/* conversion and fill in the destination address */
instance[assoc_instance_idx].Dest.nr_of_addrs = nr_of_dest_addr;
for(k=0; k < instance[assoc_instance_idx].Dest.nr_of_addrs ; k++)
{
result = sctp_getPathStatus( instance[assoc_instance_idx].SCTP_assoc_id,
k,
&path_x_status
);
instance[assoc_instance_idx].Dest.address_string[k] = path_x_status.destinationAddress;
instance[assoc_instance_idx].Dest.addrs[k].sin.sin_port = status.destPort;
}
/* try to figure out ipv4 or v6 address family: get it from the source address */
k = 0;
instance[assoc_instance_idx].Dest.addrs[0].sa.sa_family = AF_LOCAL;
cont = true;
while ((k < 24) && (cont))
{
if (instance[assoc_instance_idx].Dest.address_string[0][k] == '.')
{
cont = false;
instance[assoc_instance_idx].Dest.addrs[0].sa.sa_family = AF_INET;
while ((i <= num_of_instance) && !(assoc_found)){
assoc_found = (instance[i].Dest.nr_of_addrs == status.numberOfAddresses);
if (assoc_found)
{
k = 0;
found_addr = false;
while ((k < instance[i].Dest.nr_of_addrs) && (!found_addr))
{
j=0;
found_addr = true;
while (instance[i].Dest.address_string[k][j] != '\0'){
found_addr = found_addr && (instance[i].Dest.address_string[k][j] == status.primaryDestinationAddress[j]) ;
j++;
}
k++;
}
if (found_addr){
assoc_found = ( found_addr && (instance[i].Dest.addrs[0].sin.sin_port == status.destPort));
assoc_instance_idx = i;
}
if (instance[assoc_instance_idx].Dest.address_string[0][k] == ':')
{
cont = false;
instance[assoc_instance_idx].Dest.addrs[0].sa.sa_family = AF_INET6;
}
k++;
}
else
assoc_found = false;
}
i++;
}
for(k=0; k < instance[assoc_instance_idx].Dest.nr_of_addrs ; k++)
if (!(assoc_found))
{
if (instance[assoc_instance_idx].Dest.addrs[k].sa.sa_family == AF_INET)
bla = inet_pton( instance[assoc_instance_idx].Dest.addrs[k].sa.sa_family,
(char *)instance[assoc_instance_idx].Dest.address_string[k],
&instance[assoc_instance_idx].Dest.addrs[k].sin.sin_addr
);
else if (instance[assoc_instance_idx].Dest.addrs[k].sa.sa_family == AF_INET6)
bla = inet_pton( instance[assoc_instance_idx].Dest.addrs[k].sa.sa_family,
(char *)instance[assoc_instance_idx].Dest.address_string[k],
&instance[assoc_instance_idx].Dest.addrs[k].sin6.sin6_addr
);
else
cout << "Unsupported address family in passive associate\n";
/* unknown association added */
/* not allowed: drop it */
assoc_instance_idx = 0;
result = sctp_abort(sctp_assoc_id);
}
else
{
/* known association: no problemo */
instance[assoc_instance_idx].SCTP_assoc_id = sctp_assoc_id;
instance[assoc_instance_idx].remote_sua_id = 0;
remote_sua.instance[remote_sua.num_of_instance].ssn.ssn = local_sua.instance[instance[assoc_instance_idx].local_sua_id].ssn.ssn;
/* no msg queued, mark assoc down(from sua management viewpoint)*/
instance[assoc_instance_idx].asp.status = asp_down;
#ifdef DEBUG
cout << "Associate remote SUA(& SCTP) instance nr " << sctp_assoc_id << " with local SUA(& SCTP) instance nr " << assoc_instance_idx << " \n";
#endif
char logstring[100];
sprintf(logstring, "Associate Remote SUA(& SCTP) instance nr %d with local SUA(& SCTP) instance nr %d", sctp_assoc_id, assoc_instance_idx );
event_log("sua_database.c",logstring);
/* no msg queued, mark assoc down(from sua management viewpoint)*/
instance[assoc_instance_idx].asp.status = asp_down;
}
return(assoc_instance_idx);
}
@ -565,150 +441,6 @@ short db_Sua_AssociationList:: shutdown(){
return(0);
};
/***********************************************************************/
/* Sua_AssociationList::route_on_IPpc */
/***********************************************************************/
signed int db_Sua_AssociationList::
route_on_IPpc ( ipvxunion& dest_pc,
ipvxunion& org_pc,
int& sua_assoc_id
)
{
int j=0,i=1,count, addr_start, addr_stop;
unsigned int sctp_assoc_id = 0;
sua_assoc_id = 0;
bool cont = (i <= num_of_instance);
bool found_assoc = false;
while (cont)
{
found_assoc = false;
j = 0;
while ((j < instance[i].Dest.nr_of_addrs) && (!found_assoc))
{
found_assoc = (dest_pc.sa.sa_family == instance[i].Dest.addrs[j].sa.sa_family);
if (dest_pc.sa.sa_family == AF_INET)
{
addr_start = 4;
addr_stop = addr_start + 4;
}
else if (dest_pc.sa.sa_family == AF_INET6)
{
addr_start = 8;
addr_stop = addr_start + 16;
}
else
{
addr_start = 0;
addr_stop = 0;
found_assoc = false;
cout << "ERROR route_on_IPpc: Unknown addresstype\n";
}
/* compare the address family field */
found_assoc = found_assoc && (dest_pc.ch[1] == instance[i].Dest.addrs[j].ch[1]);
/* compare the ipv4/ipv6 address field */
for (count = addr_start; count < addr_stop; count++)
{
found_assoc = found_assoc
&& (dest_pc.ch[count] == instance[i].Dest.addrs[j].ch[count]);
}
j++;
}
if (found_assoc)
{
cont = false;
sctp_assoc_id = instance[i].SCTP_assoc_id;
sua_assoc_id = i;
#ifdef DEBUG
cout << "Found Sua association " << i << " with SCTP assoc " << sctp_assoc_id << "\n";
if (dest_pc.sa.sa_family == AF_INET)
{
cout << "CLD ip v4 = " << dest_pc.sin.sin_addr.s_addr << "\n";
cout << "Remote IP = " << instance[i].Dest.addrs[0].sin.sin_addr.s_addr << "\n";
}
else if (dest_pc.sa.sa_family == AF_INET6)
{
cout << "CLD ip v6 = " << dest_pc.sin6.sin6_addr.s6_addr << "\n";
cout << "Remote IP = " << instance[i].Dest.addrs[0].sin6.sin6_addr.s6_addr << "\n";
}
else
cout << "Unknown CLD IP address type format\n";
#endif
}
else
{
i++;
cont = (i <= num_of_instance);
}
}
return(sctp_assoc_id);
};
/***********************************************************************/
/* Sua_AssociationList::route_on_SS7pc */
/***********************************************************************/
signed int db_Sua_AssociationList::
route_on_SS7pc ( SS7union& dest_pc,
SS7union& org_pc,
int& sua_assoc_id
)
{
int i=1;
unsigned int sctp_assoc_id = 0;
#ifdef DEBUG
cout << "route on SS7 PC\n";
cout << "PC family = " << dest_pc.ITU24.family << "\n";
cout << "PC value = " << dest_pc.ITU24.pc << "\n";
#endif
sua_assoc_id = 0;
bool cont = (i <= num_of_instance);
bool found_assoc = false;
while (cont)
{
if (dest_pc.ITU14.family == ITU14bit) // standard ITU: 14 bits
found_assoc = ((dest_pc.ITU14.pc == instance[i].Dest.pc.ITU14.pc));
else if (dest_pc.ITU24.family == ITU24bit) // chinese PC length: 24 bits
found_assoc = ((dest_pc.ITU24.pc == instance[i].Dest.pc.ITU24.pc));
else if (dest_pc.ANSI24.family == ANSI24bit) // ANSI PC length: 24 bits
found_assoc = ((dest_pc.ANSI24.pc == instance[i].Dest.pc.ANSI24.pc));
else
found_assoc = false;
if (found_assoc)
{
cont = false;
sctp_assoc_id = instance[i].SCTP_assoc_id;
sua_assoc_id = i;
#ifdef DEBUG
cout << "Found Sua association " << i << " with SCTP assoc " << sctp_assoc_id << "\n";
cout << "CLD SS7 PC = " << dest_pc.ITU24.pc << "\n";
cout << "Remote PC = " << instance[i].Dest.pc.ITU24.pc << "\n";
#endif
}
else
{
i++;
cont = (i <= num_of_instance);
}
}
return(sctp_assoc_id);
};
/***********************************************************************/
/* Sua_AssociationList::increase_instance */
/***********************************************************************/
@ -770,6 +502,21 @@ void db_Sua_AssociationList::up( unsigned int sua_assoc_id,
/***********************************************************************/
/* Sua_DatabaseList */
/***********************************************************************/
/***********************************************************************/
/* Sua_DatabaseList::initalize */
/***********************************************************************/
void db_Sua_DatabaseList::
initialize( )
{
/* init all parts of the SUA database */
local_sua.initialize();
remote_sua.initialize();
AssocDB.initialize();
NameDB.initialize();
ApplicServ.initialize();
}
/***********************************************************************/
/* Sua_DatabaseList::Find_local_sua */
/***********************************************************************/
@ -778,21 +525,19 @@ Find_local_sua( sccp_addr_str& local_address
)
{
pointcode_str dest_pc;
short i = 1, j = 0, count, addr_start, addr_stop;
short i = 1, j = 0, k, count, addr_start, addr_stop;
unsigned int Local_sua_id = 0;
bool result = FALSE;
while ((i < db_MAX_REMOTE_SUA) && !(result) && (AssocDB.instance[i].Source.nr_of_addrs != 0))
while ((i < db_MAX_LOCAL_SUA) && !(result))
{
j = 0;
while ((j < AssocDB.instance[i].Source.nr_of_addrs) && !(result))
while ((j < local_sua.instance[i].Source.nr_of_addrs) && !(result))
{
/*result = ((AssocDB.instance[i].Source.addrs[j].sin.sin_addr.s_addr == local_address.pc.ipvx.sin.sin_addr.s_addr) ||
(AssocDB.instance[i].Source.addrs[j].sin6.sin6_addr.s6_addr == local_address.pc.ipvx.sin6.sin6_addr.s6_addr));
*/
/* check IP address */
if (local_address.address_fields_present.pc == ipvx_pc_present)
{
result = (local_address.pc.ipvx.sa.sa_family == AssocDB.instance[i].Source.addrs[j].sa.sa_family);
result = (local_address.pc.ipvx.sa.sa_family == local_sua.instance[i].Source.addrs[j].sa.sa_family);
if (local_address.pc.ipvx.sa.sa_family == AF_INET)
{
addr_start = 4;
@ -812,25 +557,26 @@ Find_local_sua( sccp_addr_str& local_address
}
/* compare the address family field */
result = result &&
(local_address.pc.ipvx.ch[1] == AssocDB.instance[i].Source.addrs[j].ch[1]);
(local_address.pc.ipvx.ch[1] == local_sua.instance[i].Source.addrs[j].ch[1]);
/* compare the ipv4/ipv6 address field */
for (count = addr_start; count < addr_stop; count++)
{
result = result &&
(local_address.pc.ipvx.ch[count] == AssocDB.instance[i].Source.addrs[j].ch[count]);
(local_address.pc.ipvx.ch[count] == local_sua.instance[i].Source.addrs[j].ch[count]);
}
}
/* check SS7 pointcode */
else if (local_address.address_fields_present.pc == ss7_pc_present)
{
result = (local_address.pc.ss7.ITU14.family == AssocDB.instance[i].Source.pc.ITU14.family);
result = (local_address.pc.ss7.ITU14.family == local_sua.instance[i].Source.pc.ITU14.family);
if (((local_address.pc.ss7.ITU14.family == ITU14bit) ||
(local_address.pc.ss7.ITU14.family == ITU24bit)) ||
(local_address.pc.ss7.ITU14.family == ANSI24bit))
{
/* compare the ITU 14/24bit or ANSI 24bit PC address field */
result = result &&
(local_address.pc.ss7.ITU14.pc == AssocDB.instance[i].Source.pc.ITU14.pc);
(local_address.pc.ss7.ITU14.pc == local_sua.instance[i].Source.pc.ITU14.pc);
}
else
{
@ -838,6 +584,7 @@ Find_local_sua( sccp_addr_str& local_address
cout << "ERROR Find_local_sua: Unknown SS7 pointcode addresstype\n";
}
}
/* check hostname */
else if (local_address.address_fields_present.name_gt == hostname_present)
{
count = 0;
@ -845,7 +592,7 @@ Find_local_sua( sccp_addr_str& local_address
dest_pc
);
result = (dest_pc.ipvx.sa.sa_family == AssocDB.instance[i].Source.addrs[j].sa.sa_family);
result = (dest_pc.ipvx.sa.sa_family == local_sua.instance[i].Source.addrs[j].sa.sa_family);
if (dest_pc.ipvx.sa.sa_family == AF_INET)
{
@ -870,14 +617,26 @@ Find_local_sua( sccp_addr_str& local_address
for (count = addr_start; count < addr_stop; count++)
{
result = result &&
(dest_pc.ipvx.ch[count] == AssocDB.instance[i].Source.addrs[j].ch[count]);
(dest_pc.ipvx.ch[count] == local_sua.instance[i].Source.addrs[j].ch[count]);
k++;
}
}
/* check global title */
else if (local_address.address_fields_present.name_gt == GT_present)
{
cout << "ERROR Find_local_sua: GT code not implemented yet\n";
cout << "Find_local_sua: Global Title\n";
result =
(local_address.name.GT.nr_of_digits == local_sua.instance[i].Name.GT.nr_of_digits) &&
( local_address.name.GT.Translation_Type == local_sua.instance[i].Name.GT.Translation_Type) &&
( local_address.name.GT.Numbering_Plan == local_sua.instance[i].Name.GT.Numbering_Plan) &&
( local_address.name.GT.Nature_of_Address == local_sua.instance[i].Name.GT.Nature_of_Address) ;
for (k = 0; k < local_address.name.GT.nr_of_digits; k++)
{
result = result &&
( local_address.name.GT.digits[k] == local_sua.instance[i].Name.GT.digits[k]);
}
cout << "i = " << i << " Find_local_sua = " << result << "\n";
}
else
{
@ -887,9 +646,9 @@ Find_local_sua( sccp_addr_str& local_address
if (result)
{
Local_sua_id = AssocDB.instance[i].local_sua_id;
Local_sua_id = i;
#ifdef DEBUG
cout << "Find_local_sua: local_sua_id = " << Local_sua_id << " , instance "<< i << "\n";
cout << "Find_local_sua: local_sua_id = " << Local_sua_id << "\n";
#endif
}
j++;
@ -900,6 +659,154 @@ Find_local_sua( sccp_addr_str& local_address
return(Local_sua_id);
};
/***********************************************************************/
/* Sua_DatabaseList::route_on_IPpc */
/***********************************************************************/
signed int db_Sua_DatabaseList::
route_on_IPpc ( ipvxunion& dest_pc,
ipvxunion& org_pc,
int& sua_assoc_id
)
{
int j=0,i=1,count, addr_start, addr_stop;
unsigned int sctp_assoc_id = 0;
sua_assoc_id = 0;
bool cont = (i <= remote_sua.num_of_instance);
bool found_assoc = false;
while (cont)
{
found_assoc = false;
j = 0;
while ((j < remote_sua.instance[i].Dest.nr_of_addrs) && (!found_assoc))
{
found_assoc = (dest_pc.sa.sa_family == remote_sua.instance[i].Dest.addrs[j].sa.sa_family);
if (dest_pc.sa.sa_family == AF_INET)
{
addr_start = 4;
addr_stop = addr_start + 4;
}
else if (dest_pc.sa.sa_family == AF_INET6)
{
addr_start = 8;
addr_stop = addr_start + 16;
}
else
{
addr_start = 0;
addr_stop = 0;
found_assoc = false;
cout << "ERROR route_on_IPpc: Unknown addresstype\n";
}
/* compare the address family field */
found_assoc = found_assoc && (dest_pc.ch[1] == remote_sua.instance[i].Dest.addrs[j].ch[1]);
/* compare the ipv4/ipv6 address field */
for (count = addr_start; count < addr_stop; count++)
{
found_assoc = found_assoc
&& (dest_pc.ch[count] == remote_sua.instance[i].Dest.addrs[j].ch[count]);
}
j++;
}
if (found_assoc)
{
cont = false;
sua_assoc_id = remote_sua.instance[i].SUA_assoc_id;
sctp_assoc_id = AssocDB.instance[remote_sua.instance[i].SUA_assoc_id].SCTP_assoc_id;
#ifdef DEBUG
cout << "Remote sua " << i << " Sua association " << sua_assoc_id << " with SCTP assoc " << sctp_assoc_id << "\n";
if (dest_pc.sa.sa_family == AF_INET)
{
cout << "CLD ip v4 = " << dest_pc.sin.sin_addr.s_addr << "\n";
cout << "Remote IP = " << remote_sua.instance[i].Dest.addrs[0].sin.sin_addr.s_addr << "\n";
}
else if (dest_pc.sa.sa_family == AF_INET6)
{
cout << "CLD ip v6 = " << dest_pc.sin6.sin6_addr.s6_addr << "\n";
cout << "Remote IP = " << remote_sua.instance[i].Dest.addrs[0].sin6.sin6_addr.s6_addr << "\n";
}
else
cout << "Unknown CLD IP address type format\n";
#endif
}
else
{
i++;
cont = (i <= remote_sua.num_of_instance);
}
}
return(sctp_assoc_id);
}
/***********************************************************************/
/* Sua_DatabaseList::route_on_SS7pc */
/***********************************************************************/
signed int db_Sua_DatabaseList::
route_on_SS7pc ( SS7union& dest_pc,
SS7union& org_pc,
int& sua_assoc_id
)
{
int i=1;
unsigned int sctp_assoc_id = 0;
#ifdef DEBUG
cout << "route on SS7 PC\n";
cout << "PC family = " << dest_pc.ITU24.family << "\n";
cout << "PC value = " << dest_pc.ITU24.pc << "\n";
#endif
sua_assoc_id = 0;
bool cont = (i <= remote_sua.num_of_instance);
bool found_assoc = false;
while (cont)
{
if (dest_pc.ITU14.family == ITU14bit) // standard ITU: 14 bits
found_assoc = ((dest_pc.ITU14.pc == remote_sua.instance[i].Dest.pc.ITU14.pc));
else if (dest_pc.ITU24.family == ITU24bit) // chinese PC length: 24 bits
found_assoc = ((dest_pc.ITU24.pc == remote_sua.instance[i].Dest.pc.ITU24.pc));
else if (dest_pc.ANSI24.family == ANSI24bit) // ANSI PC length: 24 bits
found_assoc = ((dest_pc.ANSI24.pc == remote_sua.instance[i].Dest.pc.ANSI24.pc));
else
found_assoc = false;
if (found_assoc)
{
cont = false;
sua_assoc_id = remote_sua.instance[i].SUA_assoc_id;
sctp_assoc_id = AssocDB.instance[remote_sua.instance[i].SUA_assoc_id].SCTP_assoc_id;
#ifdef DEBUG
cout << "Remote sua " << i << " Sua association " << sua_assoc_id << " with SCTP assoc " << sctp_assoc_id << "\n";
cout << "CLD SS7 PC = " << dest_pc.ITU24.pc << "\n";
cout << "Remote PC = " << remote_sua.instance[i].Dest.pc.ITU24.pc << "\n";
#endif
}
else
{
i++;
cont = (i <= remote_sua.num_of_instance);
}
}
return(sctp_assoc_id);
}
/***********************************************************************/
/* Sua_DatabaseList::route_on_GTname */
/***********************************************************************/
@ -927,10 +834,10 @@ route_on_GTname ( hostname_str& dest_name,
org_pc
); */
sctp_assoc_id = AssocDB.route_on_IPpc( dest_pc.ipvx,
org_pc.ipvx,
sua_assoc_id
);
sctp_assoc_id = route_on_IPpc( dest_pc.ipvx,
org_pc.ipvx,
sua_assoc_id
);
if (sctp_assoc_id != 0 )
return(sctp_assoc_id);
@ -965,10 +872,10 @@ route_on_GTT ( global_title_str& dest_gt,
dest_pc
);
sctp_assoc_id = AssocDB.route_on_IPpc( dest_pc.ipvx,
org_pc.ipvx,
sua_assoc_id
);
sctp_assoc_id = route_on_IPpc( dest_pc.ipvx,
org_pc.ipvx,
sua_assoc_id
);
if (sctp_assoc_id != 0 )
return(sctp_assoc_id);
@ -992,16 +899,17 @@ route_msg( sccp_addr_str& cld,
sua_assoc_id = 0;
#ifdef DEBUG
cout << "num_of_instance : "<< AssocDB.num_of_instance << "\n";
cout << "number of associations instances= : "<< AssocDB.num_of_instance << "\n";
cout << "number of remote sua instances= : "<< remote_sua.num_of_instance << "\n";
#endif
if ((cld.address_fields_present.pc == ipvx_pc_present) &&
(cld.routing_ind == route_on_ssn))
{
sctp_assoc_id = AssocDB.route_on_IPpc( cld.pc.ipvx,
clg.pc.ipvx,
sua_assoc_id
);
sctp_assoc_id = route_on_IPpc( cld.pc.ipvx,
clg.pc.ipvx,
sua_assoc_id
);
}
else if ((cld.address_fields_present.name_gt == hostname_present) &&
(cld.routing_ind == route_on_name_gt))
@ -1027,18 +935,18 @@ route_msg( sccp_addr_str& cld,
(cld.address_fields_present.pc == ipvx_pc_present) &&
(cld.routing_ind == route_on_name_gt_next_office))
{
sctp_assoc_id = AssocDB.route_on_IPpc( cld.pc.ipvx,
clg.pc.ipvx,
sua_assoc_id
);
sctp_assoc_id = route_on_IPpc( cld.pc.ipvx,
clg.pc.ipvx,
sua_assoc_id
);
}
else if ((cld.address_fields_present.pc == ss7_pc_present) &&
(cld.routing_ind == route_on_ssn))
{
sctp_assoc_id = AssocDB.route_on_SS7pc( cld.pc.ss7,
clg.pc.ss7,
sua_assoc_id
);
sctp_assoc_id = route_on_SS7pc( cld.pc.ss7,
clg.pc.ss7,
sua_assoc_id
);
}
else
{

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_debug.h,v 1.5 2002/11/12 11:02:49 p82609 Exp $
* $Id: sua_debug.h,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_distribution.cpp,v 1.7 2002/11/12 11:02:49 p82609 Exp $
* $Id: sua_distribution.cpp,v 1.3 2003/01/27 16:47:43 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*
@ -287,6 +287,7 @@ void sctp_DataArriveNotif( unsigned int sctp_assoc_id,
else
cout << "ERROR: TCB " << Sua_ConnId << " was not retrieved?!!\n";
break;
}
case co_data /*data*/:
{
@ -389,6 +390,7 @@ void sctp_DataArriveNotif( unsigned int sctp_assoc_id,
else
cout << "ERROR: TCB " << Sua_ConnId << " was not retrieved?!!\n";
break;
}
default:
{
@ -944,9 +946,12 @@ void *sctp_CommunicationUpNotif( unsigned int sctp_assoc_id,
cout << "sua_distribution.c:should send ASPUP\n";
#endif
#ifndef SG_MODE
/* send ASP-UP to remote to start activating local & remote ASP */
result = sua_send_ASPUP( sua_assoc_id
);
if (sua_assoc_id != 0)
{
/* send ASP-UP to remote to start activating local & remote ASP */
result = sua_send_ASPUP( sua_assoc_id
);
}
#endif
#endif

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_distribution.h,v 1.2 2002/10/15 14:53:48 p82609 Exp $
* $Id: sua_distribution.h,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_file.h,v 1.2 2002/11/12 11:02:49 p82609 Exp $
* $Id: sua_file.h,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*
@ -70,8 +70,8 @@ int read_sua_file(string filename,
);
int read_sua_conf_file( string filename,
db_Sua_DatabaseList sua
int read_sua_conf_file( string filename,
db_Sua_DatabaseList &sua
);
#endif // SUA_FILE_H

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_logging.cpp,v 1.1.1.1 2002/02/04 14:30:41 p82609 Exp $
* $Id: sua_logging.cpp,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_logging.h,v 1.1.1.1 2002/02/04 14:30:41 p82609 Exp $
* $Id: sua_logging.h,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_snm_mgnt.cpp,v 1.1 2002/11/12 11:04:12 p82609 Exp $
* $Id: sua_snm_mgnt.cpp,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 14.
*

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_snm_mgnt.h,v 1.1 2002/11/12 11:04:12 p82609 Exp $
* $Id: sua_snm_mgnt.h,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 14.
*

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_sual.cpp,v 1.2 2002/04/11 14:13:34 p82609 Exp $
* $Id: sua_sual.cpp,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*
@ -422,8 +422,7 @@ extern sual_InstId_t sual_RegisterSUAL_instance ( sual_port_t local_ssn,
ULP_CallbackFunctions.ulp_DisConnIndNotif = &SUAL_DisConnIndNotif;
// register all the local SUA together with their SCTP instances
res = sua_registerInstance( local_ssn,
ULP_CallbackFunctions
res = sua_registerInstance( ULP_CallbackFunctions
);
return(0);

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_sual.h,v 1.1.1.1 2002/02/04 14:30:41 p82609 Exp $
* $Id: sua_sual.h,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_syntax.cpp,v 1.2 2002/11/12 11:02:49 p82609 Exp $
* $Id: sua_syntax.cpp,v 1.5 2003/02/17 14:38:08 p82609 Exp $
*
* SUA implementation according to SUA draft issue 8.
*
@ -467,7 +467,8 @@ boolean encode_addr (string& msg, Sua_address_struct& address) {
/* Routing indicator : in this version only route on IP, hostname and SSN is allowed */
if ((address.rout_ind != ri_route_IP_SSN) &&
(address.rout_ind != ri_route_PC_SSN) &&
(address.rout_ind != ri_route_hostname)) {
(address.rout_ind != ri_route_hostname) &&
(address.rout_ind != ri_route_GT)) {
/* Signal error : invalid routing indicator used */
SYNTAX_ERR.msg_index = pdu_index;
SYNTAX_ERR.error_text = "Encoding : Invalid routing indicator";
@ -586,7 +587,8 @@ boolean encode_addr (string& msg, Sua_address_struct& address) {
} // Endif
else if (address.hostname_pres){
msg.resize(pdu_index + address.hostname.length() + 2 + 4);
short padding = (4 - ((pdu_index + address.hostname.length() + 6 ) % 4)) % 4;
msg.resize(pdu_index + address.hostname.length() + 2 + 4 + padding);
OVERLAY.dw[0] = htons(0x8005);
msg[pdu_index] = OVERLAY.db[0];
pdu_index++;
@ -637,8 +639,75 @@ boolean encode_addr (string& msg, Sua_address_struct& address) {
int mod_nr = 0;
if ((mod_nr = pdu_index % 4) != 0)
{
OVERLAY.dw[0] = htons(0x0000);;
for (i=0; i < (4 - mod_nr); i++) {
msg[pdu_index] = OVERLAY.db[0];
pdu_index++;
}
}
}
// Endif
else if (address.gt_pres){
short gt_length = ((address.gt.nr_of_digits/2) + (address.gt.nr_of_digits % 2) + 4 + 4 + 4);
short padding = (4 - ((pdu_index + gt_length) % 4)) % 4;
msg.resize(pdu_index + gt_length + padding);
OVERLAY.dw[0] = htons(0x8001);
msg[pdu_index] = OVERLAY.db[0];
pdu_index++;
msg[pdu_index] = OVERLAY.db[1];
pdu_index++;
OVERLAY.dw[1] = htons(gt_length);
msg[pdu_index] = OVERLAY.db[2];
pdu_index++;
msg[pdu_index] = OVERLAY.db[3];
pdu_index++;
/* GTI */
OVERLAY.dw[0] = htons(0x0000);
msg[pdu_index] = OVERLAY.db[0];
pdu_index++;
msg[pdu_index] = OVERLAY.db[1];
pdu_index++;
OVERLAY.dw[1] = htons(0x0004);
msg[pdu_index] = OVERLAY.db[2];
pdu_index++;
msg[pdu_index] = OVERLAY.db[3];
pdu_index++;
/* nr of digits , TT, NP and NA */
OVERLAY.dw[0] = address.gt.nr_of_digits;
msg[pdu_index] = OVERLAY.db[0];
pdu_index++;
OVERLAY.dw[0] = address.gt.translation_type;
msg[pdu_index] = OVERLAY.db[0];
pdu_index++;
OVERLAY.dw[0] = address.gt.num_plan;
msg[pdu_index] = OVERLAY.db[0];
pdu_index++;
OVERLAY.dw[0] = address.gt.nat_addr;
msg[pdu_index] = OVERLAY.db[0];
pdu_index++;
/* put digits in msg */
int i;
int last= (address.gt.nr_of_digits/2) + (address.gt.nr_of_digits%2);
for (i= 0; i < last; i++)
{
/* put in digit N + 1 and digit N */
if (((2*i)+1) >= address.gt.nr_of_digits)
OVERLAY.dw[0] = htons(0x0000);
else
OVERLAY.dw[0] = 16 * (address.gt.digits[(2*i)+1] % 16);
OVERLAY.dw[0] = OVERLAY.dw[0] + (address.gt.digits[(2*i)] % 16);
msg[pdu_index] = OVERLAY.db[0];
pdu_index++;
}
/* end of Global Title */
/* padding out up a 32 bit boundary */
int mod_nr = 0;
if ((mod_nr = pdu_index % 4) != 0)
{
OVERLAY.dw[0] = htons(0x0000);
for (i=0; i < (4 - mod_nr); i++) {
OVERLAY.dw[0] = htons(0x0000);;
msg[pdu_index] = OVERLAY.db[0];
pdu_index++;
}
@ -2220,7 +2289,7 @@ boolean decode_hop_count (Sua_primitive_struct& prim, string& msg, unsigned int&
boolean decode_addr (Sua_address_struct& addr, string& msg, unsigned int& pdu_index) {
unsigned int next_tag_pdu_idx = 0;
int j = 0;
int j = 0, last = 0;
unsigned int numchar = 0;
bool look_for_next_label = FALSE;
/* Get the parameter length */
@ -2238,7 +2307,8 @@ boolean decode_addr (Sua_address_struct& addr, string& msg, unsigned int& pdu_in
/* Check validity of routing indicator, only route on IP and SSN is supported */
if ((pdu_word != uint16_t(ri_route_IP_SSN)) &&
(pdu_word != uint16_t(ri_route_PC_SSN)) &&
(pdu_word != uint16_t(ri_route_hostname))){
(pdu_word != uint16_t(ri_route_hostname)) &&
(pdu_word != uint16_t(ri_route_GT))){
/* Signal error : routing indicator not supported */
SYNTAX_ERR.msg_index = pdu_index;
SYNTAX_ERR.error_text = "Decoding : Routing Indicator not supported";
@ -2274,13 +2344,51 @@ boolean decode_addr (Sua_address_struct& addr, string& msg, unsigned int& pdu_in
addr_par_tag = ntohs(OVERLAY.dw[0]);
switch (addr_par_tag) {
case 0x8001 :
/* Global Title not supported, so we jump over it */
/* Global Title */
addr_par_len += (4 - (addr_par_len % 4)) % 4; // don't forget padding bytes
pdu_index += addr_par_len; // next tag
addr.gt_pres = TRUE;
next_tag_pdu_idx = pdu_index + addr_par_len; // next tag
pdu_index += 4;
/* get GTI format */
OVERLAY.dq = 0;
OVERLAY.db[3] = msg[pdu_index + 3];
pdu_index += 4;
/* get nr-of-digits, translation type, */
/* numbering plan and nature-of-address */
OVERLAY.dq = 0;
OVERLAY.db[0] = msg[pdu_index + 0];
OVERLAY.db[1] = msg[pdu_index + 1];
OVERLAY.db[2] = msg[pdu_index + 2];
OVERLAY.db[3] = msg[pdu_index + 3];
addr.gt.nr_of_digits = OVERLAY.db[0];
addr.gt.translation_type = OVERLAY.db[1];
addr.gt.num_plan = OVERLAY.db[2];
addr.gt.nat_addr = OVERLAY.db[3];
pdu_index += 4;
/* put digits in msg */
OVERLAY.dq = 0;
last = (addr.gt.nr_of_digits/2) + (addr.gt.nr_of_digits%2);
for (int i= 0; i < last; i++)
{
OVERLAY.db[0] = msg[pdu_index];
/* get digit N + 1 and digit N out from msg */
addr.gt.digits[(2*i)+1] = (uint8_t) OVERLAY.db[0] / 16;
addr.gt.digits[(2*i)] = (uint8_t) OVERLAY.db[0] % 16;
pdu_index++;
}
/* end of Global Title */
/* set pdu_index onto next following tag of sua msg */
pdu_index = next_tag_pdu_idx;
if (par_len >= addr_par_len)
par_len -= addr_par_len; // adjust remaining parameter length
else
par_len = 0;
break;
case 0x8002 :
/* SS7 Point code , length 8 bytes */
@ -3772,6 +3880,16 @@ boolean decode_co_conn_req_msg (Sua_primitive_struct& prim, string& msg) {
return FALSE;
}
break;
case 0x0116 :
if (!prim.seq_control_pres)
no_error = decode_seq_ctrl (prim, msg, pdu_index);
else {
/* Signal error : duplicate parameter */
SYNTAX_ERR.msg_index = pdu_index;
SYNTAX_ERR.error_text = "Decoding : Duplicate Sequence ccontrol parameter";
return FALSE;
}
break;
default : {
/* Jump over this totally uninteresting parameter to next double word position */
par_len += (4 - (par_len % 4)) % 4;
@ -3905,6 +4023,16 @@ boolean decode_co_conn_ack_msg (Sua_primitive_struct& prim, string& msg) {
return FALSE;
}
break;
case 0x0116 :
if (!prim.seq_control_pres)
no_error = decode_seq_ctrl (prim, msg, pdu_index);
else {
/* Signal error : duplicate parameter */
SYNTAX_ERR.msg_index = pdu_index;
SYNTAX_ERR.error_text = "Decoding : Duplicate Sequence ccontrol parameter";
return FALSE;
}
break;
default : {
/* Jump over this totally uninteresting parameter to next double word position */
par_len += (4 - (par_len % 4)) % 4;

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_syntax.h,v 1.1.1.1 2002/02/04 14:30:41 p82609 Exp $
* $Id: sua_syntax.h,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 5.
*

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_tcb.cpp,v 1.2 2002/10/24 16:12:06 p82609 Exp $
* $Id: sua_tcb.cpp,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: sua_tcb.h,v 1.2 2002/10/24 16:12:06 p82609 Exp $
* $Id: sua_tcb.h,v 1.1 2003/01/14 14:15:37 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*

View File

@ -1,4 +1,7 @@
####### kdevelop will overwrite this part!!! (begin)##########
noinst_LIBRARIES = libtestup.a
libtestup_a_SOURCES = testuser.cpp main.cpp
EXTRA_DIST = main.cpp testuser.cpp testuser.h

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: main.cpp,v 1.2 2002/10/15 14:37:59 p82609 Exp $
* $Id: main.cpp,v 1.1 2003/01/14 13:47:56 p82609 Exp $
*
* SUA Test user part implementation.
*
@ -174,7 +174,7 @@ int sua_get_arguments(int argc, char **argv)
num_of_arg++;
sua_filename = argv[num_of_arg];
result = sua_read_config_file( argv[num_of_arg]);
break;
}
case 'i':
@ -292,8 +292,7 @@ int main(int argc, char **argv )
// register sua and its users
// register all the local SUA together with their SCTP instances
res = sua_registerInstance( 255,
SUACallbackFunctions
res = sua_registerInstance( SUACallbackFunctions
);
// initiate all the SUA associations with their respective peers
res = sua_associate();

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: testuser.cpp,v 1.7 2002/11/14 15:29:24 p82609 Exp $
* $Id: testuser.cpp,v 1.3 2003/05/27 14:12:34 p82609 Exp $
*
* SUA Test user part implementation.
*
@ -171,6 +171,7 @@ void init_testip_stdin()
calling_pty_addr.address_fields_present.field_in_header = include_nothing;
calling_pty_addr.pc.ipvx = pathinfo.local_addr.pc.ipvx;
calling_pty_addr.pc.ss7 = pathinfo.local_addr.pc.ss7;
/*calling_pty_addr.name.GT = pathinfo.local_addr.name.GT;*/
calling_pty_addr.ssn = pathinfo.local_addr.ssn;
calling_pty_addr.routing_ind = route_on_ssn;
calling_pty_addr.network_apperance = network_app;
@ -224,6 +225,7 @@ void testip_stdin_cb( int fd,
cout << " destaddr4: - set destination ipv4 address \n";
cout << " destname: - set destination hostname\n";
cout << " destpc: - set destination SS7 pointcode(decimal)\n";
cout << " destGT: - set destination Global Title\n";
cout << " some-other-string - send this Connectionless to destaddrx\n";
cout << " co:some-other-string - send this Connection-oriented\n";
cout << " disp mngt - display ASP status of remote nodes\n";
@ -392,8 +394,6 @@ void testip_stdin_cb( int fd,
cout << "Address of remote end stored. Msg will be sent to this one\n";
string addr2_str = own_hostname;
/*char *name2_char = new char [addr2_str.length()+1]; */
/*name2_char = shost_to_suaname ( addr2_str ); */
calling_pty_addr.address_fields_present.name_gt = hostname_present;
strcpy(calling_pty_addr.name.HostName, own_hostname);
@ -401,6 +401,33 @@ void testip_stdin_cb( int fd,
calling_pty_addr.routing_ind = route_on_name_gt;
cout << "DNS/SUA source hostname = " << addr2_str << "\n";
}
else if (cmdline.find("destGT:") != cmdline.npos)
{
/* get destination Global Title, convert it and store in cld */
string addr_str(cmdline, (cmdline.find("destGT:")+7),cmdline.length());
called_pty_addr.address_fields_present.pc = no_pc_present;
called_pty_addr.address_fields_present.name_gt = GT_present;
called_pty_addr.address_fields_present.ssn_port = ssn_present;
called_pty_addr.address_fields_present.field_in_header = include_nothing;
called_pty_addr.name.GT.Translation_Type = 0;
called_pty_addr.name.GT.Numbering_Plan = 0;
called_pty_addr.name.GT.Nature_of_Address = 0;
strcpy(called_pty_addr.name.GT.digits,addr_str.c_str());
called_pty_addr.name.GT.nr_of_digits= addr_str.length();
called_pty_addr.ssn = calling_pty_addr.ssn;
called_pty_addr.routing_ind = route_on_name_gt;
cout << "DNS/SUA dest Global Title = " << addr_str << "\n";
cout << "Address of remote end stored. Msg will be sent to this one\n";
calling_pty_addr.address_fields_present.name_gt = GT_present;
calling_pty_addr.ssn = 5;
calling_pty_addr.routing_ind = route_on_name_gt;
cout << "DNS/SUA source Global Title = " << calling_pty_addr.name.GT.digits << "\n";
}
else if (cmdline.find("destpc:") != cmdline.npos)
{
@ -445,10 +472,15 @@ void testip_stdin_cb( int fd,
calling_pty_addr.address_fields_present.ssn_port = called_pty_addr.address_fields_present.ssn_port;
calling_pty_addr.address_fields_present.field_in_header = called_pty_addr.address_fields_present.field_in_header ;
string addr3_str = own_hostname;
/*char *name3_char = new char [addr3_str.length()+1];*/
/*name3_char = shost_to_suaname ( addr3_str );*/
strcpy(calling_pty_addr.name.HostName, own_hostname);
if (calling_pty_addr.address_fields_present.name_gt == hostname_present)
{
string addr4_str = own_hostname;
strcpy(calling_pty_addr.name.HostName, own_hostname);
}
else if (calling_pty_addr.address_fields_present.name_gt == GT_present)
{
calling_pty_addr.name.GT = pathinfo.local_addr.name.GT;
}
calling_pty_addr.pc.ipvx = pathinfo.local_addr.pc.ipvx;
@ -498,13 +530,20 @@ void testip_stdin_cb( int fd,
calling_pty_addr.routing_ind = called_pty_addr.routing_ind;
calling_pty_addr.address_fields_present.ssn_port = called_pty_addr.address_fields_present.ssn_port;
calling_pty_addr.address_fields_present.field_in_header = called_pty_addr.address_fields_present.field_in_header;
string addr4_str = own_hostname;
strcpy(calling_pty_addr.name.HostName, own_hostname);
if (calling_pty_addr.address_fields_present.name_gt == hostname_present)
{
string addr4_str = own_hostname;
strcpy(calling_pty_addr.name.HostName, own_hostname);
}
else if (calling_pty_addr.address_fields_present.name_gt == GT_present)
{
calling_pty_addr.name.GT = pathinfo.local_addr.name.GT;
}
calling_pty_addr.pc.ipvx = pathinfo.local_addr.pc.ipvx;
calling_pty_addr.ssn = pathinfo.local_addr.ssn;
calling_pty_addr.pc.ss7 = pathinfo.local_addr.pc.ss7 ;
char *databuffer = new char[cmdline.length()];
cmdline.copy(databuffer, cmdline.length());

View File

@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
* $Id: testuser.h,v 1.2 2002/10/22 13:45:11 p82609 Exp $
* $Id: testuser.h,v 1.1 2003/01/14 13:47:56 p82609 Exp $
*
* SUA Test user part implementation.
*