aboutsummaryrefslogtreecommitdiffstats
path: root/sualibrary/sua/sua.h
diff options
context:
space:
mode:
Diffstat (limited to 'sualibrary/sua/sua.h')
-rw-r--r--sualibrary/sua/sua.h88
1 files changed, 59 insertions, 29 deletions
diff --git a/sualibrary/sua/sua.h b/sualibrary/sua/sua.h
index d0e5e02..84514d1 100644
--- a/sualibrary/sua/sua.h
+++ b/sualibrary/sua/sua.h
@@ -15,9 +15,9 @@
* *
***************************************************************************/
/*
- * $Id: sua.h,v 1.3 2002/02/15 16:19:46 p82609 Exp $
+ * $Id: sua.h,v 1.8 2002/11/12 11:02:49 p82609 Exp $
*
- * SUA implementation according to SUA draft issue 6.
+ * SUA implementation according to SUA draft issue 13.
*
* Author(s): Lode Coene
*
@@ -102,6 +102,9 @@
#include <netinet/in.h>
+#ifdef DARWIN
+#include <stdint.h>
+#endif
/* turn on Posix 1g for compatible cmsg structure */
#ifdef USE_RFC2292BIS
@@ -120,6 +123,8 @@
#include "sctp.h" /* SCTP library */
+using namespace std;
+
#define SUA_PORT 14001
#define SUA_PPI 4
#define IPPROTO_SCTP 132
@@ -128,6 +133,11 @@
/*#define HAVE_UNISTD_H TRUE */
+#ifndef FALSE
+#define FALSE (0)
+#define TRUE (!FALSE)
+#endif
+
#define N_UNITDATA 1
#define N_NOTICE 2
#define N_CONNECT_REQ 10
@@ -140,11 +150,23 @@
#define N_RELEASE_REQ 30
#define N_RELEASE_CONF 31
-typedef unsigned char boolean;
-
-#define FALSE (0)
-#define TRUE (!FALSE)
+#define SUA_UDTS_NO_TRANSLATION_FOR_NATURE_OF_ADDRES 0x00
+#define SUA_UDTS_NO_TRANSLATION_FOR_SPECIFIC_ADDRES 0x01
+#define SUA_UDTS_SUBSYTEM_CONGESTION 0x02
+#define SUA_UDTS_SUBSYTEM_FAILURE 0x03
+#define SUA_UDTS_UNEQUIPPED_USER 0x04
+#define SUA_UDTS_MTP_FAILURE 0x05
+#define SUA_UDTS_NETWORK_CONGESTION 0x06
+#define SUA_UDTS_UNQUALIFIED 0x07
+#define SUA_UDTS_ERROR_IN_MSG_TRANSPORT 0x08
+#define SUA_UDTS_ERROR_IN_LOCAL_PROCESSING 0x09
+#define SUA_UDTS_DESTINATION_REASSEMBLY_FAILURE 0x0A
+#define SUA_UDTS_SCCP_FAILURE 0x0B
+#define SUA_UDTS_HOP_COUNTER_VIOLATION 0x0C
+#define SUA_UDTS_SEGMENTATION_NOT_SUPPORTED 0x0D
+#define SUA_UDTS_SEGMENTATION_FAILURE 0x0E
+typedef unsigned char boolean;
#define OK 0
#define PROTOCOL_CLASS_NOT_SPECIFIED -10
@@ -214,7 +236,7 @@ typedef enum { no_name_present,
} name_gt_set;
typedef enum { no_sap_present,
- ssn_present,
+ ssn_present,
portnumber_presentr
} application_SAP_set;
@@ -238,7 +260,13 @@ typedef struct {
typedef char hostname_str[255];
-typedef char global_title_str[255];
+typedef struct {
+ short Translation_Type;
+ short Numbering_Plan;
+ short Nature_of_Address;
+ short nr_of_digits;
+ char digits[255];
+} global_title_str;
typedef union {
global_title_str GT;
@@ -264,7 +292,7 @@ typedef struct {
typedef enum { class0, // connectionless transport, non-sequenced
class1, // connectionless transport, sequenced
- class2, // connectionoriented
+ class2, // connectionoriented
class3 // connectionoriented with flow control
} protocol_class_set;
@@ -279,26 +307,26 @@ typedef struct {
typedef struct {
void (*ulp_ClDataIndNotif) ( unsigned int local_sua_Id,
- unsigned int primitive,
- unsigned int datalen
- );
+ unsigned int primitive,
+ unsigned int datalen
+ );
void (*ulp_ConnIndNotif) ( unsigned int local_sua_id,
- unsigned int local_sua_ref,
- unsigned int datalen
- );
+ unsigned int local_sua_ref,
+ unsigned int datalen
+ );
void (*ulp_ConnConfIndNotif) ( unsigned int local_sua_id,
- unsigned int local_sua_ref,
- unsigned int datalen
- );
+ unsigned int local_sua_ref,
+ unsigned int datalen
+ );
void (*ulp_ConnDataIndNotif) ( unsigned int local_sua_id,
- unsigned int local_sua_ref,
- unsigned int datalen
- );
+ unsigned int local_sua_ref,
+ unsigned int datalen
+ );
void (*ulp_DisConnIndNotif) ( unsigned int local_sua_id,
- unsigned int local_sua_ref,
+ unsigned int local_sua_ref,
unsigned int reason,
- unsigned int datalen
- );
+ unsigned int datalen
+ );
} Sua_ULP_CallBacks;
@@ -317,9 +345,9 @@ unsigned int sua_read_config_file
#define SUA_REG_NO_ERROR 0
unsigned int sua_registerInstance
- ( short local_ssn,
- Sua_ULP_CallBacks ulp_callback
- );
+( short local_ssn,
+ Sua_ULP_CallBacks ulp_callback
+ );
#define SUA_ASS_NO_ERROR 0
@@ -337,12 +365,14 @@ typedef struct {
#define SUA_PATH_NO_DEST_ADDR_PRESENT 1
unsigned int sua_getPath( unsigned int assoc_id,
- sua_Path_str &pathinfo
- );
+ sua_Path_str &pathinfo
+ );
#define SUA_TERM_NO_ERROR 0
#define SUA_TERM_NO_DEST_ADDR_PRESENT 1
+
+unsigned int sua_shutdown();
unsigned int sua_terminate();