aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2013-10-08msgb: Add may_alias attribute to struct libgb_msgb_cbJacob Erlbeck1-1/+1
This explicitely allows aliasing of this struct to avoid the warning shown below. Note, that this warning isn't show when '-fno-strict-aliasing' is used. Addresses: gb/gprs_ns_test.c:85:54: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
2013-09-16gsm48: Added 'Network Daylight Saving Time' info elementJacob Erlbeck1-0/+1
This information element has been added to the MM Information message in GSM24.008. This patch adds it to the tlv_definition to keep the TLV parser from breaking. Ticket: OW#978
2013-09-08vty: Add vty_install_default() and use for the vty nodesJacob Erlbeck1-0/+5
This adds the vty_install_default() function that is basically the install_default() function plus the registration of the commands 'exit' and 'end'. The latter is only provided in subnodes of ENABLED_NODE and CONFIG_NONE. The VTY test program is extended to check these commands. Ticket: OW#952
2013-09-04misc: Include time.h for time_t on FreeBSDHolger Hans Peter Freyther1-0/+2
Fix the build after I changed the order of header files in the SMS test.
2013-09-04sms: Implement encoding the address as alphanumeric typeHolger Hans Peter Freyther2-0/+33
The number of digits is the number of used octets times two (two digits per octet). The result has been successfully dissected by wireshark. It has not been tested with real phones.
2013-08-15core: Remove defined() check for OSMO_DEPRECATEJacob Erlbeck1-11/+5
This reverts commit bf991bc0f3006eddf45d494ee7e476a75dbaf36e and fixes the bug instead. It's just sufficient to remove the defined() test, since identifiers that aren't macros are just considered as 0 when used with #if. (see cpp info page, section 4.2.2 'If' in cpp-4.6.info)
2013-08-14core: Fix-up the OSMO_DEPRECATED for older compilersHolger Hans Peter Freyther1-3/+9
The code started to use #if defined(...) but the value was always for GCC/Clang. The only difference was that for older compilers the value of the definition was 0. Conditionally define these macros.
2013-08-14core: Support clang with OSME_DEPRECATEDJacob Erlbeck1-4/+15
Separate feature checking from implementation. Supported are clang and gcc.
2013-08-14core: Move OSMO_DEPRECATED to new core/defs.h fileJacob Erlbeck3-13/+41
Add a new core/defs.h file for definitions that can be used from within header files without including prototypes and extern declarations. It's primarily meant for macro definitions and basic typedefs. Move the definition of OSMO_DEPRECATED there and use compiler version info to avoid compiler errors.
2013-08-12sms: Disable deprecated messageJacob Erlbeck1-6/+20
This is a workaround to make the FreeBSD8.4 and Debian6.0 target build again. The deprecated attribute doesn't have arguments.
2013-08-12sms: Added result buffer size parameter to 7bit conv funsJacob Erlbeck1-7/+52
The 7bit<->8bit encoding/decoding functions didn't check whether there is still enough space in the destination buffer. Therefore a buffer size parameter has been added to each of the functions which is used to truncate the output if the buffer is too small. In addition, the return value of the decoding functions has been changed to number of characters written (excluding \0), so this value is always equal to strlen(decoded). The old functions are still available as wrapper functions.
2013-08-08Add special 7-bit encoding and decoding functions for USSD codingAndreas Eversberg1-0/+2
Handling 7-bit coding is a little different for USSD, as TS 03.38 states: To avoid the situation where the receiving entity confuses 7 binary zero pad bits as the @ character, the carriage return or <CR> character shall be used for padding in this situation [...]. If <CR> is intended to be the last character and the message (including the wanted <CR>) ends on an octet boundary, then another <CR> must be added together with a padding bit 0. The receiving entity will perform the carriage return function twice, but this will not result in misoperation as the definition of <CR> [...] is identical to the definition of <CR><CR>. The receiving entity shall remove the final <CR> character where the message ends on an octet boundary with <CR> as the last character. Jacob has verified the fix with fakeBTS and the wireshark dissector. Fixes: OW#947 Reviewed-by: Jacob Erlbeck <jerlbeck@sysmocom.de>
2013-08-08encoding: Provide an overload for the gsm_7bit_encode and a simple testHolger Hans Peter Freyther1-0/+1
This is required for encoding the SMS header using the alpha numeric rules. Reviewed-by: Jacob Erlbeck <jerlbeck@sysmocom.de>
2013-08-07gsm: Try to clarify why we have gsm_septet_encode in the header fileHolger Hans Peter Freyther1-0/+1
These functions are not meant to be used by applications and are only here for the unit tests. Try to document that.
2013-07-06utils.h: we need to include utils.h for osmo_generate_backtrace()Harald Welte1-0/+2
this causes compiler warnings in user code ever since commit 55cf02221f0654a3f48888f3b13766b671a120f0
2013-07-06libosmogb: Add function to close NS instance without destroying itHolger Hans Peter Freyther1-1/+4
2013-07-06Fix RR cause valuesAndreas Eversberg1-3/+3
2013-07-06Add chan_nr to RACH info at L1SAP interfaceAndreas Eversberg1-0/+1
The chan_nr is required to locate timeslot and subslot of access bursts during handover procedure.
2013-07-06Add RSSI to l1sapAndreas Eversberg1-0/+2
2013-07-06Add MPH and TCH primitives to layer 1 SAPAndreas Eversberg1-3/+72
In order to control layer 1 via primitives, MPH primitives are required. There is only one (MPH-INFO) primitive defined in TS 04.04 for all control and measurement functions. A type identifier inside this primitive is used to differentiate between different functions. The TCH primitives are used to carry traffic. TCH primitives carry voice or data traffic, whereas PH-DATA primitives carry FACCH data. PH_RTS and TCH_RTS (ready-to-send) primitives are used to poll requests from upper layers.
2013-07-06Remove osmo_phsap_prim from lapdm.h and move to a seperate header fileAndreas Eversberg3-49/+55
2013-07-01misc: Fix compiler warnings about the static_assert macro with gcc 4.8Holger Hans Peter Freyther1-1/+1
The modified macro is still working on a gcc 4.7 and gcc 4.8 after the removal of the typedef and addition of the unused attribute. include/osmocom/core/msgb.h: In function ‘msgb_alloc_headroom’: include/osmocom/core/utils.h:40:51: warning: typedef ‘dummyheadroom_bigger’ locally defined but not used [-Wunused-local-typedefs] #define osmo_static_assert(exp, name) typedef int dummy##name [(exp) ? 1 : -1]; ^ include/osmocom/core/msgb.h:386:2: note: in expansion of macro ‘osmo_static_assert’ osmo_static_assert(size > headroom, headroom_bigger); ^
2013-06-29introduce gsm0808_create_reset_ack()Harald Welte1-0/+1
2013-05-23gsm_04_08.h: GSM48_MT_RR_VGCS_UPL_GRANT value correctedBhaskar1-1/+1
2013-05-23gsm_04_08.h: Fix GSM48_CMODE_DATA_3k6 as per 3GPP TS 04.08 / 10.5.2.6.Bhaskar1-1/+1
2013-05-23gsm_utils: refer to ETSI TS 05.08 instead of TS 08.05Bhaskar1-1/+1
2013-03-25gprs_ns: Allow to set the DSCP for the UDP socket.Holger Hans Peter Freyther1-0/+1
Allow to tag the NS service with a custom DSCP.
2013-03-25utils: Use fprintf to print the assertion and generate a backtraceKaterina Barone-Adesi1-1/+2
This is changing the semantic of the assert. The regression tests now either need to check the stderr result, the exit status or print a message when all tests are completed. This is not that bad as the osmo_generate_backtrace is printing to the stdout right now.
2013-03-18logging: add new log_targets_reopen() functionHarald Welte1-0/+1
This function will re-open all existing log files in the application, praticularly useful for SIGHUP handlers in case of logrotate
2013-03-13add new gsm/meas_rep.h file for shared/common measurement report stuffHarald Welte2-0/+30
2013-03-13Add smpp34_osmocom.h for Osmocom SMPP vendor additions0.6.0Harald Welte2-0/+49
2013-03-13gsm_septets2octets(): Input parameter should be constHarald Welte1-1/+1
2013-03-09utils: Introduce OSMO_ASSERT in the utils and use it in the unit testsKaterina Barone-Adesi1-0/+7
The tests should unconditionally assert, regardless of debug settings. This uses the OSMO_ prefix as it's in the global namespace.
2013-02-27Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi4-0/+105
The log target can be used via log alarms and show alarms. Why? This feature was proposed/requested at http://openbsc.osmocom.org/trac/wiki/Tasks/ErrorLogTarget All messages use the same amount of space, prioritizing simplicity.
2013-02-27Revert "Added a ring buffer log target to store the last N log messages."Holger Hans Peter Freyther3-103/+0
I noticed some more issues and it is the easiest to revert and include the fixed version. This reverts commit 73377229bb33ab79682ce4b126a63602d13304ad.
2013-02-27Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi3-0/+103
The log target can be used via log alarms and show alarms. Why? This feature was proposed/requested at http://openbsc.osmocom.org/trac/wiki/Tasks/ErrorLogTarget All messages use the same amount of space, prioritizing simplicity.
2013-02-21Add UMTS RRC message typesTobias Engel1-0/+68
2013-02-15misc: Doxygen tweaks: fixed some typos and minor errorsKaterina Barone-Adesi10-12/+18
Doxygen generates quite a lot of warnings on libosmocore. Some of them are obvious typos - this patch aims to fix such low-hanging fruit.
2013-02-10abis_nm: add parenthesis for new abis_nm_debugp_foh() macroHarald Welte1-3/+3
without this, we break e.g. the openbsc build...
2013-02-10turn abis_nm_debugp_foh() into a macroHarald Welte1-1/+11
this will avoid printing 'abis_nm.c' as the filename in the log, which is pretty useless during debugging. We want to know where abis_nm_debugp_foh() is being used from, not where it is implemented.
2012-12-18Add tlvp_val16_unal() / tlvp_val32_unal() to align 16 and 32 bit valuesAndreas Eversberg1-0/+24
This is required for CPUs < armv6, to access 16 and 32 values at right memory locations.
2012-12-11gsm: Add method to find ARFCN based on frequencySylvain Munaut1-0/+3
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-06rsl: Add the 9.3.20 release mode enum to be used in OpenBSCHolger Hans Peter Freyther1-0/+6
2012-12-06gsm/a5: Return -ENOTSUP if the selected cipher is not supportedSylvain Munaut1-1/+1
Extracted from a patch by Max Suraev Max.Suraev@fairwaves.ru> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-11-22smr: Introduce an id and prefix all log messages with SMR(ID)Holger Hans Peter Freyther1-1/+2
When OpenBSC is handling more than one message at a time it is difficult to see which log message belongs to which SMR instance. Introduce a uint64_t id that can be set to the row_id/message_id and prefix all log messages with SMR(ID). This change is ABI and API incompatible with previous versions of libosmogsm.
2012-11-22smc: Introduce an id and prefix all log messages with SMC(ID)Holger Hans Peter Freyther1-1/+2
When OpenBSC is handling more than one message at a time it is difficult to see which log message belongs to which SMC. Introduce a uint64_t id that can be set to the row_id/message_id and prefix all log messages with SMC(ID). This change is ABI and API incompatible with previous versions of libosmogsm. Example: SMC(100) instance created SMC(100) message MNSMS-EST-REQ received in state IDLE
2012-11-14msgb: fix msgb_pull_u*()Steve Markgraf1-3/+3
msgb_pull returns a pointer to the new begin of the buffer, unlike msgb_get(), where those functions were originally taken from. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-11-14smc: Make it possible to include gsm0411_smc.h as first header fileHolger Hans Peter Freyther1-0/+1
The code embeds the timer so one needs to include the header file.
2012-10-27Add "extern" keywordsTobias Engel1-5/+5
Without the "extern" keyword the variables in this header file will be seen as empty definitions when compiled on OSX.
2012-10-22logging: Make sure to install standard "end" command in VTY nodeHarald Welte1-0/+1
When you are in the config-log VTY node, you expect "end" to work like in any other sub-node of config.