Commit Graph

462 Commits

Author SHA1 Message Date
Harald Welte 6729a9776a make sure to register DF.TELECOM and DF.GSM for SIM, USIM + TSIM
before we only did it partially, and by exporting data from sim,
rather than the new osim_int_cprof_add_{gsm,telecom}() functions.
2014-10-26 19:50:55 +01:00
Harald Welte 67354b1b4e sim: add missing const to reader_ops member of reader_handle 2014-10-26 19:50:55 +01:00
Harald Welte 55790aa09a sim: Prepare infrastructure for protocols != T=0 and other drivers 2014-10-26 19:50:51 +01:00
Harald Welte 586d710e05 sim: More comments in sim.h 2014-10-26 19:09:24 +01:00
Harald Welte aad7e0664b sim: Make TETRA SIM (TSIM) support compile 2014-10-26 19:09:24 +01:00
Harald Welte e8dd2bd4b5 sim: mark osim_msgb_cb as __may_alias__ to avoid gcc warnings 2014-10-26 19:09:23 +01:00
Harald Welte 2656e65bed sim: Add sfi to EF_*() macros 2014-10-26 19:09:23 +01:00
Harald Welte 1e0dfdad69 sim: Add minimal/recommended size of file / record 2014-10-26 19:09:23 +01:00
Harald Welte d83d29610a sim: further updates/fixes 2014-10-26 19:09:23 +01:00
Harald Welte 7674960ffa sim: add decoding of status words 2014-10-26 19:09:23 +01:00
Kevin Redon 43eabeeeaa sim: replaced function/structure comments with doxygen comments
affected files: sim.h, sim/core.c
affected funtions/strucutres: osim_new_apdumsg, osim_apdu_case,osim_apdu_cmd_hdr, osim_msgb_cb
2014-10-26 19:09:23 +01:00
Kevin Redon dede831fcd sim: add comment/explaination for structure osim_msgb_cb 2014-10-26 19:09:23 +01:00
Kevin Redon 1707306da5 sim: add comment/explaination for structure osim_apdu_cmd_hdr 2014-10-26 19:09:23 +01:00
Kevin Redon e07967f689 sim: renamed case to the one defined in ISO7816-3
APDU_CASE_2 becomes APDU_CASE_2S
APDU_CASE_2_EXT becmoes APDU_CASE_2E
APDU_CASE_3 becomes APDU_CASE_3S
APDU_CASE_3_EXT becmoes APDU_CASE_3E
APDU_CASE_4 becomes APDU_CASE_4S
APDU_CASE_4_EXT becmoes APDU_CASE_4E
2014-10-26 19:09:23 +01:00
Kevin Redon 6956ee1ba1 sim: add comment/explaination for structure osim_apdu_case 2014-10-26 19:09:22 +01:00
Harald Welte d54c2ee8c5 initial checkin of 'libosmosim' 2014-10-26 19:09:22 +01:00
Harald Welte cac3cd6fcd msgb: make msgb_get() finally work as expected 2014-10-26 19:08:43 +01:00
Jacob Erlbeck 0540d839ac gprs-ns: Let gprs_nsvc_reset return a value
Currently gprs_nsvc_reset does not return any value.

This patch changes the function to return an integer, where a value
less than zero indicates an error. The value is taken from the
gprs_ns_tx_reset function. In case of failure, an error message is logged.

Sponsored-by: On-Waves ehf
2014-10-09 07:47:20 +02:00
Harald Welte fb84f325b8 logging: Add ability to save/print current log filters
This enables the persistent configuration of let's say
'log filter imsi 012345678' for a given log file in the config
file.
2014-08-25 10:09:42 +02:00
Harald Welte 276ca4b172 gsm48.h: define the reserved TMSI in libosmocore, not openbsc 2014-08-24 17:35:19 +02:00
Harald Welte f39aed6942 add port number 4238 for BTS control interface 2014-08-24 16:52:54 +02:00
Harald Welte 39c9e7b471 libctrl: Add support for 'deferred control commands'
Sometimes a control interface command cannot be processed
and responded immediately, but we need to process it asynchronously.

In order to support this, we introduce the 'ctrl_cmd_def', which
represents such a deferred command.  It is created by the service
implementing the command using ctrl_cmd_def_make(), and a response is
later sent using ctrl_cmd_def_send().

