diff --git a/src/hnbap_common.h b/src/hnbap_common.h index bd8277b5..ec214e98 100644 --- a/src/hnbap_common.h +++ b/src/hnbap_common.h @@ -131,7 +131,7 @@ #include -#define HNBAP_DEBUG(x, args ...) DEBUGP(0, x, ## args) +#define HNBAP_DEBUG(x, args ...) DEBUGP(1, x, ## args) extern int asn1_xer_print; diff --git a/src/hnbgw.c b/src/hnbgw.c index 4ab56cd8..27ace4e2 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -241,6 +241,11 @@ static const struct log_info_cat log_cat[] = { .color = "", .description = "Main program", }, + [DHNBAP] = { + .name = "DHNBAP", .loglevel = LOGL_DEBUG, .enabled = 1, + .color = "", + .description = "Home Node B Application Part", + }, }; static const struct log_info hnbgw_log_info = { diff --git a/src/hnbgw.h b/src/hnbgw.h index e88baa76..3476c4f9 100644 --- a/src/hnbgw.h +++ b/src/hnbgw.h @@ -11,6 +11,7 @@ enum { DMAIN, + DHNBAP, }; diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c index d08cadb1..9378c7ac 100644 --- a/src/hnbgw_hnbap.c +++ b/src/hnbgw_hnbap.c @@ -124,7 +124,7 @@ static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in) //ctx->id.mcc FIXME //ctx->id.mnc FIXME - DEBUGP(DMAIN, "HNB-REGISTER-REQ from %s\n", ctx->identity_info); + DEBUGP(DHNBAP, "HNB-REGISTER-REQ from %s\n", ctx->identity_info); /* Send HNBRegisterAccept */ return hnbgw_tx_hnb_register_acc(ctx); @@ -155,11 +155,11 @@ static int hnbgw_rx_ue_register_req(struct hnb_context *ctx, ANY_t *in) ies.uE_Identity.choice.iMSIESN.iMSIDS41.size); break; default: - LOGP(DMAIN, LOGL_NOTICE, "UE-REGISTER-REQ without IMSI?!?\n"); + LOGP(DHNBAP, LOGL_NOTICE, "UE-REGISTER-REQ without IMSI?!?\n"); return -1; } - DEBUGP(DMAIN, "UE-REGSITER-REQ ID_type=%d imsi=%s cause=%ld\n", + DEBUGP(DHNBAP, "UE-REGSITER-REQ ID_type=%d imsi=%s cause=%ld\n", ies.uE_Identity.present, imsi, ies.registration_Cause); ue = ue_context_by_imsi(imsi); @@ -183,7 +183,7 @@ static int hnbgw_rx_ue_deregister(struct hnb_context *ctx, ANY_t *in) ctxid = asn1bitstr_to_u24(&ies.context_ID); - DEBUGP(DMAIN, "UE-DE-REGSITER context=%ld cause=%ld\n", + DEBUGP(DHNBAP, "UE-DE-REGSITER context=%ld cause=%ld\n", ctxid, ies.cause); ue = ue_context_by_id(ctxid); @@ -202,7 +202,7 @@ static int hnbgw_rx_err_ind(struct hnb_context *hnb, ANY_t *in) if (rc < 0) return rc; - LOGP(DMAIN, LOGL_NOTICE, "HNBAP ERROR.ind, cause: %s\n", + LOGP(DHNBAP, LOGL_NOTICE, "HNBAP ERROR.ind, cause: %s\n", hnbap_cause_str(&ies.cause)); return 0; @@ -232,11 +232,11 @@ static int hnbgw_rx_initiating_msg(struct hnb_context *hnb, InitiatingMessage_t case ProcedureCode_id_RelocationComplete: /* 8.11 */ case ProcedureCode_id_U_RNTIQuery: /* 8.12 */ case ProcedureCode_id_privateMessage: - LOGP(DMAIN, LOGL_NOTICE, "Unimplemented HNBAP Procedure %ld\n", + LOGP(DHNBAP, LOGL_NOTICE, "Unimplemented HNBAP Procedure %ld\n", imsg->procedureCode); break; default: - LOGP(DMAIN, LOGL_NOTICE, "Unknown HNBAP Procedure %ld\n", + LOGP(DHNBAP, LOGL_NOTICE, "Unknown HNBAP Procedure %ld\n", imsg->procedureCode); break; } @@ -270,7 +270,7 @@ static int _hnbgw_hnbap_rx(struct hnb_context *hnb, HNBAP_PDU_t *pdu) rc = hnbgw_rx_unsuccessful_outcome_msg(hnb, &pdu->choice.unsuccessfulOutcome); break; default: - LOGP(DMAIN, LOGL_NOTICE, "Unknown HNBAP Presence %u\n", + LOGP(DHNBAP, LOGL_NOTICE, "Unknown HNBAP Presence %u\n", pdu->present); return -1; } @@ -288,7 +288,7 @@ int hnbgw_hnbap_rx(struct hnb_context *hnb, struct msgb *msg) dec_ret = aper_decode(NULL, &asn_DEF_HNBAP_PDU, (void **) &pdu, msg->data, msgb_length(msg), 0, 0); if (dec_ret.code != RC_OK) { - LOGP(DMAIN, LOGL_ERROR, "Error in ASN.1 decode\n"); + LOGP(DHNBAP, LOGL_ERROR, "Error in ASN.1 decode\n"); return rc; }