aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2021-03-27add BTS_FEAT_VAMOSNeels Hofmeyr1-0/+1
Change-Id: Ic3bd1b8075f76d1f35499faa68fad70698ee9a00
2021-03-24gprs_ns2: rework logging of Rx and Tx NS PDUAlexander Couzens1-1/+3
Introduce 2 new logging sub systems for signal and unit data. Unify log messages so all log messages look similiar. Log also Rx PDUs. Ensure dropped Tx packets (BLOCK/RESET on SNS) contain *Tx*. Change-Id: I34b8fde2955ecc010d1dcd9512e1bba9211e2c0d
2021-03-24gprs_ns2: Introduce gprs_ns2_create_nse2() for SGSN side SNSHarald Welte1-0/+3
gprs_ns2_create_nse() doesn't allow the caller to specify if the BSS or the SGSN role of IP-SNS shall be implemented. Add gprs_ns2_create_nse2() to fix that. Change-Id: I6db8c36f7c69b592d7d0fbcf323804f7e9912be2 Related: OS#3373
2021-03-18tlv: Fix length returned by t{l16,16l}v_putDaniel Willmann1-2/+2
Every other function returns a pointer to the first byte after the tlv that was just written. tl16v seems to be a copy and paste error from tlv16 above and t16lv seems to count the 16-bit tag twice. The new tests verify that the return value of *_put(buf, tag, len, val) points to buf + *_GROSS_LEN(len). Change-Id: I268a7e11fb5dce67ce1bd7974ab86c4d2bd002f7
2021-03-05TODO-RELEASE: Request increasing _LAST_OSMOVTY_NODE next releaseHarald Welte1-0/+7
We've used up all but one "library reserved" VTY nodes at this point, and we should definitely add some more reserved nodes in the next libosmovty ABI version / release. Change-Id: Idfe1e7d97f3f29fc219e80dcb6ce6bb768733adf
2021-03-01gprs_bssgp: add support for SGSN oriented RESETAlexander Couzens1-0/+2
To support SGSN oriented RESET introduce a role flag to track what's running the gprs_bssgp (local side). Related: OS#3879 Change-Id: Ibcbaffa94cbdc4296a8a7c372304ac11d50d9559
2021-02-20logging: Deprecate API log_set_print_filenamePau Espin Pedrol1-1/+1
Let's flag the API as deprecated so that people start using log_set_print_filename2() API instead, which has less ackward behavior implications like changing the print status of category-hex. Related: OS#5034 Change-Id: If9b6b322989536a12094e6105c3aabc84d8be24a
2021-02-19logging: Allow prefixing thread ID to each log linePau Espin Pedrol1-0/+3
Related: OS#5032 Change-Id: I38fc93ab0182b4edbd639c7ed0f31ce51964ee18
2021-02-19gprs_ns2: rework IP-SNS bindsAlexander Couzens1-0/+2
Introduce a `ip-sns-bind BINDID` vty command within a `nse` vty object. The ip-sns-bind defines the binds which will be used by the dynamic configuration with IP-SNS. This is only the first part which only uses the binds when doing a new SNS configuration. The outgoing add procedure will be supported in a later patch when the SNS fsm supports outgoing procedures. This is a behaviour change of the API and must be synchronized with the osmo-pcu. Otherwise SNS won't work with osmo-pcu. Related: SYS#5354 Change-Id: I9ab8092bf286e7d90e92f5702a5404425e959c84
2021-02-18gsm: Introduce API osmo_gsm48_rest_octets_si13_decodePau Espin Pedrol1-1/+2
Related: SYS#5358 Change-Id: I74fb0a3afc1ac4aadbfc609b882d929401f790eb
2021-02-17Introduce osmo_gettid() APIPau Espin Pedrol2-0/+34
This API wraps conventional gettid() linux-specific API, which even in Linux itself is sometimes not properly supported/announced. This API also allows future porting to other platforms if needed, and so far falls back to getpid() if no gettid(9 can be found. Code ported from osmo-trx.git, see commit 7a07de1efd4eb7cc11c33d3ad25cb2df70aa1ef1. Related: OS#5027 Change-Id: Id7534beeb22fcd50813dab76dd68818e2ff87ec2
2021-02-16gsm_08_58, gsm_44_004: add struct for l1 informationPhilipp Maier3-0/+36
Libosmocore currently does not offer any structs to encode and decode the l1 information on RSL level and the sacch l1 header on the air interface level. Both structs are identical but the field order in the first octet is reversed. Change-Id: I23c1890b89d5a0574eb05dace9f64cc59d6f6df7
2021-02-16gprs_ns2: inform the NS user (BSSGP) about the MTU of a NSEAlexander Couzens2-0/+8
The BSSGP layer needs to know the MTU of the NS UNIDATA payload. The MTU can be 0 if the NSE doesn't contain any NSVC. Every status indication will contain the mtu value. The MTU in the status indication contains the maximum transfer unit of a BSSGP message. From NS side the maximum SDU. Related: OS#4889 Change-Id: I5016b295db6185ec131d83089cf6c806e34ef1b6
2021-02-13gsm: Fix bitfield order in dtap_headerPau Espin Pedrol1-3/+3
This bitfield was added later and all osmocom code still uses the old field contain 1 byte "link_id". There's only one known user of the new bitfield which only uses it to log the SAPI name in osmocom, so no logical breakage is expected with this change (other than fixing a log line). While at it, fix a typo in comment describing related enum. Related: SYS#4909 Fixes: 392f607f2d42eb2839ccfc4c1b9e2c7cfaf3bcc2 Change-Id: I84866f03ee642aa7f1da273c93a16a38234cfa67
2021-02-12bssgp_bvc_fsm: Consistent namingDaniel Willmann1-3/+3
bssgp_bvc_get_features_* are fsm "methods" and the name should indicate that just lika all other function names in bssgp_bvc_fsm.h Change-Id: I30fbbe36cdabf9635eaf4dfb1e93c8ce0f667b39
2021-02-12bssgp2_enc_status: Truncate STATUS message to maximum PDU lengthDaniel Willmann1-1/+1
Related: OS#4889 Change-Id: Ic39d918c56399ceb0431299ce938e3bf276f678a
2021-02-12bssgp_bvc_fsm: Set/get maximum BSSGP PDU lengthDaniel Willmann1-0/+3
Add functions to get/set the maximum supported BSSGP PDU size by the NS layer. IPv4 and IPv6 should not matter since we can just enable IP fragmentation and send NS PDUs up to 2**16 + bytes. Frame relay does not support fragmentation and this is the reason we need to be aware of the maximum PDU size. Luckily with 1600 bytes the MTU in frame relay can hold a regular IP packet including NS/BSSGP overhead. On the NS layer this corresponds to the size of an NS SDU in NS-UNITDATA (3GPP TS 48.016 Ch. 9.2.10) Change-Id: I9bb82ead27366b7370c9ff968e03ca2113ec11f0 Related: OS#4889
2021-02-12gprs_ns2: add signalling & data weights for UDP bindsAlexander Couzens1-0/+2
Allow to assign a signalling and data weight to UDP binds. Those weights will be used when doing dynamic configuration over IP-SNS. This is only the first part which only uses the assigned weights when doing a new SNS configuration. The outgoing change weight procedure will be supported in a later patch when the SNS fsm supports outgoing procedures. Related: SYS#5354 Change-Id: I5133e4229377d44772a9af28628a2bc420fea34b
2021-02-08Fix struct bitfields on big endian systemsPau Espin Pedrol2-0/+81
Changes done by contrib/struct_endianess.py. Change-Id: Ia9cb1ef2ba2bfff9ef713c7d1cf388931dae1c46
2021-02-06tlv: clarify documentation for msgb_tv{16,32}_put()Vadim Yanitskiy1-2/+2
Change-Id: Ie439822e0587012e108f67ba4e73771dc684b95b
2021-02-06tlv: add msgb_tv32_put(), similar to msgb_tv16_put()Vadim Yanitskiy1-0/+10
Change-Id: I11301b20038aa5d90d46d968f7eda3d53b560022
2021-02-04gsm48: add compare function for struct gprs_ra_idPhilipp Maier1-0/+1
Comparing struct gprs_ra_id using memcmp can be error prone, so lets add a compare function to compare two struct gprs_ra_id values reliably. Change-Id: I4d7558c04d9d01761516526086be5104bb2eeada Related: SYS#5103
2021-02-02frame_relay: Add status call-backs for link + DLC status changesHarald Welte1-2/+9
Change-Id: Iec19db4e48642c3fcb0aa11fa7787b8323fd0e5a Related: Os#4999
2021-02-01gsm_7bit_encode_n(): fix integer overflow in gsm_septets2octets()Vadim Yanitskiy1-1/+4
Using 'uint8_t' for the length argument is definitely a bad idea. Because of this, packing more than 255 septets would not work as expected. Deprecate the old function and use 'size_t' instead. Change-Id: Ib1aac538afeb0a5c76a1df472d555139a496e12e
2021-02-01sim: fix gcc 4.9.2 + -std=gnu11 errorOliver Smith1-1/+1
Remove "(const struct osim_card_sw)" infront of OSIM_CARD_SW_LAST, so debian 8's gcc 4.9.2 doesn't fail anymore with the following error each time the macro is used: card_fs_sim.c:105:1: error: initializer element is not constant I verified with docker that there aren't any other build errors with gcc 4.9.2. Fixes: OS#4991 Change-Id: I9d3abbf9812dc09201eff0e9f7542cddedb6848b
2021-02-01ns2: Fix typos in commentsHarald Welte1-5/+5
Change-Id: I155fd697e229621561f7d00204421ac941101d77
2021-01-29gprs_bssgp: agregate RIM related code in gprs_bssgp_rim.cPhilipp Maier2-33/+34
gprs_bssgp and gprs_bssgp_util.c also contains code related to send and receive RIM PDUs via BSSGP and also code to encode and decode RAN INFORMATION PDUs. Lets move this to gprs_bssgp_rim.c Change-Id: Icda279452962b06e552cb1361d2a27b7dc8a6b04 Related: SYS#5103
2021-01-29gsm: bts_features: Introduce BTS_FEAT_CCNPau Espin Pedrol1-0/+1
This feature is used by BSC to gain knowledge on whether a given BTS supports GPRS Cell Change Notification (CCN) related procedures on PDCH, and as a result enable or not by default the CCN_ACTIVE bit in SI13 to announce the support it is allowed to use the feature. Related: SYS#4909 Change-Id: I61991266b95d0c13d51b47906cc07846e9cf1390
2021-01-29cosmetic: fix typo in commentPau Espin Pedrol1-1/+1
Change-Id: I787cca5a032c57202a86dab18e1790ef3ad1509a
2021-01-28gprs_ns2: remove api call gprs_ns2_dynamic_create_nseAlexander Couzens1-1/+0
The call was only introduced as workaround for the first implementation of vty. There is no need for this anymore. The configuration can just add "accept-ipaccess" to the bind to allow creation of dynamic ipaccess NSE. Change-Id: Ie924ead6da17657f3da334068c8ada82c8845495
2021-01-28gprs_ns2: drop gprs_ns2_vty, rename vty2 -> vtyAlexander Couzens1-6/+1
Drop the vty(1) code and replace it with vty2. The vty(1) was only used as intermediate to not develop a vty while developing a new code base behind. Users of gprs_ns2_ has to use the new vty code. API change which must be synchronized with osmo-pcu, osmo-gbproxy, osmo-sgsn. Change-Id: Ic2059e75d8ede8e5c29c4fef6be608ed79c8a97c
2021-01-28Revert "gprs_ns2: drop gprs_ns2_vty, rename vty2 -> vty"Pau Espin Pedrol1-1/+6
This reverts commit b306094448564e27bc031b519396f1b0e294b231. It was merged too quickly and patches for projects using related features are not yet prepared. Change-Id: I8a2aaf74a47de8f4f0adb37d16426d199788e3fe
2021-01-28gprs_ns2: drop gprs_ns2_vty, rename vty2 -> vtyAlexander Couzens1-6/+1
Drop the vty(1) code and replace it with vty2. The vty(1) was only used as intermediate to not develop a vty while developing a new code base behind. Users of gprs_ns2_ has to use the new vty code. API change which must be synchronized with osmo-pcu, osmo-gbproxy, osmo-sgsn. Change-Id: I8c3f2afecc74b78f7f914f7dce166cbcb63444eb
2021-01-28gprs_ns2: refactor: ensure all enums have GPRS_NS2_Alexander Couzens1-24/+24
All public enum should have the prefix GPRS_NS2_. API change which must be synchronized with osmo-pcu, osmo-gbproxy, osmo-sgsn. Change-Id: I548ff12f7277cbb7e1a630a3dc02b738ce89be72
2021-01-26gprs_bssgp_rim: add functions to convert a RIM-RI to a stringPhilipp Maier1-0/+2
RIM routing formation structs can contain different variants of address identifiers, so it is difficult for an API user to pick the _name() function to generate a human readable string. Lets add bssgp_rim_ri_name() and bssgp_rim_ri_name_buf() to make printing a routing identifier easier. Change-Id: Idca6bdccffe663aea71a0183ca3ea5bb5b59e702 Related: SYS#5103
2021-01-26gprs_bssgp_prim.h: Add missing includesPau Espin Pedrol1-0/+2
Includes for struct gprs_ra_id and osmo_eutran_tai were missing. Change-Id: I1c068b6841561003d4d7722daa6c2abb21363dda
2021-01-22gprs_bssgp_rim: add value strings for enum bssgp_rim_routing_info_discrPhilipp Maier1-0/+6
Change-Id: Idd06d2e3df0d60409a89a474018a9d97f7772090 Related: SYS#5103
2021-01-22gprs_bssgp_rim: add value strings for enum bssgp_ran_inf_app_idPhilipp Maier1-0/+6
Change-Id: I581d1176f82d6657d6136c32daa9c76dffb802a6 Related: SYS#5103
2021-01-22gprs_bssgp_rim: add value strings for enum bssgp_nacc_causePhilipp Maier1-0/+6
Change-Id: I3354699555569c2b0bd1b4313cffd32a0cbeffe9 Related: SYS#5103
2021-01-22gsm: Introduce osmo_{rai,cgi_ps}_cmp() APIsPau Espin Pedrol1-0/+2
Similar to what we already have for other data types, such as osmo_lai_cmp or osmo_cgi_cmp. Change-Id: I00e329bc5be8674b30267dec238e7656ddfc21db
2021-01-20vty/fsm_vty: Add vty_out_fsm2() + vty_out_fsm_inst2() with prefixHarald Welte1-0/+2
Callers other than "show fsm" / "show fsm-instances" may want to indent the output. Change-Id: I10e01ef91116369868cdb878a99634c8681728af
2021-01-19gprs_bssgp: add utilities to send and parse BSSGP rim PDUsPhilipp Maier2-0/+39
At the moment libosmogb offers no convinient way to send RIM PDUs. Also parsing an incoming RIM messages into destination, source routing info and RIM container is not available. Change-Id: I18134fd9938040d2facb6beee3732628b167ce8c Related: SYS#5103
2021-01-18bssgp_rim: move bssgp_parse_rim_ri and bssgp_create_rim_ri to gprs_bssgp_rimPhilipp Maier2-31/+30
The function bssgp_parse_rim_ri() and bssgp_create_rim_ri() are located in gprs_bssgp.c, since there is now a gprs_bssgp_rim.c module it makes more sense to put them there. Also adjust the code a bit so that its more intuitive to read. Change-Id: Icd667f41d5735de56cd9fb257670337c679dd258 Related: SYS#5103
2021-01-18bssgp_rim: add encoder/decoder for NACC related RIM containersPhilipp Maier2-0/+183
BSSGP RIM uses a number of nested containers to signal RIM application specific payload information in a generic way. Lets add the container structurs required for NACC. Depends: libosmocore If48f412c32e8e5a3e604a78d12b74787a4786374 Change-Id: Ibbc7fd67658e3040c12abb5706fe9d1f31894352 Related: SYS#5103
2021-01-13ctrl: ports.h: Add OSMO_CTRL_PORT_BSC_NEIGHPau Espin Pedrol1-0/+1
Hence 4248 becomes the well-known port for osmo-bsc's Neighbor Resolution Service. Related: SYS#4909 Change-Id: Ic77a8cff022c2f939a684ebd1f9f62a82e0de510
2021-01-11Intoduce Packet Switch CGIPau Espin Pedrol3-0/+17
This structure is needed in order to identify a given cell within the BSS during RIM transactions. The naming was made up by myself since I couldn't find any naming reference for this kind of data (RAI + CI). Since LAI + CI = CGI, then RAI + CI = CGI-PS osmo_rai_name2 family of functions get a "2" suffix due to already existing functions handling struct struct gprs_ra_id in gsm48.h Change-Id: If48f412c32e8e5a3e604a78d12b74787a4786374
2021-01-06gsm_08_18: add struct to parse RIM PDU IndicationsPhilipp Maier1-0/+22
3GPP TS 48.018, section 11.3.65 describes an IE to transfer some control flags via a RIM container. The IE is essentially just a bitfield, so it can be parsed by overlaying it with a C-struct. Lets add an appropiate struct to protocol/gsm_08_18.h Change-Id: I781ab838bd02ac1b13d384ce3f4259e26cedb61e Related: SYS#5103
2021-01-06ctrl: Allow handling CTRL get/set replies in user defined codePau Espin Pedrol1-0/+7
Prior to this patch, it was not possible to gather SET/GET reply information when implementing a CTRL client using libosmocontrol. This is specially important when using the GET command, since one wants to receive the queried value. CTRL traps can also be handled this way by extending this patch in the future if needed. Change-Id: Id3c4631cd32c13e78e11b6e8194b8c16307ec4f1
2021-01-06Add inter-thread queueHarald Welte2-0/+63
This adds an inter-thread queue "it_q" to libosmocore. With it_q, one can perform thread-safe enqueing of messages to another thread, who will receive the related messages triggered via an eventfd handled in the usual libosmocore select loop abstraction. Change-Id: Ie7d0c5fec715a2a577fae014b0b8a0e9c38418ef
2021-01-04gprs_bssgp: add handling for BSSGP RIM primitivesPhilipp Maier2-0/+4
Receive and forward RIM messages to bssgp_prim_cb() Change-Id: Idfd0a65872a2cc6089885afd8d31b0b029d85d47 Related: SYS#5103