Holger Hans Peter Freyther
50cfb780d2
vty: Move the assumption of the config nodes into a function
...
Move the assumption that something is a child of the CONFIG_NODE
into a new function. The next step will be to use something else
for that.
2010-08-26 15:00:52 +08:00
Harald Welte
5ea4498c28
add header file for osmo_daemonize()
2010-08-25 19:25:37 +02:00
Harald Welte
b6cb023c7b
Add helper function 'osmo_daemonize()' to convert process into daemon
2010-08-25 19:24:26 +02:00
Harald Welte
72d0c536e9
logging: add missing include file changes for last commit (logfile)
2010-08-25 19:24:00 +02:00
Harald Welte
3086c394de
logging: add log target logging into text file and log target destroy function
2010-08-25 19:10:50 +02:00
Harald Welte
0083cd381c
logging: rename tgt_stdout to tgt_file
2010-08-25 18:10:19 +02:00
Harald Welte
d4bb7ab66b
add debian packaging related information
...
Using the debian directory in this commit, it is possible to generate
libosmocore and libosmocore-dev packages (dpkgs).
2010-08-24 15:17:13 +02:00
Harald Welte
f47df64a3b
[GPRS NS] Fix memory leak in gprs_ns_sendmsg() error path
...
When gprs_ns_sendmsg() succeeds in sending the message, we free()d the
msgb after transmitting it on the socket. However, if the NS-VC is
blocked or some other error condition exists, we returned an error
code but didn't free the msgb.
This resulted in an error leak which is now being addressed.
2010-08-09 21:15:40 +08:00
Holger Hans Peter Freyther
43558316bc
bsc_fd: Add a build option to be able to debug fd list corruption
...
bsc_register_fd on an already registered fd can corrupt the list
in a heavy way and make the select end in an infinite loop, this
code will workaround the issue and provide a way to set a breakpoint
at the right position in the code.
2010-08-06 06:50:23 +08:00
Holger Hans Peter Freyther
c2b7f92a6c
gsm0808: Add some more TLV definitions coming from the cellmgr_ng
2010-08-04 18:53:16 +08:00
Harald Welte
1523d7039d
Import gsm48_decode_freq_list() from osmocom-bb/layer23
...
This will enable us to use this function from OpenBSC / ipaccess-config
2010-08-04 11:46:44 +02:00
Holger Hans Peter Freyther
18e6298e88
vty: Forward delcare the logging command.
2010-08-04 06:34:06 +08:00
Holger Hans Peter Freyther
7bb0eb9ef5
Merge branch 'on-waves/mgcp'
2010-08-03 03:05:33 +08:00
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
Harald Welte
b73631455b
[gprs] BSSGP: Fix null pointer dereference
...
Zecke has found this using "make CC="clang --analyze"
2010-07-23 22:00:45 +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
a1726e9f6b
Merge branch 'on-waves/mgcp'
2010-07-23 18:59:52 +08:00
Holger Hans Peter Freyther
0bfe1eb569
Merge branch 'on-waves/sccp'
2010-07-23 18:42:27 +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
0e43007f78
[SGSN] BSSGP: Print TLLI as hex value like everwhere else
2010-06-30 09:01:35 +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