move tests/rua_helper.[ch] to src directory
The RUA Helper is not test-specific.
This commit is contained in:
parent
1f6bd7b51c
commit
b66c5d0e62
|
@ -42,7 +42,7 @@ noinst_HEADERS = hnbap_common.h hnbap_ies_defs.h \
|
|||
|
||||
osmo_hnbgw_SOURCES = hnbap_encoder.c hnbap_decoder.c hnbap_common.c \
|
||||
rua_encoder.c rua_decoder.c rua_common.c \
|
||||
sccp_helpers.c \
|
||||
rua_msg_factory.c sccp_helpers.c \
|
||||
hnbgw.c hnbgw_hnbap.c hnbgw_rua.c hnbgw_ranap.c \
|
||||
context_map.c hnbgw_cn.c
|
||||
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
#include "rua_common.h"
|
||||
#include "rua_ies_defs.h"
|
||||
#include <stdint.h>
|
||||
#include <osmocom/netif/stream.h>
|
||||
|
||||
#include "hnbgw.h"
|
||||
#include "rua_common.h"
|
||||
#include "rua_ies_defs.h"
|
||||
#include "rua_msg_factory.h"
|
||||
#include "asn1helpers.h"
|
||||
#include "hnbgw.h"
|
||||
|
||||
|
||||
struct msgb *rua_new_udt(struct msgb *inmsg)
|
||||
{
|
||||
|
@ -13,7 +16,7 @@ struct msgb *rua_new_udt(struct msgb *inmsg)
|
|||
int rc;
|
||||
|
||||
memset(&ies, 0, sizeof(ies));
|
||||
OCTET_STRING_fromBuf(&ies.ranaP_Message.buf, inmsg->data, msgb_length(inmsg));
|
||||
OCTET_STRING_fromBuf(&ies.ranaP_Message, inmsg->data, msgb_length(inmsg));
|
||||
msgb_free(inmsg);
|
||||
|
||||
memset(&out, 0, sizeof(out));
|
||||
|
@ -50,7 +53,7 @@ struct msgb *rua_new_conn(int is_ps, uint32_t context_id, struct msgb *inmsg)
|
|||
ies.cN_DomainIndicator = RUA_CN_DomainIndicator_cs_domain;
|
||||
asn1_u24_to_bitstring(&ies.context_ID, &ctxidbuf, context_id);
|
||||
ies.establishment_Cause = RUA_Establishment_Cause_normal_call;
|
||||
OCTET_STRING_fromBuf(&ies.ranaP_Message.buf, inmsg->data, msgb_length(inmsg));
|
||||
OCTET_STRING_fromBuf(&ies.ranaP_Message, inmsg->data, msgb_length(inmsg));
|
||||
msgb_free(inmsg);
|
||||
|
||||
memset(&out, 0, sizeof(out));
|
||||
|
@ -86,7 +89,7 @@ struct msgb *rua_new_dt(int is_ps, uint32_t context_id, struct msgb *inmsg)
|
|||
else
|
||||
ies.cN_DomainIndicator = RUA_CN_DomainIndicator_cs_domain;
|
||||
asn1_u24_to_bitstring(&ies.context_ID, &ctxidbuf, context_id);
|
||||
OCTET_STRING_fromBuf(&ies.ranaP_Message.buf, inmsg->data, msgb_length(inmsg));
|
||||
OCTET_STRING_fromBuf(&ies.ranaP_Message, inmsg->data, msgb_length(inmsg));
|
||||
msgb_free(inmsg);
|
||||
|
||||
memset(&out, 0, sizeof(out));
|
||||
|
@ -127,7 +130,7 @@ struct msgb *rua_new_disc(int is_ps, uint32_t context_id, struct msgb *inmsg)
|
|||
ies.cause.choice.radioNetwork = RUA_CauseRadioNetwork_normal;
|
||||
if (inmsg && inmsg->data&& msgb_length(inmsg)) {
|
||||
ies.presenceMask |= DISCONNECTIES_RUA_RANAP_MESSAGE_PRESENT;
|
||||
OCTET_STRING_fromBuf(&ies.ranaP_Message.buf, inmsg->data, msgb_length(inmsg));
|
||||
OCTET_STRING_fromBuf(&ies.ranaP_Message, inmsg->data, msgb_length(inmsg));
|
||||
}
|
||||
msgb_free(inmsg);
|
||||
|
|
@ -5,7 +5,7 @@ COMMON_LIBS = $(OSMOVTY_LIBS) $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(ASN1C_LIBS) $(O
|
|||
check_PROGRAMS = test-ranap test-helpers test-hnbap hnb-test dummy-cn
|
||||
|
||||
HNBAP_FILES = $(top_srcdir)/src/hnbap_common.c $(top_srcdir)/src/hnbap_decoder.c $(top_srcdir)/src/hnbap_encoder.c
|
||||
RUA_FILES = $(top_srcdir)/src/rua_common.c $(top_srcdir)/src/rua_decoder.c $(top_srcdir)/src/rua_encoder.c
|
||||
RUA_FILES = $(top_srcdir)/src/rua_common.c $(top_srcdir)/src/rua_decoder.c $(top_srcdir)/src/rua_encoder.c $(top_srcdir)/src/rua_msg_factory.c
|
||||
|
||||
test_helpers_SOURCES = test-helpers.c
|
||||
test_helpers_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la
|
||||
|
@ -13,7 +13,7 @@ test_helpers_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la
|
|||
test_hnbap_SOURCES = $(top_srcdir)/src/hnbap_common.c $(top_srcdir)/src/hnbap_decoder.c test-hnbap.c test_common.c
|
||||
test_hnbap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/hnbap/libosmo-asn1-hnbap.a $(top_builddir)/src/libosmo-ranap.la
|
||||
|
||||
hnb_test_SOURCES = $(HNBAP_FILES) $(RUA_FILES) hnb-test.c rua_helper.c test_common.c
|
||||
hnb_test_SOURCES = $(HNBAP_FILES) $(RUA_FILES) hnb-test.c test_common.c
|
||||
hnb_test_LDADD = $(COMMON_LIBS) $(top_builddir)/src/hnbap/libosmo-asn1-hnbap.a $(top_builddir)/src/rua/libosmo-asn1-rua.a $(top_builddir)/src/libosmo-ranap.la
|
||||
|
||||
test_ranap_SOURCES = $(RANAP_FILES) test-ranap.c test_common.c
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "hnb-test.h"
|
||||
#include "hnbap_common.h"
|
||||
#include "hnbap_ies_defs.h"
|
||||
#include "rua_helper.h"
|
||||
#include "rua_msg_factory.h"
|
||||
#include "asn1helpers.h"
|
||||
#include "iu_helpers.h"
|
||||
#include "test_common.h"
|
||||
|
|
Loading…
Reference in New Issue