Harald Welte
a439a3a505
logging: Make sure we don't use "end of color" code if colors are turned off
2010-07-30 21:01:54 +02:00
Harald Welte
dee47cd14d
add new hexdump_nospc() function
2010-07-30 11:47:50 +02:00
Harald Welte
40481e8954
move hexdump() from logging.c to utils.c
2010-07-30 11:40:32 +02:00
Harald Welte
3eba991b3d
Import 'hexparse' function from OpenBSC
2010-07-30 10:37:29 +02:00
Sylvain Munaut
7459d6cfd1
core/msgb: Use the new osmo_panic call to handle errors
...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-25 18:09:28 +02:00
Sylvain Munaut
ac3e61a7a6
core: Add some generic panic handling
...
This also includes an option for a minimal 'infinite loop' type
panic that could be required for embedded target that don't have
abort() or fprintf()
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-25 18:08:54 +02:00
Sylvain Munaut
f23ababfb2
build: Use AS_HELP_STRING macro to format the ./configure --help better
...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-25 16:16:42 +02:00
Sylvain Munaut
27af075e1e
osmocore: Add utility function rsl_chan_nr_str to RSL
...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-25 12:27:44 +02:00
Holger Hans Peter Freyther
5e84a86937
msgb: Avoid warnings that the string might contain %s or such..
2010-07-23 19:22:23 +08:00
Holger Hans Peter Freyther
b60a4b3b97
gsm0808: Why should there be a lchan in the parameter...
2010-07-23 18:35:59 +08:00
Holger Hans Peter Freyther
06f795c56f
gsm0808: Import unaligned mem access fix from on-waves/bsc-master
2010-07-23 18:20:02 +08:00
Holger Hans Peter Freyther
dd02a47234
gsm_utils: Move the gsm_7bit_alphabet into the impl and make it static
2010-07-23 16:36:05 +08:00
Harald Welte
652a72385c
msgb: Check for available headroom/tailroom and abort() if we violate it
2010-07-22 21:56:10 +02:00
Holger Hans Peter Freyther
0d60aa2ad7
gsm_04_12.h: Add beginning of structs for SMS CB
...
I am trying to understand the RSL and GSM 04.12
spec to implement CBS for OpenBSC...
2010-07-21 05:02:33 +08:00
Holger Hans Peter Freyther
f8a342c350
gsm_7bit_decode: rtext does not hold a null byte, reduce the size
...
I have added the + 1 as I thought rtext will hold a terminating
null byte but it will not.
2010-07-21 03:14:01 +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
446bf37698
gsm_7bit_decode: Handle the case of the last charachter being an escape
...
If i + 1 == length and it is an escape charachter we would try
to read rtext[length] which is one after the field we have allocated.
2010-07-20 02:54:54 +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
Ingo Albrecht
383134b5ac
Added crc16 from linux kernel.
2010-07-15 22:43:52 +02:00
Andreas Eversberg
33f0fc3c95
[VTY] add support for numeric ranges with negative numbers
...
This enables us to do something like <-128-127> as a numeric range.
2010-07-13 13:50:39 +02:00
Harald Welte
6eb7d6c887
[RSL] split rsl_rll_push_l3() L3 LV pushign and rsl_rll_push_hdr()
...
This allows us to generate RSLms messages that have some non-standard
IEs between the RSL/RLL common header and the L3 INFO IE.
2010-07-13 13:48:13 +02:00
Andreas Eversberg
ed00fe4449
Add 3-digit MNC support to gsm48_generate_lai()
2010-07-12 09:12:46 +02:00
Andreas Eversberg
014cb8725c
Added new IE definitions to gsm_04_08.h of libosmocore.
...
Also added RR and MM TLV tables to gsm48.c
[import from accidential commit to osmocom-bb.git]
2010-07-12 09:11:00 +02:00
Andreas Eversberg
cd2a74bd43
Added single octet TV (type + value) to libosmocore.
...
In case of a single octet, the upper nibble is the type, the lower nibble
carries the value.
[import from accidentially committed changes to osmocom-bb.git]
diff --git a/src/shared/libosmocore/include/osmocore/tlv.h b/src/shared/libosmocore/include/osmocore/tlv.h
index c733dbc..4cfce87 100644
--- a/src/shared/libosmocore/include/osmocore/tlv.h
+++ b/src/shared/libosmocore/include/osmocore/tlv.h
@@ -212,6 +212,7 @@ enum tlv_type {
TLV_TYPE_TLV,
TLV_TYPE_TL16V,
TLV_TYPE_TvLV,
+ TLV_TYPE_SINGLE_TV
};
struct tlv_def {
diff --git a/src/shared/libosmocore/src/tlv_parser.c b/src/shared/libosmocore/src/tlv_parser.c
index 407e57a..bbef7a9 100644
--- a/src/shared/libosmocore/src/tlv_parser.c
+++ b/src/shared/libosmocore/src/tlv_parser.c
@@ -36,6 +36,14 @@ int tlv_parse_one(uint8_t *o_tag, uint16_t *o_len, const uint8_t **o_val,
tag = *buf;
*o_tag = tag;
+ /* single octet TV IE */
+ if (def->def[tag & 0xf0].type == TLV_TYPE_SINGLE_TV) {
+ *o_tag = tag & 0xf0;
+ *o_val = buf;
+ *o_len = 1;
+ return 1;
+ }
+
/* FIXME: use tables for knwon IEI */
switch (def->def[tag].type) {
case TLV_TYPE_T:
2010-07-12 08:55:14 +02:00
Sylvain Munaut
e10ae5b083
gsm_utils: Fix typo in gsm band name
...
thanks to horizon for noticing :p
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-04 11:41:36 +02:00
Harald Welte
e335b91ccd
GPRS: Add 'input' generator functions for GPRS cipher algorithm
2010-06-30 19:50:14 +02:00
Harald Welte
b9ce51c5fd
Add support for plugins (and specifically GPRS encryption plugins)
2010-06-30 19:43:11 +02:00
Harald Welte
e34a940542
[gsmtap] add new gsmtap_makemsg() function
...
This generates a gsmtap message without actually enqueueing to a
bsc_select style queue.
2010-06-29 22:31:21 +02:00
Harald Welte
e779c364ac
Add gsmtap utility functions to libosmocore
...
This is imported from OsmocomBB/Layer23
2010-06-29 21:57:25 +02:00
Harald Welte
1067e8cc9a
Fix typo in configure script regarding --disable-vty
2010-06-25 03:00:58 +02:00
Andreas Eversberg
816e24cb42
[RSL] Added special RSL message types for mobile side
...
- suspension DL
- resume DL
- re-establish DL
2010-06-25 02:50:56 +02:00
Andreas Eversberg
93364fc8e0
[gsm48] fix typo in struct gsm48_req_ref
2010-06-25 02:50:06 +02:00
Harald Welte
639f74bdf4
[GSM 04.08] add more RR IEIs
2010-06-15 09:32:14 +02:00
Sylvain Munaut
d005eabe16
gsm48: Add authentication response message
...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-10 13:30:50 +02:00
Sylvain Munaut
4f585491b9
gsm_utils: Add a fn to test A5(x) support given a classmark2
...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-09 13:40:36 +02:00
Holger Hans Peter Freyther
dd19527cd2
vty: Mark app info strings as const char*.
2010-06-08 16:12:58 +08:00
Harald Welte
7b4913662a
Merge remote branch 'origin/master'
2010-06-01 21:21:20 +02:00
Harald Welte
c226317c9c
add new new gprs_tmsi2tlli() function
2010-06-01 10:47:07 +02:00
Harald Welte
4c053013c9
[VTY] Remove all application specific VTY node definitions from enum
2010-05-31 16:01:59 +02:00
Harald Welte
544037700c
add configure option '--disable-vty' to prevent building libosmovty
2010-05-29 11:49:51 +02:00
Harald Welte
237f6241f2
[VTY] Introduce "struct vty_app_info" for vty_init() function
2010-05-25 23:38:19 +02:00
Harald Welte
4ebdf74728
rename log_info to osmo_log_info to avoid namespace clash with app
2010-05-25 22:28:40 +02:00
Harald Welte
93cf5a38eb
fix typo resultin in dist/distcheck problem
2010-05-25 22:28:40 +02:00
Harald Welte
e352c52ed8
Add pkgconfig for libosmovty
2010-05-25 22:28:40 +02:00
Harald Welte
ab1b819930
make sure we actually install the vty headers
2010-05-25 22:28:40 +02:00
Harald Welte
3fb0b6f26e
Create libosmovty as library from OpenBSC VTY functions
2010-05-25 22:28:39 +02:00
Holger Hans Peter Freyther
75bd69bc91
rate_ctr: Make the struct rate_ctr_group_desc members const
2010-05-23 21:14:32 +08:00
Andreas.Eversberg
0ebd688746
Added some "get"-functions to bitvec of libosmocore.
...
- Getting Low or High value from current postion
- Getting unsigned interger from current postion
2010-05-19 18:14:01 +02:00
Holger Hans Peter Freyther
9a3dec0c01
gsm0808: Add API to wrap a GSM48 msg with a BSSMAP/DTAP msg.
2010-05-16 08:15:40 +08:00