summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* osmo-auc-gen: umts: add --ind argNeels Hofmeyr2017-08-294-2/+120
| | | | | | | | | | | | During UMTS AKA, the caller typically indicates which IND slot the next used SQN should belong to. Without this option, osmo-auc-gen will always produce SQN from IND-slot 0. Add --ind option. Enhance the osmo-auc-gen_test.sh to expect errors with useful printouts on stderr, and add tests that verify valid --ind ranges. Related: OS#2465 Change-Id: Ib60eec80d58ca9a0a01e7fbd2bcbbd4339b1a6d8
* osmo-auc-gen: umts: use default of ind_bitlen = 5 instead of 0Neels Hofmeyr2017-08-292-2/+3
| | | | | | | | | | | | | | | Most USIM out there seem to use IND-length = 5 bits, so do sysmousim-sjs1. Currently from initialization we are using an IND length of zero in osmo-auc-gen, which produces confusing SQN results after AUTS: Where want SQN to be incremented to the next IND array, usually +32, an IND-len of 0 makes for only +1. As result, the osmo-auc-gen_test.sh produces SQN 32 instead of 24 after receiving SQN.MS = 23 from AUTS: adjust test expectations. Related: OS#2465 Change-Id: I9fcc11fa2b5816302dcc6b72249b1ee40d5a61f5
* osmo-auc-gen: umts: properly request --sqnNeels Hofmeyr2017-08-291-5/+17
| | | | | | | | | | | | The user supplied an --sqn to generate a vector for, but milenage_gen_vec() performs a nontrivial SQN increment before generating the vector. To end up with the user supplied SQN, we need to reverse this increment beforehand. Do this after all cmdline args have been parsed, in case one of them modifies the IND-bitlen parameter, which affects the SQN calculations. Related: OS#2464 OS#2465 Change-Id: Ic51a8f6333fee9c02b4073ca360991d0aa69c74f
* osmo-auc-gen: umts: remove erratic SQN.MS printoutNeels Hofmeyr2017-08-292-7/+0
| | | | | | | | | | | | | osmo-auc-gen tries to be helpful by deriving the SQN.MS from the SQN that resulted from AUTS + milenage_gen_vec(), but there is actually no way to derive the actual AUTS SQN.MS from the resulting SQN. Completely drop the printout to prevent confusion. Adjust test suite expectations. Related: OS#2464 Change-Id: Ie2432c6d6a23818f7b3a29b1295dcbb505e2be53
* cosmetic: test for osmo-auc-gen: print error for missing binaryNeels Hofmeyr2017-08-291-0/+6
| | | | Change-Id: I98c23ae6378a16cf3b76c90d4ea0dfcf61ff3033
* vty: 'ctrl' node: add missing default commands like list,exit,endNeels Hofmeyr2017-08-281-0/+1
| | | | Change-Id: I72569ed767b6a4d792b2867d02caa65520e27cd3
* Update release helperMax2017-08-261-14/+25
| | | | | | | | | | | | * add reference to semver spec * use 'patch' release by default * unify debian/changelog distro update for library and non-library projects * abort library release for non-empty TODO-RELEASE if libversion is not modified Change-Id: I413f99cbfa6e6dcc753e3be9fc3c8d682e6a41f3 Related: OS#1861
* Use value string check from osmo-ciMax2017-08-253-36/+4
| | | | Change-Id: I513835be2d931d0a931cdfc996f361a451bc1a15
* Relax branch restriction while making releaseMax2017-08-241-1/+1
| | | | | | | | | Previously making release of non-library project from non-master branch would fail. Relax this check to facilitate submission to gerrit via topic branches. Change-Id: Ie89b79a45033bee422e4ff898069ea6ac2c2f524 Related: OS#1861
* gsm0411_utils: GSM03.40 9.2.3.11 SCTS should be localKeith2017-08-171-1/+1
| | | | | | | | From GSM 03.40: "The Service-Centre-Time-Stamp, and any other times coded in this format that are defined in this specification, represent the time local to the sending entity." Change-Id: I4efdb1eaae43aced33961b64d4f14b0040321c10
* ports.h: Add VTY port for GGSNHarald Welte2017-08-161-0/+2
| | | | Change-Id: I5bd49fbc19e88db96b4adbd56c82e7936059551c
* auth_milenage: Fix non-AUTS case with OPHarald Welte2017-08-161-12/+24
| | | | | | | | | We only implemented OPC generation from OP in the AUTS case, but not in the case of normal authentication vector generation. This never really was visible so far due to the fact that we use OPC at sysmocom, and never the shared OP value. Change-Id: Id3fa038dfc2ff1ba63616fa5e8eab0520481ff26
* add osmo_fd_setup() convenience function to fill-in osmo_fdHarald Welte2017-08-122-0/+22
| | | | | | | | This basically follows the concept of osmo_timer_setup() and allows the caller to fill-in all configurable fields of osmo_fd in one line of code, rather than open-coding it in 5 lines everywhere. Change-Id: I6dbf19ea22fd65302bfc5424c10418d1b7939094
* tlv: add [msgb_]t16lv_put() for 16bit tag + 8 bit len TLVsHarald Welte2017-08-091-1/+20
| | | | | | | | | | | In the Protocol Configuration Options IE (see 3GPP TS 24.008 10.5.6.3) there is yet another new TLV format (derived from PPP IPCP/LCP/...) which uses 16bit tag and 8bit length. Let's add functions so we can generate related TLVs. Parsing is unfortunately not possible in our existing structure as our tlv_parsed array only has 256 entries and thus cannot cope with 16bit tags. Change-Id: I9799130e2eba8fae8c4480fbb8a900c30232b694
* Add osmo_gprs_{ul,dl}_block_size_{bits,bytes} functionsHarald Welte2017-08-093-0/+121
| | | | | | Those functions can be used to look up the size of (E)GPRS blocks. Change-Id: I05ff75ef7dfae639886bbd09fe35f03a8af9d988
* Add release target to MakefileMax2017-08-084-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add simple helper target to automate basic release steps: * version bump * prepare release commit * git commit, tag and sign For library projects: * update debian/changelog from TODO-RELEASE * cleanup TODO-RELEASE For non-library projects: * update debian/changelog from git log Note: it requires bumpversion package to be installed, debian/control is adjusted accordingly. The helper itself is installed to facilitate reuse by other libraries. N. B: you still have to manually adjust LIBVERSION in previous commit - see TODO-RELEASE header for details. Use it as follows: make REL=minor release The REL parameter defines which component of the version [1] to bump and can be any of { major, minor, patch }. [1] http://semver.org/ Change-Id: I790ceb958195b9f6cbabfe8c977dc30e2bd7414b Related: OS#1861
* RSL: Add support for RSL_CHAN_OSMO_PDCH to rsl_dec_chan_nr()Harald Welte2017-07-301-0/+3
| | | | Change-Id: Icc772285636c06e1075a89809f0ac379d7a0002c
* Rename GSMTAP_CHANNEL_PDCH to GSMTAP_CHANNEL_PDTCHHarald Welte2017-07-291-1/+3
| | | | | | | PDCH is the physical channel, while actually we want to talk about PDTCH the logical channel. Introduce backwards compatibility define. Change-Id: Id6782d2247846e2db29fc58d98684970a66db948
* chantype_rsl2gsmtap/gsmtap2rsl: Fix PDCH channel type conversionHarald Welte2017-07-281-1/+4
| | | | Change-Id: I88a06e8ba894f16006a8efa259fc536cf300de32
* BSSGP: add function to reset all PTP BVCMax2017-07-283-1/+28
| | | | | Change-Id: I9bf8f4dd784ccddbb9926492a85fff3293a0e913 Related: OS#1638
* GSUP: define default GSUP port as 4222Neels Hofmeyr2017-07-221-0/+2
| | | | | | | | | | | See also: https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers https://gerrit.osmocom.org/#/c/3195/2/include/openbsc/osmo_msc.h@13 (change-id I639544a6cdda77a3aafc4e3446a55393f60e4050) Change-Id: I4222e21686c823985be8ff1f16b1182be8ad6175
* osmo_sock_init2(): Fix creation of non-bound socketsHarald Welte2017-07-211-1/+1
| | | | | | | | | If osmo_sock_init2() was used with CONNECT flag but without BIND flag, an invalid check for "did we create a socket yet" caused the socket to never be created, and subsequently the entire function to return an error. Change-Id: I0206dbb9c5b8f74d7fb088576941b092acd2ca22
* add DLMGCP logging category for libosmo-mgcpNeels Hofmeyr2017-07-182-1/+7
| | | | | | | In the course of splitting up the openbsc.git repository, we will create libosmo-mgcp and need a library logging category for that purpose. Change-Id: I09c587e2d59472cbde852d467d457254746d9e67
* extend osmo_sysinfo_type with missing SYSINFO_TYPEHarald Welte2017-07-151-1/+6
| | | | | | The list should now be complete up to Releae 14 Change-Id: I693cabe1a3b00a8c4198f7a4a1c647c5d7dc6c41
* LC15: add NM measurement type to standard attribute listMinh-Quang Nguyen2017-07-141-0/+1
| | | | Change-Id: I320b379429aaf0f7351aed5e4f72a481cc268c05
* LC15: Add IPAC Directed Retry Enquiry data structureMinh-Quang Nguyen2017-07-141-0/+7
| | | | Change-Id: I8d2746eefe1f22dba5b19636ebc9444e458fc802
* LC15: Enable string for IPAC RSL direct retryMinh-Quang Nguyen2017-07-141-0/+1
| | | | Change-Id: I3e69fba0e21e181d28baee90e95f57216f2617af
* IPAC manufacture-defined measurement pre-processing definitionsMinh-Quang Nguyen2017-07-142-0/+127
| | | | Change-Id: Ie1853697f4cff5ff98654fa1cae6c68e28a0076b
* socket: Add new OSMO_SOCK_F_NO_MCAST_ALL optionHarald Welte2017-07-132-0/+12
| | | | | | | Using this option at socket creation, the caller can request disabling the IP_MULTICAST_ALL socket option. Change-Id: I5ab5de45c0b64ceb3636ea98245a23defa24ffd4
* socket: Allow disabling multicast loop on socket creationHarald Welte2017-07-132-4/+18
| | | | | | | | | | | This introduces a new flag OSMO_SOCK_F_NO_MCAST_LOOP, which can be used to disable the looping back of multicast packets transmitted throug this socket to other local sockets on the machine. As this looping-back is active by default, a single option to deviate from the default is deemed sufficient. Change-Id: I24a5b1ebc3f84d2d5d4734e54df50efaea26490b
* socket: Unify listen() calls and check for erroneous returnsHarald Welte2017-07-131-20/+33
| | | | | | | | | We had three places at the end of socket initialization functions calling listen(). Let's unify that and fix some bugs: * close + return error in case of bad listen() result * don't call listen() on AF_UNIX SOCK_DGRAM sockets Change-Id: I7e8dbe3c0486bb3b9810b0add1331e93fc106d82
* socket.c: Add multicast related convenience functionsHarald Welte2017-07-132-0/+141
| | | | Change-Id: Id703e7a7a1e065181a4c76c088b8dcc1b7fe15a2
* select: Add new osmo_fd_close() functionHarald Welte2017-07-132-0/+18
| | | | | | | | | This is a convenience helper that will both close a fd, mark it as closed and unregister it from the event loop abstraction. In most cases, you probably actually want to use it instead of manually closing and calling osmo_fd_unregister(). Change-Id: Icd0933eed6a24edde7cdcb378e138897ecc5332c
* gsmtap: Add value_strings for GSMTAP_TYPE and GSMTAP_CHANNELHarald Welte2017-07-132-0/+48
| | | | Change-Id: Iaf8a99912f42a56ef785a1642e18238c0b67cf68
* gsmtap_util: Add chantype_gsmtap2rsl() as inverse of chantype_rsl2gsmtap()Harald Welte2017-07-132-1/+41
| | | | Change-Id: Ie1bc00670887064da0fea61c3dab036c23ceea25
* utils: add function gsm_fn_as_gsmtime_str()Philipp Maier2017-07-113-0/+15
| | | | | | | Convert a given frame number into a printable string that displays the sub components of the frame number. Change-Id: I8015d2ded3940b01b35df7b72fc35c70c25e9926
* Add pseudo-random bit sequence generator to libosmcooreHarald Welte2017-07-108-3/+175
| | | | | | | These PRBS sequences are specified in ITU-T O.150. They are typically used as test data to be transmitted for BER (bit error rate) testing. Change-Id: I227b6a6e86a251460ecb816afa9a7439d5fb94d1
* gsm_04_08.h: Add struct for 9.1.13b GPRS suspension requestHarald Welte2017-07-101-0/+8
| | | | Change-Id: I90113044460a6c511ced14f588876c4280d1cac7
* Ignore broken everything log levelMax2017-07-101-2/+9
| | | | | | | | | | | | | | | | * when reading config file (or vty command) ignore "logging level .. everything" level * when writing config file, skip "logging level .. everything" level In both cases print corresponding deprecation warning. The "everything" level is not working as advertised for quite some time anyway. This will allow us to gradually deprecate broken "everything" parameter giving users enough time to update their config files before removing it entirely. Change-Id: I73d5c4f238beb88981ad25caa69f64ad6fb7209f Related: OS#71
* gsm_utils: Add osmo_dump_gsmtimePau Espin Pedrol2017-07-103-0/+15
| | | | | | Used by osmo-bts, moved from osmo-bts l1sap.c:dump_gsmtime. Change-Id: Ib5452e2c20f53006c0f6d197fb055728947125d8
* gsm_04_08/sgsn: Add another IE for internal usage in the sgsnHolger Hans Peter Freyther2017-07-091-0/+1
| | | | | | | | | The PDP charging characteristics will be returned from the PDP selection code and be used in the SGSN. It is following the same approach as the QoS and PDP addr. It is a bit of a pity that we have to define this in a different project. Change-Id: I7815c5dfd7b7fb0ea78d816ebfb3abfbf0090afe
* Deprecate wrappers around loglevel_strsMax2017-07-081-2/+2
| | | | | | | | Add deprecation notice for public API use: it shouldn't be used outside of libosmocore anyway. Change-Id: I792e30dc44f027fd94e1f65af19fe08bac52b95c Related: OS#71
* gsup: Add encoding/decoding for the pdp charging characteristicsHolger Hans Peter Freyther2017-07-074-5/+36
| | | | | | | | These fields can be in the ISD and the PDP Context inofmration. Store pointers to this IE in both cases. It needs to be used by the SGSN when opening a PDP context. Change-Id: Iedc7c02adcf77ca5c9545119e19c968dfbbb3e6b
* configure.ac: Add --disable-doxygen flagPau Espin Pedrol2017-07-061-1/+7
| | | | | | | This flag, when set, allows to unconditionally disable doxygen documentation generation, even if doxygen command is found. Change-Id: Iba1440292116af27b267c7a1fbec1c2336784efe
* osmo_sock_get_name(): clearly indicate local and remoteNeels Hofmeyr2017-07-032-5/+5
| | | | | | | | | | | | | | | | In a string like 127.0.0.1:2905<->127.0.0.1:60661 it is hard to tell which is the local part. I'd have expected it on the left, but it is actually on the right. To avoid doubt and bypass bikesheds on which side should be what, clearly mark the two sides as remote and local. (r=127.0.0.1:2905<->l=127.0.0.1:60661) Change-Id: I43dcc6a1906429bd0955fd7fe2eb5b8495b592d8
* Add missing BSSGP cause valuesMax2017-07-012-40/+114
| | | | | | Add values from 3GPP TS 48.018 Change-Id: Ie39a6c91a46d179392d861805a106743a07c6fb0
* l1sap.h: Add ber10k and lqual_cb to ph_tch_paramPau Espin Pedrol2017-06-301-0/+2
| | | | | | | These fields are required in osmo-bts to do low link quality checks in a generic way. Change-Id: If4ae20c22b881e94585dad710f17b9e37f77bf82
* BSSGP: handle BVC-RESET-ACKMax2017-06-281-0/+3
| | | | | | | | | | | | | That's necessary for SGSN to properly handle BSS response to reset procedure initiated by SGSN (foe example via 'bssgp bvc nsei 101 bvci 0 reset' command). According to 3GPP TS 48.018 ยง8.4 "after performing the BVC Reset procedure all affected BVCs are assumed to be unblocked at the SGSN" so there's no need in any special handling. Change-Id: I90dfbd0195a8403406429ccc746299d072445f7b Related: OS#1638
* deb: fix build by adding libosmogb doc packageMax2017-06-274-0/+24
| | | | | Change-Id: I3fe45feaee4033c17e25c4c0552d54a81d9b44f5 Fixes: OS#2340
* doxygen: gsm: do not exclude include/gsm/protocol/*Neels Hofmeyr2017-06-251-1/+1
| | | | | | | | | | | | | Clear out the EXCLUDE tag to not exclude anything. Tried to add API doc to gsm/protocol/gsm_08_08.h and after a long time found out why they are not appearing in the API doc. The original reason to exclude these files was that we were not going to copy-paste descriptions from the 3GPP specs. Nevertheless, for an API doc reader it is helpful if all data structures are listed and linked. Change-Id: Ib569a46f00866bdaa4017f803d85f625ae011316