Commit Graph

21 Commits

Author SHA1 Message Date
Dennis Wehrle 291e61346b sms: SMS where cropped (from VTY), concatenation of SMS where not possible
Additionally it wasn't possible to send concatenated sms from the vty.
To send multiple sms, it is necessary to use padding bits and add a user_data_header.
Therefore the gsm_7bit_encode function was splitted to gsm_7bit_encode and gsm_septets2octets.
gsm_septets2octets: this is the old gsm_7bit_encode function + additional padding parameter

Additionally the gsm_7bit_decode function was modified to take account for the user_data_header.
With the new gsm_get_octet_len function you can get the octet length for a given septet length.

I also added several sms tests.
2011-07-24 20:14:13 +02:00
Pablo Neira Ayuso 1b4a42c3b1 msgfile: use namespace prefix osmo_* and use more descriptive names
Summary of changes:

s/msg_entry/osmo_config_entry/g
s/msg_entries/osmo_config_list/g
s/msg_entry_parse/osmo_config_list_parse/g

minor glitch included in this patch while I was at it:

-#include "linuxlist.h"
+#include <osmocom/core/linuxlist.h>
2011-05-07 13:14:41 +02:00
Pablo Neira Ayuso f7f89d0cfe select: use namespace prefix osmo_fd* and osmo_select*
Summary of changes:

s/struct bsc_fd/struct osmo_fd/g
s/bsc_register_fd/osmo_fd_register/g
s/bsc_unregister_fd/osmo_fd_unregister/g
s/bsc_select_main/osmo_select_main/g
2011-05-07 13:00:51 +02:00
Pablo Neira Ayuso 0b21c1c885 timer: use namespace prefix osmo_timer*
Summary of changes:

s/struct timer_list/struct osmo_timer_list/g
s/bsc_add_timer/osmo_timer_add/g
s/bsc_schedule_timer/osmo_timer_schedule/g
s/bsc_del_timer/osmo_timer_del/g
s/bsc_timer_pending/osmo_timer_pending/g
s/bsc_nearest_timer/osmo_timers_nearest/g
s/bsc_prepare_timers/osmo_timers_prepare/g
s/bsc_update_timers/osmo_timers_update/g
s/bsc_timer_check/osmo_timers_check/g
2011-05-07 13:00:51 +02:00
Holger Hans Peter Freyther 28dbfe9bf7 misc: Remove the sys/types.h include from various files
We used this include for the u_int{8,16,32}_t types but we do
not need this anymore.
2011-04-18 16:57:04 +02:00
Pablo Neira Ayuso 8341934844 include: reorganize headers file to include/osmocom/[gsm|core]
This patch moves all GSM-specific definitions to include/osmocom/gsm.
Moreover, the headers in include/osmocore/ have been moved to
include/osmocom/core.

This has been proposed by Harald Welte and Sylvain Munaunt.

Tested with `make distcheck'.

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:09:28 +01:00
Pablo Neira Ayuso fba495e5f6 This patch moves the GSM-specific functions to the new library
libosmogsm which is provided by libosmocore.

I have also moved generate_backtrace() to backtrace.c instead
of gsm_utils.c, otherwise the timer and msgfile tests depend on
libosmogsm.

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:08:08 +01:00
Holger Hans Peter Freyther e05c7dfa8e smscb: Add some simple decoding routines for SMSCB. 2010-12-29 22:51:45 +01:00
Holger Hans Peter Freyther 131bc80b96 msgfile: Allow to have comments in the simple CSV file 2010-10-26 09:32:35 +02:00
Holger Hans Peter Freyther f632371b76 ussd: Verify that parsing is stil working and print the decoded text. 2010-10-11 09:26:19 +02:00
Holger Hans Peter Freyther c88a44f493 ussd: Add next test that show that we access the data out of bounds
This test is showing that the internal ASN1 code is not checking
the size properly.
2010-10-11 09:26:19 +02:00
Holger Hans Peter Freyther daa653fc22 ussd: Add a test case, switch parsing to use a gsm48_hdr and len
The current USSD code is not doing any size checks, add a test
case to find out how easily we access the data out of bounds.
Begin to use the length in some places.
2010-10-11 09:25:14 +02:00
Holger Hans Peter Freyther c87f266522 msgfile: Add a file parser for a simple file format
This file format will be used to store per country code,
per network code messages. This will be used for various
things ranging from access control, to messages...
2010-10-08 19:23:18 +08:00
Nico Golde c0ce9aa20d tests: don't hardcode length values of expected encoding gsm_7bit_encode:
make sure to return the number of actually written bytes gsm_7bit_decode:
calculate length of resulting septets from input length before decoding

The input length to gsm_7bit_decode reflects the number of encoded bytes
to be decoded. As the decoding is done on the input in septetes we need
to take this into account and recalculate the length.
2010-07-21 02:43:58 +08:00
Holger Hans Peter Freyther 31e97ea34e tests: Separate encoding/decoding test to verify them independly
Use the current test result as test data for future
regression testing. The encode function appears to
add too many zeros to the text.
2010-07-20 02:48:17 +08:00
Nico Golde 28de05336b * rewrite GSM 7bit default encoding/decoding based on a lookup table as the previous code produced wrong encodings for certain characters. 2010-07-20 02:48:17 +08:00
Harald Welte f8b2ba7dc8 add option --disable-tests to disable building of test binaries 2010-03-07 20:33:59 +01:00
Holger Hans Peter Freyther d60c7a895e [timer] Fix compile warning of the timer test 2010-02-26 20:03:13 +01:00
Harald Welte e94ad58e8e fix config.h directory 2010-02-20 22:06:24 +01:00
Harald Welte 3cae0398ea add missing automake / autoconf files 2010-02-20 21:09:24 +01:00
Harald Welte ec8b4501c7 intial checkin of the libosmocore project 2010-02-20 20:34:29 +01:00