aboutsummaryrefslogtreecommitdiffstats
path: root/sualibrary/sua/sua_database.h
diff options
context:
space:
mode:
Diffstat (limited to 'sualibrary/sua/sua_database.h')
-rw-r--r--sualibrary/sua/sua_database.h155
1 files changed, 106 insertions, 49 deletions
diff --git a/sualibrary/sua/sua_database.h b/sualibrary/sua/sua_database.h
index 7fce372..31d1119 100644
--- a/sualibrary/sua/sua_database.h
+++ b/sualibrary/sua/sua_database.h
@@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
- * $Id: sua_database.h,v 1.4 2002/03/01 12:57:38 p82609 Exp $
+ * $Id: sua_database.h,v 1.8 2002/11/12 11:02:49 p82609 Exp $
*
* SUA implementation according to SUA draft issue 8.
*
@@ -173,6 +173,60 @@ class db_Sua_AddressObject {
}; ///:~
/***********************************************************************/
+/* Sua_GlobalTitleObject */
+/***********************************************************************/
+class db_Sua_GlobalTitle {
+ public:
+ short Translation_Type;
+ short Numbering_Plan;
+ short Nature_of_Address;
+ /*short nr_of_digits;*/
+ string digits;
+}; ///:~
+
+/***********************************************************************/
+/* Sua_NameObject */
+/***********************************************************************/
+class db_Sua_NameObject {
+ public:
+ unsigned int SUA_assoc_id;
+ unsigned int sctp_assoc_id;
+ db_Sua_GlobalTitle GT;
+ string hostname;
+ public:
+ void initialize();
+
+}; ///:~
+
+/***********************************************************************/
+/* Sua_NameList */
+/***********************************************************************/
+class db_Sua_NameList{
+ public:
+ int num_of_instance;
+ db_Sua_NameObject instance[db_MAX_REMOTE_SUA];
+ public:
+ void initialize();
+ string read_host_name( unsigned int sua_assoc_id,
+ string name
+ );
+ void read_Global_Title( unsigned int sua_assoc_id,
+ string name
+ );
+ signed int resolve_host_name( hostname_str& dest_name,
+ pointcode_str& dest_pc
+ );
+ signed int perform_GTT( global_title_str& cld_in,
+ global_title_str& clg_in,
+ global_title_str& cld_out,
+ global_title_str& clg_out,
+ pointcode_str& dest_pc
+ );
+ void increase_instance();
+}; ///:~
+
+
+/***********************************************************************/
/* Sua_ApplicationServerProcessObject (ASP) */
/***********************************************************************/
class db_Sua_ASPObject {
@@ -285,6 +339,15 @@ 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,
@@ -295,8 +358,6 @@ class db_Sua_AssociationList{
unsigned int &Local_sua_id,
unsigned int &Remote_sua_id
);
- unsigned int Find_local_sua( sccp_addr_str& local_address
- );
short associate_instance( db_Sua_LocalList& local_sua,
db_Sua_RemoteList& remote_sua
);
@@ -317,72 +378,68 @@ class db_Sua_AssociationList{
);
short Terminate_remote_assoc_instance();
short shutdown();
- signed int resolve_host_name( hostname_str& dest_name,
- pointcode_str& dest_pc
- );
- signed int route_msg( sccp_addr_str& cld,
- sccp_addr_str& clg,
- int& sua_assoc_id
- );
signed int route_on_IPpc ( ipvxunion& dest_pc,
- ipvxunion& org_pc,
- int& sua_assoc_id
- );
+ ipvxunion& org_pc,
+ int& sua_assoc_id
+ );
signed int route_on_SS7pc ( SS7union& dest_pc,
- SS7union& org_pc,
- int& sua_assoc_id
- );
- signed int route_on_GTname ( hostname_str& dest_name,
- hostname_str& org_name,
- int& sua_assoc_id,
- pointcode_str& dest_pc,
- pointcode_str& org_pc
- );
+ SS7union& org_pc,
+ int& sua_assoc_id
+ );
void increase_instance();
bool activate( unsigned int sua_id,
short mode
- );
+ );
void deactivate( unsigned int sua_id,
short mode
- );
+ );
void down( unsigned int sua_id,
short mode
- );
+ );
void up( unsigned int sua_id,
short mode
- );
+ );
}; ///:~
-/***********************************************************************/
-/* Sua_NameObject */
-/***********************************************************************/
-class db_Sua_NameObject {
- public:
- unsigned int SUA_assoc_id;
- public:
- void initialize();
-
-}; ///:~
/***********************************************************************/
-/* Sua_NameList */
+/* Sua_DatabaseList */
/***********************************************************************/
-class db_Sua_NameList{
+class db_Sua_DatabaseList{
public:
- int num_of_instance;
- db_Sua_NameObject instance[db_MAX_REMOTE_SUA];
- public:
- void initialize();
- string read_host_name(string name);
- string read_Global_Title(string name);
- unsigned int perform_GTT( sccp_addr_str& cld_in,
- sccp_addr_str& clg_in,
- sccp_addr_str& cld_out,
- sccp_addr_str& clg_out
+ db_Sua_LocalList local_sua;
+ db_Sua_RemoteList remote_sua;
+ db_Sua_AssociationList AssocDB;
+ db_Sua_NameList NameDB;
+ db_Sua_ASList ApplicServ;
+ public:
+ unsigned int Find_local_sua( sccp_addr_str& local_address
+ );
+ unsigned int Dynamic_Associate( sccp_addr_str& cld,
+ sccp_addr_str& clg,
+ unsigned short nr_of_dest_addr,
+ unsigned short nr_of_input_streams,
+ unsigned short nr_of_output_streams
+ );
+ signed int route_on_GTname ( hostname_str& dest_name,
+ hostname_str& org_name,
+ int& sua_assoc_id,
+ pointcode_str& dest_pc,
+ pointcode_str& org_pc
+ );
+ signed int route_on_GTT( global_title_str& dest_GT,
+ global_title_str& org_GT,
+ int& sua_assoc_id,
+ pointcode_str& dest_pc,
+ pointcode_str& org_pc
);
- void increase_instance();
+ signed int route_msg( sccp_addr_str& cld,
+ sccp_addr_str& clg,
+ int& sua_assoc_id
+ );
}; ///:~
+
#endif // SUA_DATABASE_H
//end of module sua_database.h