72 lines
1.8 KiB
C
72 lines
1.8 KiB
C
#ifndef _TCAP_USER_H
|
|
#define _TCAP_USER_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <asn1c/OBJECT_IDENTIFIER.h>
|
|
#include <osmocom/tcap/Parameter.h>
|
|
#include <osmocom/tcap/OPERATION.h>
|
|
|
|
/* Call-back to user from other points in the stack */
|
|
|
|
/* metadata associated with a dialogue indication primitive */
|
|
struct tcap_dialg_ind {
|
|
uint32_t dialg_id;
|
|
struct tcap_address *src_addr;
|
|
struct tcap_address *dst_addr;
|
|
struct OBJECT_IDENTIFIER *app_ctx_name;
|
|
struct user_information *user_info;
|
|
int components_present:1;
|
|
int prearranged_end:1;
|
|
uint32_t reason;
|
|
void *qos;
|
|
};
|
|
|
|
/* metadata associated with a component indication primitive */
|
|
struct tcap_component_ind {
|
|
/* public */
|
|
uint32_t dialg_id; /* Dialogue ID */
|
|
int8_t invoke_id; /* Invoke ID */
|
|
int8_t *linked_id; /* Linked ID */
|
|
struct OPERATION operation; /* Operation Code */
|
|
Parameter_t parameter; /* ANY_t */
|
|
int last_component; /* is this the last component in the msg? */
|
|
uint32_t timeout_secs; /* Timeout in seconds */
|
|
uint32_t error;
|
|
uint8_t op_class;
|
|
/* private */
|
|
int8_t _linked_id; /* actual storage for linked ID */
|
|
};
|
|
|
|
struct scxp_entity;
|
|
|
|
enum tcap_primitive {
|
|
/* dialogue handling primitives */
|
|
TCAP_PR_TC_UNI,
|
|
TCAP_PR_TC_BEGIN,
|
|
TCAP_PR_TC_CONTINUE,
|
|
TCAP_PR_TC_END,
|
|
TCAP_PR_TC_U_ABORT,
|
|
TCAP_PR_TC_NOTICE,
|
|
/* component handling primitives */
|
|
TCAP_PR_TC_INVOKE,
|
|
TCAP_PR_TC_RESULT_L,
|
|
TCAP_PR_TC_RESULT_NL,
|
|
TCAP_PR_TC_U_ERROR,
|
|
TCAP_PR_TC_U_REJECT,
|
|
TCAP_PR_TC_CANCEL,
|
|
TCAP_PR_TC_TIMER_RESET,
|
|
TCAP_PR_TC_L_REJECT,
|
|
TCAP_PR_TC_R_REJECT,
|
|
TCAP_PR_TC_P_ABORT,
|
|
};
|
|
|
|
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);
|
|
|
|
#endif /* TCAP_USER_H */
|