aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-08-04Import gsm48_decode_freq_list() from osmocom-bb/layer230.1.16Harald Welte2-0/+445
This will enable us to use this function from OpenBSC / ipaccess-config
2010-08-04vty: Forward delcare the logging command.Holger Hans Peter Freyther1-0/+2
2010-07-30logging: Make sure we don't use "end of color" code if colors are turned offHarald Welte1-1/+2
2010-07-30add new hexdump_nospc() function0.1.15Harald Welte2-2/+13
2010-07-30move hexdump() from logging.c to utils.cHarald Welte5-20/+21
2010-07-30Import 'hexparse' function from OpenBSC0.1.14Harald Welte2-0/+29
2010-07-25core/msgb: Use the new osmo_panic call to handle errorsSylvain Munaut1-4/+2
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-25core: Add some generic panic handlingSylvain Munaut5-2/+95
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-25build: Use AS_HELP_STRING macro to format the ./configure --help betterSylvain Munaut1-4/+16
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-25osmocore: Add utility function rsl_chan_nr_str to RSLSylvain Munaut2-0/+29
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-23msgb: Avoid warnings that the string might contain %s or such..Holger Hans Peter Freyther1-1/+1
2010-07-23gsm0808: Why should there be a lchan in the parameter...Holger Hans Peter Freyther2-2/+2
2010-07-23gsm0808: Import unaligned mem access fix from on-waves/bsc-masterHolger Hans Peter Freyther2-5/+10
2010-07-23gsm_utils: Move the gsm_7bit_alphabet into the impl and make it staticHolger Hans Peter Freyther2-28/+27
2010-07-22msgb: Check for available headroom/tailroom and abort() if we violate itHarald Welte1-4/+31
2010-07-21gsm_04_12.h: Add beginning of structs for SMS CBHolger Hans Peter Freyther2-1/+33
I am trying to understand the RSL and GSM 04.12 spec to implement CBS for OpenBSC...
2010-07-21gsm_7bit_decode: rtext does not hold a null byte, reduce the sizeHolger Hans Peter Freyther1-1/+1
I have added the + 1 as I thought rtext will hold a terminating null byte but it will not.
2010-07-21tests: don't hardcode length values of expected encoding gsm_7bit_encode:Nico Golde2-15/+16
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-20gsm_7bit_decode: Handle the case of the last charachter being an escapeHolger Hans Peter Freyther1-1/+1
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-20tests: Separate encoding/decoding test to verify them independlyHolger Hans Peter Freyther1-17/+78
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* rewrite GSM 7bit default encoding/decoding based on a lookup table as the ↵Nico Golde3-21/+123
previous code produced wrong encodings for certain characters.
2010-07-15Added crc16 from linux kernel.Ingo Albrecht4-2/+98
2010-07-13[VTY] add support for numeric ranges with negative numbersAndreas Eversberg1-31/+67
This enables us to do something like <-128-127> as a numeric range.
2010-07-13[RSL] split rsl_rll_push_l3() L3 LV pushign and rsl_rll_push_hdr()Harald Welte3-10/+40
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-12Add 3-digit MNC support to gsm48_generate_lai()Andreas Eversberg1-7/+7
2010-07-12Added new IE definitions to gsm_04_08.h of libosmocore.Andreas Eversberg3-21/+554
Also added RR and MM TLV tables to gsm48.c [import from accidential commit to osmocom-bb.git]
2010-07-12Added single octet TV (type + value) to libosmocore.Andreas Eversberg2-0/+9
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-04gsm_utils: Fix typo in gsm band nameSylvain Munaut1-1/+1
thanks to horizon for noticing :p Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-30GPRS: Add 'input' generator functions for GPRS cipher algorithmHarald Welte2-0/+20
2010-06-30Add support for plugins (and specifically GPRS encryption plugins)Harald Welte9-3/+222
2010-06-29[gsmtap] add new gsmtap_makemsg() functionHarald Welte2-8/+28
This generates a gsmtap message without actually enqueueing to a bsc_select style queue.
2010-06-29Add gsmtap utility functions to libosmocore0.1.13Harald Welte4-2/+203
This is imported from OsmocomBB/Layer23
2010-06-25Fix typo in configure script regarding --disable-vtyHarald Welte1-1/+1
2010-06-25[RSL] Added special RSL message types for mobile sideAndreas Eversberg1-0/+4
- suspension DL - resume DL - re-establish DL
2010-06-25[gsm48] fix typo in struct gsm48_req_refAndreas Eversberg1-1/+1
2010-06-15[GSM 04.08] add more RR IEIs0.1.12Harald Welte1-0/+9
2010-06-10gsm48: Add authentication response message0.1.11Sylvain Munaut1-0/+5
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-09gsm_utils: Add a fn to test A5(x) support given a classmark2Sylvain Munaut1-0/+12
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-08vty: Mark app info strings as const char*.Holger Hans Peter Freyther1-3/+3
2010-06-01Merge remote branch 'origin/master'Harald Welte3-42/+22
2010-06-01add new new gprs_tmsi2tlli() function0.1.10Harald Welte2-1/+20
2010-05-31[VTY] Remove all application specific VTY node definitions from enum0.1.9Harald Welte1-41/+2
2010-05-29add configure option '--disable-vty' to prevent building libosmovtyHarald Welte3-0/+10
2010-05-25[VTY] Introduce "struct vty_app_info" for vty_init() functionHarald Welte4-19/+22
2010-05-25rename log_info to osmo_log_info to avoid namespace clash with appHarald Welte2-17/+17
2010-05-25fix typo resultin in dist/distcheck problemHarald Welte1-1/+1
2010-05-25Add pkgconfig for libosmovtyHarald Welte3-1/+13
2010-05-25make sure we actually install the vty headersHarald Welte1-2/+4
2010-05-25Create libosmovty as library from OpenBSC VTY functionsHarald Welte20-2/+6893
2010-05-23rate_ctr: Make the struct rate_ctr_group_desc members const0.1.8Holger Hans Peter Freyther1-4/+4