diff options
-rw-r--r-- | src/csl_cha_cco.c | 3 | ||||
-rw-r--r-- | src/csl_cha_ism.c | 10 | ||||
-rw-r--r-- | src/csl_dha.c | 10 | ||||
-rw-r--r-- | src/scXp.c | 2 | ||||
-rw-r--r-- | src/tcap_test.c | 8 | ||||
-rw-r--r-- | src/tcap_user.h | 5 |
6 files changed, 21 insertions, 17 deletions
diff --git a/src/csl_cha_cco.c b/src/csl_cha_cco.c index e534170..cb5f2dc 100644 --- a/src/csl_cha_cco.c +++ b/src/csl_cha_cco.c @@ -44,8 +44,9 @@ static Parameter_t *gen_param(const void *ctx, uint8_t *param, uint32_t param_le } memcpy(_param, param, param_len); + /* Note: Parameter_t == ANY_t == OCTET_STRING_t */ /* initialize Parameter structure and link it with invocation */ - ANY_fromBuf(p, _param, param_len); + ANY_fromBuf((OCTET_STRING_t *)p, _param, param_len); return p; }; diff --git a/src/csl_cha_ism.c b/src/csl_cha_ism.c index 62d1789..9fd6336 100644 --- a/src/csl_cha_ism.c +++ b/src/csl_cha_ism.c @@ -54,24 +54,20 @@ static void tcap_ism_inv_timer_exp(void *_ti) tcap_ism_free(ti); break; default: - return -EINVAL; + break; } - - return 0; } /* Reject timer expiry */ -static int tcap_ism_rej_timer_exp(void *_ti) +static void tcap_ism_rej_timer_exp(void *_ti) { struct tcap_invocation *ti = _ti; if (ti->state != TCAP_IS_WAIT_REJECT) - return -EINVAL; + return; ti->state = TCAP_IS_INVALID; tcap_ism_free(ti); - - return 0; } /* Operation sent (CCO -> ISM) */ diff --git a/src/csl_dha.c b/src/csl_dha.c index 8602933..c3a9675 100644 --- a/src/csl_dha.c +++ b/src/csl_dha.c @@ -102,7 +102,7 @@ int tcap_csl_tc_uni_req(struct tcap_dialogue *td, OBJECT_IDENTIFIER_t *app_ctx, xer_fprint(stdout, &asn_DEF_UniDialoguePDU, &dial); memset(&ext, 0, sizeof(ext)); - ANY_fromType(&ext.dialog, &asn_DEF_UniDialoguePDU, &dial); + ANY_fromType((ANY_t *) &ext.dialog, &asn_DEF_UniDialoguePDU, &dial); memset(&any, 0, sizeof(any)); ANY_fromType(&any, &asn_DEF_ExternalPDU, &ext); tcm.choice.unidirectional.dialoguePortion = (OCTET_STRING_t *) &any; @@ -156,7 +156,7 @@ int tcap_csl_tc_begin_req(struct tcap_dialogue *td, OBJECT_IDENTIFIER_t *app_ctx xer_fprint(stdout, &asn_DEF_DialoguePDU, &dial); memset(&ext, 0, sizeof(ext)); - rc = ANY_fromType(&ext.dialog, &asn_DEF_DialoguePDU, &dial); + rc = ANY_fromType((ANY_t *) &ext.dialog, &asn_DEF_DialoguePDU, &dial); if (rc < 0) fprintf(stderr, "Error encoding DialoguePDU portion\n"); memset(&any, 0, sizeof(any)); @@ -193,13 +193,13 @@ static struct DialoguePDU *unwrap_ext_dialg_pdu(DialoguePortion_t *dialg_por) asn_dec_rval_t adr; /* extract dialogue portion */ - adr = ber_decode(NULL, &asn_DEF_ExternalPDU, &ext_pdu, dialg_por->buf, + adr = ber_decode(NULL, &asn_DEF_ExternalPDU, (void **) &ext_pdu, dialg_por->buf, dialg_por->size); if (adr.code != RC_OK) { fprintf(stderr, "Error parsing ExternalPDU in Dialogue Portion\n"); return NULL; } - adr = ber_decode(NULL, &asn_DEF_DialoguePDU, &dial_pdu, + adr = ber_decode(NULL, &asn_DEF_DialoguePDU, (void **) &dial_pdu, ext_pdu->dialog.buf, ext_pdu->dialog.size); if (adr.code != RC_OK) { fprintf(stderr, "Error parsing DialoguePDU in ExternalPDU\n"); @@ -332,7 +332,7 @@ static int gen_ext_AARE(struct DialoguePDU *dial, ANY_t *any, ExternalPDU_t *ext asn_long2INTEGER(&aare->result_source_diagnostic.choice.dialogue_service_user, dialogue_service_user_no_reason_given); /* Link Dialogue into External PDU */ - rc = ANY_fromType(&ext->dialog, &asn_DEF_DialoguePDU, dial); + rc = ANY_fromType((ANY_t *) &ext->dialog, &asn_DEF_DialoguePDU, dial); if (rc < 0) { fprintf(stderr, "Error generating ExternalPDU from DialoguePDU\n"); return rc; @@ -54,7 +54,7 @@ static int udp_read_cb(struct bsc_fd *fd) return -ENOMEM; rc = recvfrom(fd->fd, msg->data, msgb_tailroom(msg), 0, - &tte->remote_addr, &addr_len); + (struct sockaddr *) &tte->remote_addr, &addr_len); if (rc < 0) return rc; diff --git a/src/tcap_test.c b/src/tcap_test.c index 17110d3..df13e63 100644 --- a/src/tcap_test.c +++ b/src/tcap_test.c @@ -5,10 +5,12 @@ #include <signal.h> #include <netinet/in.h> +#include <arpa/inet.h> //#include <asn1/OBJECT_IDENTIFIER.h> #include <osmocore/utils.h> +#include <osmocore/talloc.h> #include "tcap_user.h" @@ -39,12 +41,12 @@ static void tcap_gen_oper_local(struct OPERATION *op, uint32_t local_value) static const int gprsLocationUpdateContext_v3[] = { 0, 4, 0, 0, 1, 0, 32, 3 }; static OBJECT_IDENTIFIER_t gprs_loc_upd_ctx_v3_oid; -static const uint8_t gprs_loc_upd_param[] = { +static uint8_t gprs_loc_upd_param[] = { 0x30, 0x1d, 0x04, 0x0f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x31, 0x32, 0x33, 0x34, 0x35, 0x04, 0x01, 0x31, 0x04, 0x07, 0x31, 0x2e, 0x32, 0x2e, 0x33, 0x2e, 0x34 }; -static int send_invoke(uint32_t dialg_id, int8_t invoke_id, const uint8_t *param, uint32_t param_len) +static int send_invoke(uint32_t dialg_id, int8_t invoke_id, uint8_t *param, uint32_t param_len) { struct tcap_component_ind tcci; @@ -115,7 +117,7 @@ int tcap_user_ind_comp(enum tcap_primitive prim, struct tcap_component_ind *tcci return 0; } -static int initialize(void) +static void initialize(void) { OBJECT_IDENTIFIER_set_arcs(&gprs_loc_upd_ctx_v3_oid, &gprsLocationUpdateContext_v3, sizeof(gprsLocationUpdateContext_v3[0]), diff --git a/src/tcap_user.h b/src/tcap_user.h index 2b8533c..ff84666 100644 --- a/src/tcap_user.h +++ b/src/tcap_user.h @@ -38,6 +38,8 @@ struct tcap_transport_entity { }; }; +extern struct tcap_transport_entity *tcap_transp_udp_create(struct sockaddr_storage *local_addr); + /* Call-back to user from other points in the stack */ /* metadata associated with a dialogue indication primitive */ @@ -98,4 +100,7 @@ const char *tcap_prim_name(enum tcap_primitive prim); 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_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); + #endif /* TCAP_USER_H */ |