aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2015-12-18test-ranap.c: Further WIP, it now actually compilesHarald Welte1-63/+82
2015-12-18RANAP: Split FormatInformationParameter / SDUParameterItemHarald Welte10-213/+294
The definition of the above data types as per 3GPP specs results in a SEQUENCE_OF() an anonymous structure, which is slightly inconvenient to use. So let's split the SEQUENCE OF part and the actual definition of the item in separate types.
2015-12-18test-ranap.c: More WIP code for convoluted RANAP message encodingHarald Welte1-31/+283
2015-12-17hnb-test: Add an option to transmit multiple UE register/deregister msgsDaniel Willmann2-0/+33
2015-12-17Enable vty command to output talloc reportDaniel Willmann1-0/+10
I don't think I can print this into a string and thus output it via VTY. In that case it might be smarte to do in a signal handler
2015-12-17hnbgw_hnbap: Initialize return value and always return somethingDaniel Willmann1-2/+4
2015-12-17hnbap: Free ASN.1 components after they are no longer neededDaniel Willmann2-7/+20
2015-12-17hnb-test: Handle closed connections correctlyDaniel Willmann1-1/+11
2015-12-17hnb-test: Send UE de-register after receiving the UE registration acceptDaniel Willmann2-0/+34
2015-12-17hnb-test.c: Remove pdus.h include as it is not usedDaniel Willmann1-2/+0
The messages are constructed so no need to include the binary asn1 data.
2015-12-17hnb-test: Add HNBAP category and reduce MAIN loglevel to INFODaniel Willmann2-2/+8
2015-12-17hnbgw: Change logging priorities and add HNBAP categoryDaniel Willmann4-10/+16
Log hnbap messages to the HNBAP category. Change MAIN category to only log INFO and above and change SCTP notification message to debug.
2015-12-17hnbgw_hnbap: Process UEDeRegister and try to free correct UEDaniel Willmann1-0/+24
2015-12-17hnbgw: Handle closed connections correctlyDaniel Willmann1-1/+12
We still need to clean up the HNB data structures after the connection is closed
2015-12-17hnbgw: Lower level of SCTP notif. msg to debug and set default log level to infoDaniel Willmann1-2/+2
2015-12-16ranap_common: Add function to wrap IEs into a RANAP_ProtocolIE_FieldPair_tHarald Welte2-4/+37
The FieldPair is a strange construct of RANAP Radio Access Bearer assignment, where certain IEs appear in pairs.
2015-12-16hnbap_common: Fix copy+paste mistake (use hnbap msgb allocator)Harald Welte1-1/+1
2015-12-16WIP: add some early code for generating required RANAP messagesHarald Welte1-0/+207
2015-12-16Add ranap_generate_outcome() functionHarald Welte2-3/+33
Ranap has not only successsful and unsuccessful outcome, but also an unqualified general 'outcome'.
2015-12-16{hnbap,rua,ranap}_common.c: Reduce code duplicatioonHarald Welte3-127/+83
There used to be a lot of code duplication between the code to generate initiating, successfulOutcome and unsuccessfulOutcome messages. Try to reduce that by callign a generic function.
2015-12-16{rua,hnbap,ranap}_common: Add missing encoding functionsHarald Welte6-67/+107
We used to only have those generator functions that we needed for the existing hnbgw code; Implement the missing encoders
2015-12-16hnbgw: Use the now-compiling RANAP encoder+decoder codeHarald Welte2-487/+3
So far, we copy-pasted/cherry-picked individual encoder/decoder functions as the overall ranap_{encode,decode} didn't compile yet. As the latter is now finally compiling, we can remove those copies and link in ranap_{encode,decode}.o
2015-12-16One further RANAP hacking sessionHarald Welte175-2241/+4680
This is not development, it is random trial and error hacking. I really hate the fact that we have no useful asn.1 code generator and need to work with hacks like asn1tostruct.py and asn1c without information object classes :/ This commit is a one-day-long iteration of trial+error, manually editing and adding the .asn source of RANAP until we get something that in the end at least compiles and links. Do I trust the resulting code? No. But we have no alternative :(
2015-12-16RANAP: Add more types/IEs to RANAP-PDU.asn and re-generate CHarald Welte83-25/+6008
As asn1c cannot understand information object classes, we cannot compile RANAP-PDU-Contents.asn but instead need to manually add the respective infrmation elements to RANAP-PDU.asn.
2015-12-16Re-add the 'regen' targets lost in the automake transitionHarald Welte3-0/+23
This might need a lot of cleanup for out-of-source-tree builds and the like, but let's not spend time on this now. The old Makefile also didn't support that. But loosing the ability to regenerate the C source is not an option either.
2015-12-16rename ASN_MODULE_FILES to ASN_MODULE_SOURCESHarald Welte3-6/+6
... brings us closer to the Makefile.am.sampl generated by asn1c, facilitating copy+paste.
2015-12-15Autotoolize the buildDaniel Willmann10-178/+128
Use Autoconf/make for building and autotest for tests
2015-12-14hnb-test: Parse UE register acceptDaniel Willmann1-0/+27
2015-12-14asn1helpers: Fix 24 bit conversion function and use it in hnbgw_hnbapDaniel Willmann2-4/+4
The 32 bit int needs to be shifted left one byte so the correct bytes end up at the beginning of the bit string buffer.
2015-12-14hnb-test: Send UE register requestDaniel Willmann1-1/+32
2015-12-14hnb-test: Send HNB register request and parse the acceptDaniel Willmann2-1/+55
2015-12-14hnb-test: setsockopt SCTP_EVENTS is needed to get the sctp_sndrcvinfoDaniel Willmann1-1/+14
2015-12-14asn1helpers: Add 28 bit conversion function and use it for Cell IDDaniel Willmann3-4/+18
The padding bits in the bit string are at the end and the byte-order is MSB-first. This means the number needs to be shifted left so the padding bits are the least significant.
2015-12-07tests/hnb-test: Generate the HNBAP registration request from ASN.1Daniel Willmann1-3/+39
2015-12-07hnbap_common: Add function to HNBAP generate initiating messageDaniel Willmann2-15/+23
An earlier version was commented out, this function now works like hnbap_generate_successful_outcome()
2015-12-07asn1helpers: Add helper to convert u8/u16 to OCTET_STRINGDaniel Willmann2-0/+15
2015-12-03hnb-test: Send hard-coded HNB register request for nowDaniel Willmann1-0/+21
2015-12-03tests: Add hnb-test to connect to hnbgw and tests its functionsDaniel Willmann3-1/+256
Only connects currently
2015-12-02hnbgw: Add VTY commands to show info about connected HNBs and UEsDaniel Willmann1-0/+43
2015-11-30test-helpers: Also print out hexdump of encoded bit stringDaniel Willmann1-0/+7
2015-11-30asn1helpers, test-helpers: Use ntoh/hton* to convert integersDaniel Willmann3-14/+21
Since the asn1_u32/24_to_bitstring functions need to change the source variable change the signature to clarify that the uint32_t * will be modified.
2015-11-30test-hnbap: Check CID and Identity Info as wellDaniel Willmann1-0/+5
2015-11-30test-hnbap: Use different types for UE request and accept IEsDaniel Willmann1-9/+10
2015-11-27asn1helpers: Fix asn1str_to_uX functionsDaniel Willmann1-6/+8
The values are stored big-endian so convert them
2015-11-27test-hnbap: Test decoding of the hnbap registration requestDaniel Willmann1-0/+50
The 16-bit values are not decoded correctly
2015-11-24tests/test-hnbap: Decode HNBAP UE Register accept as wellDaniel Willmann1-1/+23
2015-11-24tests: Add test-hnbap to test en-/decoding of HNBAP messagesDaniel Willmann2-1/+110
Decode a HNBAP UE register request and check the result.
2015-11-23tests: Test cropping of string still is NULL-terminatedDaniel Willmann1-0/+9
2015-11-23asn1helpers: Ensure that string is NULL-terminatedDaniel Willmann1-2/+2
The buf in an OCTET_STRING_t is not (necessarily) NULL-terminated, so make sure there is a terminating NULL byte at the end in the resulting string.
2015-11-23tests: Test asn1_strncpy functionDaniel Willmann1-0/+15