ctrl_cmd_def_is_zombie() must be called to handle the case where
the control connection has disconnected/died between receiving the
command and sending the response.
2014-08-24 16:52:54 +02:00
Harald Welte 5ddd435919 Convert recently-introduced header files to #pragma once 2014-08-21 15:42:44 +02:00
Harald Welte c7947ed1f6 New <osmocom/ctrl/ports.h> file listing tcp ports for CTRL interface 2014-08-21 15:34:19 +02:00
Harald Welte ae2fcb22cf rename controlif_setup() to ctrl_interface_setup()
which means that all control interface related functions now have
the common ctrl_ prefix.
2014-08-21 15:34:19 +02:00
Harald Welte 528134b01c libctrl: Move bulk of control node lookup inti libosmoctrl
The control interface user now only has to register a very short
node lookup function callback.  This function is optional, and only
required if hierarchical command lookup should be supported.
2014-08-21 15:34:18 +02:00
Harald Welte c78e74e3d0 libctrl: remove 'struct gsm_network' references
libctrl doesn't need any knowledge about the type of the user-private
data that it gets passed upon setup time and includes on callbacks.
2014-08-21 15:34:18 +02:00
Harald Welte d8db92c578 libctrl: remove bsc-specific declaration
this was moved by accident when importing the code from openbsc.
2014-08-21 15:34:18 +02:00
Harald Welte 3ff81b1a6b libctrl: autotools build system integration
Now we actually build the recently-imported libctrl
2014-08-21 15:34:18 +02:00
Harald Welte 7fd0c830d9 libctrl: Add DLCTRL as logging context for the control interface
... and make libctrl code use it
2014-08-21 15:34:18 +02:00
Harald Welte f3c7e85d05 libctrl: remove reference to bsc_replace_string()
... and rather introduce a general osmo_talloc_replace_string() to
libosmocore.
2014-08-21 15:34:17 +02:00
Harald Welte 1238cc64d7 libctrl: remove openbsc headers, convert from make_sock to libosmocore 2014-08-21 15:34:17 +02:00
Harald Welte dda4225153 libctr: rename/move control interface to libosmocore naming scheme 2014-08-21 15:34:17 +02:00
Harald Welte 28570a4e62 new <osmocom/vty/ports.h> file listing VTY tcp ports
imported from http://openbsc.osmocom.org/trac/wiki/PortNumbers
2014-08-21 15:34:11 +02:00
Harald Welte e391996947 ipa: rename functions for consistency
As we are breaking builds by moving functions from libosmo-abis to
libosmocore anyway, we might as well give functions more appropriate
names.  ipaccess is a company, while IPA is the multiplex protocol, and
CCM is the protocol used for establishing identities on the IPA
multiplex.
2014-08-20 23:16:36 +02:00
Harald Welte 28aa991c2f import various generic IPA related functions from libosmo-abis
libosmo-abis is about forming A-bis interfaces/lines by means
of E1 or the IPA multiplex (or possibly other link layers).

The IPA multiplex is used in other contexts, such as the Control
interface, or the A interface.  In that context, it makes sense to
have generic IPA related functions in libosmocore.
2014-08-20 23:16:34 +02:00
Harald Welte fe3e42bdcb Add osmo_get_macaddr() function to obtain etherent mac address
This used to be private in osmo-bts/common/abis.c, where it really
didn't belong.
2014-08-18 19:19:45 +02:00
Harald Welte 40d56f96b9 osmocore: Add function osmo_macaddr_parse() to parse ETH MAC address 2014-08-18 19:03:40 +02:00
Harald Welte cc27fa6479 TLV: add TLVP_PRES_LEN() definition to check for existance + minimum length
This is an import from osmo-bts where it was introduced in
6b561bb7ba5f10c5fd96542a7e42de2822352a67
2014-08-18 15:31:04 +02:00
Harald Welte 900e180f91 ipaccess.h: Add IPAC_PROTO_EXT_ORC for OML Router Control 2014-08-18 11:34:17 +02:00
Harald Welte 8d5180e003 abis_nm: add abis_nm_msg_disc_names[] value_string 2014-08-17 19:36:26 +02:00
Harald Welte 604d552e49 abis_nm: introduce abis_nm_{osmo,ipa}_magic[]
... used to be oml_{osmo,ipa}_magic in osmo-bts
2014-08-17 18:42:58 +02:00
Harald Welte 92107dfd3b update TS 08.08 header + TLV definitions to TS 48.008 / 11.7.0
This adds support for A-over-IP and LCLS related message/IEI
definitions.

Old definitions are in decimal, which is very hard (at least for me)
to compare with the binary tables in the spec.  Hex is much easier
to manually compare for completeness/correctness.  I didn't touch
the existing definitions, but think they should move to hex, too.
2014-06-21 23:16:20 +02:00
Harald Welte c8585cf408 update gsm_08_08.h to Release 11 2014-06-21 22:28:12 +02:00
Sylvain Munaut 5469ef837a core/bitXXgen: Don't do 'return' in functions returning void
ISO C forbids 'return' with expression, in function returning void

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-16 16:39:08 +02:00
Sylvain Munaut 3baa0d6ab5 core/bitXXgen: Use explicit cast of void* to uint8_t
Turns out we use this header in C++ code ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-16 16:38:31 +02:00
Sylvain Munaut 579a7103a1 gsm: Add Kasumi cipher implementation
Submitted-by: Max <max.suraev@fairwaves.co>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-16 14:59:30 +02:00
Max e2c1390d1b bits: Add left circular shift function
Submitted-by: Max <max.suraev@fairwaves.co>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-16 14:36:37 +02:00
Max 5377701746 core: Add generic LE/BE load/store uint type convertors and use them in msgb
Submitted-by: Max <max.suraev@fairwaves.co>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-16 14:33:27 +02:00
Sylvain Munaut 12ba778afd include: Switch to #pragma once pattern
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-16 10:17:27 +02:00