aboutsummaryrefslogtreecommitdiffstats
path: root/sualibrary/sua/sua_distribution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sualibrary/sua/sua_distribution.cpp')
-rw-r--r--sualibrary/sua/sua_distribution.cpp108
1 files changed, 98 insertions, 10 deletions
diff --git a/sualibrary/sua/sua_distribution.cpp b/sualibrary/sua/sua_distribution.cpp
index 99b3ecc..d8b342b 100644
--- a/sualibrary/sua/sua_distribution.cpp
+++ b/sualibrary/sua/sua_distribution.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
- * $Id: sua_distribution.cpp,v 1.3 2003/01/27 16:47:43 p82609 Exp $
+ * $Id: sua_distribution.cpp,v 1.6 2003/09/09 08:43:25 p82609 Exp $
*
* SUA implementation according to SUA draft issue 6.
*
@@ -466,8 +466,12 @@ void sctp_DataArriveNotif( unsigned int sctp_assoc_id,
#ifdef DEBUG
cout << "SNM: Destination unavialable\n";
#endif
-
-
+
+ result = process_DUNA_msg ( sua_assoc_id,
+ local_sua_id,
+ remote_sua_id,
+ msg
+ );
char logstring[100];
sprintf(logstring, "Received DUNA msg");
event_log("sua_distribution.c",logstring);
@@ -480,6 +484,12 @@ void sctp_DataArriveNotif( unsigned int sctp_assoc_id,
cout << "SNM: Destination avialable message handling\n";
#endif
+ result = process_DAVA_msg ( sua_assoc_id,
+ local_sua_id,
+ remote_sua_id,
+ msg
+ );
+
char logstring[100];
sprintf(logstring, "Received DAVA msg");
event_log("sua_distribution.c",logstring);
@@ -495,7 +505,8 @@ void sctp_DataArriveNotif( unsigned int sctp_assoc_id,
local_sua_id,
remote_sua_id,
msg
- );
+ );
+
char logstring[100];
sprintf(logstring, "Received DAUD msg");
event_log("sua_distribution.c",logstring);
@@ -508,6 +519,12 @@ void sctp_DataArriveNotif( unsigned int sctp_assoc_id,
cout << "SNM: Network congestion message handling\n";
#endif
+ result = process_SCON_msg ( sua_assoc_id,
+ local_sua_id,
+ remote_sua_id,
+ msg
+ );
+
char logstring[100];
sprintf(logstring, "Received SCON msg");
event_log("sua_distribution.c",logstring);
@@ -520,6 +537,12 @@ void sctp_DataArriveNotif( unsigned int sctp_assoc_id,
cout << "SNM: Destination User Part Unavialable message handling\n";
#endif
+ result = process_DUPU_msg ( sua_assoc_id,
+ local_sua_id,
+ remote_sua_id,
+ msg
+ );
+
char logstring[100];
sprintf(logstring, "Received DUPU msg");
event_log("sua_distribution.c",logstring);
@@ -531,7 +554,13 @@ void sctp_DataArriveNotif( unsigned int sctp_assoc_id,
#ifdef DEBUG
cout << "SNM: Destination restricted message handling\n";
#endif
-
+
+ result = process_DRST_msg ( sua_assoc_id,
+ local_sua_id,
+ remote_sua_id,
+ msg
+ );
+
char logstring[100];
sprintf(logstring, "Received DRST msg");
event_log("sua_distribution.c",logstring);
@@ -949,7 +978,9 @@ void *sctp_CommunicationUpNotif( unsigned int sctp_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
+ result = sua_send_ASPUP( sua_assoc_id,
+ false,
+ 0
);
}
#endif
@@ -998,10 +1029,17 @@ void sctp_RestartNotif( unsigned int sctp_assoc_id,
/* restart association: ASP state should be set to down */
sua.AssocDB.down(sua_assoc_id,0);
+ sua.remote_sua.Activate_dests(sua_assoc_id);
+#ifdef DEBUG
+ cout << "All destination(s) activated for SUA association " << sua_assoc_id << "\n";
+#endif
+
/* if we found the sua assoc then we restart the ASP bringup sequence */
/* as the sctp association has come back online */
/* send ASP-UP to remote to start activating local & remote ASP */
- result = sua_send_ASPUP( sua_assoc_id
+ result = sua_send_ASPUP( sua_assoc_id,
+ false,
+ 0
);
}
#endif
@@ -1009,18 +1047,68 @@ void sctp_RestartNotif( unsigned int sctp_assoc_id,
}
/***********************************************************************/
-/* sctp_ShutDownCompleteNotif */
+/* sctp_ShutDownCompleteNotif */
/***********************************************************************/
-void sctp_ShutDownCompleteNotif( unsigned int assoc_id,
+void sctp_ShutDownCompleteNotif( unsigned int sctp_assoc_id,
void * ulp_data_ptr
)
{
+ unsigned int sua_assoc_id,local_sua_id, remote_sua_id;
+
+
#ifdef DEBUG
- cout << "Received shutdown indication for association " << assoc_id << "\n";
+ cout << "Received shutdown indication for association " << sctp_assoc_id << "\n";
#endif
+
+#ifdef SUA_MANAGEMENT
+ if ((sua_assoc_id = sua.AssocDB.Find_association(sctp_assoc_id, local_sua_id,remote_sua_id)) != 0)
+ {
+ /* if we found the sua assoc then the SUA ASP is marked down, */
+ /* as the sctp association has failed */
+ sua.AssocDB.down(sua_assoc_id, 0);
+#ifdef DEBUG
+ cout << "ASP down for SUA association " << sua_assoc_id << "\n";
+#endif
+ sua.remote_sua.Deactivate_dests(sua_assoc_id);
+#ifdef DEBUG
+ cout << "All destination(s) blocked for SUA association " << sua_assoc_id << "\n";
+#endif
+
+ }
+#endif
+
+
}
+/***********************************************************************/
+/* sctp_queueStatusChangeNotif */
+/***********************************************************************/
+void sctp_queueStatusChangeNotif (unsigned int assoc_id,
+ int queue_type,
+ int queue_id,
+ int queue_length,
+ void* ulp_data_ptr
+ )
+{
+#ifdef DEBUG
+ cout << "Received a queuestatus change indication for association " << assoc_id << "\n";
+#endif
+}
+/***********************************************************************/
+/* sctp_asconfStatusNotif */
+/***********************************************************************/
+void sctp_asconfStatusNotif( unsigned int assoc_id,
+ unsigned int correlation_id,
+ int result,
+ void* temp,
+ void* ulp_data_ptr
+ )
+{
+#ifdef DEBUG
+ cout << "Received SCTP configuration indication for association " << assoc_id << "\n";
+#endif
+}
/***********************************************************************/
/* Send_sua_primitive */