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
Holger Hans Peter Freyther
5dcef3c8b1
gsm48: Add paging response header
2010-05-15 22:35:25 +08:00
Holger Hans Peter Freyther
102bcafb58
gsm0808: Add TLV entries for types used by the Compl Layer3 Information
2010-05-14 07:25:01 +08:00
Harald Welte
d2dce6df04
[rate_ctr] always 'overflow' in next larger inetrval when interval ends
...
If a second ends, we add the number of events in that just-ended second
to the number of events in the currently running minute. The same happens
at the end of a minute: We add the number of events in that just-ended
minute into the number of events of the still-running hour, etc.
This gives a much more meaningful numbers and we don't end up with
"12 events per second, but 0 events per minute" kind of situations
anymore.
2010-05-13 13:28:12 +02:00
Harald Welte
cf734784b0
[rate_ctr] Rename group_prefix_fmt to group_name_prefix
2010-05-13 12:53:35 +02:00
Harald Welte
dd178b2dc9
rate_counters: Remove group-name-sprintf-with-idx string
2010-05-13 12:50:44 +02:00
Harald Welte
087fcff9a5
rate_ctr: Store the numeric index as part of 'rate_ctr_group'
2010-05-13 12:16:17 +02:00
Harald Welte
7b45d60887
Add new 'rate counter' implementation to libosmocore
...
A 'rate counter' is a counter that counts events but also keeps
track of the rate of events (per second, minute, hour and day).
'rate counters' are generally abstracted in 'rate counter groups',
which are instances of a 'rate counter group description'. This
way we can have e.g. a description describing what kind of counters
a BTS (or TRX) has - and we can then create one instance of that
group for every BTS or TRX that exists.
2010-05-13 11:35:30 +02:00
Harald Welte
7638af95fd
logging: add log_vty_{level,category}_string()
2010-05-11 16:39:22 +02:00
Harald Welte
9ac2225ff4
logging: introuduce log_level_str() to obtain the name of a log level
2010-05-11 11:19:40 +02:00
Harald Welte
95df5c0179
msgb: initialize cb[] to zero during msgb_reset()
2010-05-01 23:53:26 +02:00