summaryrefslogtreecommitdiffstats
path: root/src/tcap_user.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tcap_user.h')
-rw-r--r--src/tcap_user.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/tcap_user.h b/src/tcap_user.h
index b396384..3f25b4a 100644
--- a/src/tcap_user.h
+++ b/src/tcap_user.h
@@ -74,9 +74,6 @@ extern struct tcap_transport_entity *tcap_transp_udp_create(struct sockaddr_stor
/* metadata associated with a dialogue indication primitive */
struct tcap_dialg_ind {
- /* Dummy list head structure for the user. libosmo-tcap doesn't use it */
- struct llist_head list;
-
/* Dialogue ID to which this primitive relates */
uint32_t dialg_id;
/* Reference to the user-provided TCAP transport entity */
@@ -95,8 +92,6 @@ struct tcap_dialg_ind {
/* metadata associated with a component indication primitive */
struct tcap_component_ind {
- /* Dummy list head structure for the user. libosmo-tcap doesn't use it */
- struct llist_head list;
/* public */
uint32_t dialg_id; /* Dialogue ID */
int8_t invoke_id; /* Invoke ID */
@@ -127,10 +122,9 @@ struct tcap_component_ind {
};
};
-struct scxp_entity;
-
enum tcap_primitive {
/* dialogue handling primitives */
+ _TCAP_PR_DIALG_BASE = 0,
TCAP_PR_TC_UNI,
TCAP_PR_TC_BEGIN,
TCAP_PR_TC_CONTINUE,
@@ -138,6 +132,7 @@ enum tcap_primitive {
TCAP_PR_TC_U_ABORT,
TCAP_PR_TC_NOTICE,
/* component handling primitives */
+ _TCAP_PR_COMP_BASE = 10,
TCAP_PR_TC_INVOKE,
TCAP_PR_TC_RESULT_L,
TCAP_PR_TC_RESULT_NL,
@@ -150,13 +145,28 @@ enum tcap_primitive {
TCAP_PR_TC_P_ABORT,
};
+/* primitive structure to pass primitives between TCAP-User and TCAP Layer */
+struct tcap_prim_buf {
+ /* Dummy list head structure for the user. libosmo-tcap doesn't use it */
+ struct llist_head list;
+
+ /* The actual primitive number */
+ enum tcap_primitive prim;
+ union {
+ struct tcap_dialg_ind dialg;
+ struct tcap_component_ind comp;
+ };
+};
+
+struct scxp_entity;
+
const char *tcap_prim_name(enum tcap_primitive prim);
/* callbacks to application code regarding various INDICATIONs */
-extern int tcap_user_ind_comp(enum tcap_primitive prim, struct tcap_component_ind *tcci);
-extern int tcap_user_ind_dialg(enum tcap_primitive prim, struct tcap_dialg_ind *tcdi);
-
+extern int tcap_user_ind_cb(struct tcap_prim_buf *tcpb);
+/* application wants to issue a REQUEST type primitive */
+extern int tcap_user_req(struct tcap_prim_buf *tcpb);
extern int tcap_user_req_comp(enum tcap_primitive prim, struct tcap_component_ind *tcci);
extern int tcap_user_req_dialg(enum tcap_primitive prim, struct tcap_dialg_ind *tcdi);