Commit Graph

155 Commits

Author SHA1 Message Date
Harald Welte a3c73d9212 Major Documentation update
* add command line help
* add basic user manual
* add vty reference manual
* install example configuration

Change-Id: Idf49d7fcee2b11638945baa25064273a7e5e5e61
2021-01-06 18:59:02 +01:00
Harald Welte 2f551c1179 don't immediately delete all state about deleted messages
keep them around so we can still check statistics later on

Change-Id: I59f733dcbd5f9ea2617ceccf652c35fdd23a444b
2021-01-06 12:03:59 +01:00
Harald Welte fbc3015c02 message / peer FSM: fix completion detection + timeout logic
* when the message_peer FSM times out, we msut notify the message_fsm
* when waiting for DELETE_ACK, require all message_peer FSM instances to
  enter DELETE state before signaling completion

Change-Id: Ibff5e25ebb34843c4b3165329f432892ac6a6ef5
2021-01-06 12:03:59 +01:00
Harald Welte d800ab2743 smscb_peer_fsm: Accept DELETE event in [almost] all states
This is required as a DELETE may happen at any point in time,
even e.g. in WAIT_WRITE_ACK.

Change-Id: I39b5a243862f4477ac7b625bb77c5e24b2d54dd2
2021-01-06 12:03:59 +01:00
Harald Welte f7434c687f Adjust use of inter-thread-queue with libosmocore API change
during the libosmocore it_q patch review there was some small
API change.

Change-Id: I6a42000057f2efb4554b508debe4312e8f19a745
2021-01-06 12:03:59 +01:00
Harald Welte b76ce452ff move from gettid() to pthread_self()
Whatever you do sucks:
* gettid() doens't have a glibc wrapper function in Debian <= 9
* pthrad_self() returns an opaque pthread_t where we shouldn't really
  make the assumption it's an unsigned long

Change-Id: Ida200de75333e0d35997158000def3cac89759b1
2021-01-06 12:03:59 +01:00
Harald Welte 1507e68b6e fix various compiler warnings
Change-Id: Icbf0839d0d4725c1b66ddf7a7367bae2600e418e
2021-01-03 13:55:16 +01:00
Harald Welte 76101c4a86 More massive CBC WIP
Using this state we can actually successfully add mesasges via
the REST interface and see them being sent via CBSP to the BSCs,
who then transmit to BTSs who send it to MSs and the MSs show them...

Change-Id: If29bd4bbbf88a0ca58de9ff29ad524b0a7262a8e
2021-01-03 13:14:46 +01:00
Harald Welte ddb5057462 add smscb creation timestamp
Change-Id: I72cd9693eb774e21f5696217b5eea5965af952fb
2021-01-02 12:20:12 +01:00
Harald Welte 2849727777 cbsp_server: improve log levels
Change-Id: Id5408d8be4cdd8bed1c21008efe1f291d94b00ed
2021-01-02 12:11:46 +01:00
Harald Welte c370c58832 improve HTTP status codes
Change-Id: I685801a16a0a088c5784a1ec1ee665b5ca8b5f70
2021-01-02 12:03:56 +01:00
Harald Welte 34ed9ba326 add TODO
Change-Id: I59bbe1e3037e1916d74b7347569f05c618d0fd42
2021-01-02 11:43:48 +01:00
Harald Welte da91dc3521 Fix REST API completion after successful POST / WRITE
Change-Id: If0c9c446ea0ece78e044961de3cba20a4eb39b9d
2021-01-02 11:42:49 +01:00
Harald Welte b890a6830e smscb_server_fsm: Avoid log about RESTART event not being permitted
Change-Id: Ib24158ea82d5432e3ffa0423980689a579b86299
2021-01-02 11:42:15 +01:00
Harald Welte af60bc000c cbsp_server: Use peer name in logs instead of osmo_sock_get_name2()
If we know the peer of a client, and that peer has a name, log lines
shall use that name as context, rather than the somewhat difficult
to read osmo_sock_get_name2() result.

Change-Id: I183cbfa4b541fa4e2b96a00635cb17d91a34ae83
2021-01-02 11:40:28 +01:00
Harald Welte a558963cc0 fix segfault if message for peer without CBSP arrived
Change-Id: Ib16a0e58d50755d609d8138d341dade663b4b29e
2021-01-02 00:58:15 +01:00
Harald Welte f5253736ff vty format
Change-Id: I9894e378eeb920c460fe72f14bdbec75edc250af
2021-01-02 00:43:35 +01:00
Harald Welte 6647d0eacd SMSCB message FSM names
Change-Id: I2a45e2adc745c4adcf88c702ce89ad0dba41d660
2021-01-02 00:30:10 +01:00
Harald Welte 187cb2adf1 fix broadcasting WRITE_ACK completion detection
Change-Id: Ic91c42d79ff4a1e98f082be885ad9f27fc3849d5
2021-01-02 00:27:44 +01:00
Harald Welte 49daa80fbf repetition_period
Change-Id: I1833125dab6f9df9fc9745ea20532b3b9c612754
2021-01-02 00:27:32 +01:00
Harald Welte d72681ad0c cbsp_server_fsm: Handle RESET COMPLETE/FAIL
Change-Id: Ie874dc8d69485e079c57a1e799c313b4cbaa5779
2021-01-01 23:21:44 +01:00
Harald Welte d096823ad8 vty: fix formatting of 'show message cbc'
Change-Id: I1c05c98b3ca25113d262b40a1613f34fdca28ce4
2021-01-01 23:21:27 +01:00
Harald Welte df3cdaf89f implement 7bit alphabet encoding
Change-Id: Ia3da7638c88a746259944198267af01b311ef630
2021-01-01 16:35:37 +01:00
Harald Welte 548e4e06c5 implement user_data_len
Change-Id: Idcaad51b789a041a51bd819003cb5ae902153b41
2021-01-01 16:35:22 +01:00
Harald Welte 7313772cdb WIP
Change-Id: I240b4be2fbb316e423d1bf366061b08912814011
2020-12-31 19:07:41 +01:00
Harald Welte 50ec65c5af more (and better) logging
Change-Id: Ie6965b154bd0a60559ce40ac4def988d137ba351
2020-12-31 17:32:44 +01:00
Harald Welte 3bffde541e fix use-after-free in cbsp disconnect
Change-Id: I7d15606a83f13599300553b5d7b6532b2e5d90fe
2020-12-31 14:25:24 +01:00
Harald Welte edf22db326 more fsm wip
Change-Id: I29c7eca5f56061b66e303b952f8f04c71438fe8b
2020-12-31 01:18:34 +01:00
Harald Welte 63965b4c25 Check for osmo_fsm_register() error return value
Change-Id: I7d590612b841af5671b86525d7ef1a9c0723d4ca
2020-12-30 17:18:35 +01:00
Harald Welte 0aa005141d WIP: smscb_peer_fsm
Change-Id: I7941e373bea6ed5299fa9f53c03ff7cbcf38548d
2020-12-30 17:18:35 +01:00
Harald Welte 41634872dc WIP: use inter-thread queue between REST and main
This way we serialize access to core data structures and also allow
future per-message FSMs in the main thread to first communicate to the
RAN peers before permitting the REST/HTTP worker thread to return
any response back to the external REST interface user.

Change-Id: Ia9f656733cf16412926a6d6dc9e1ff4243d941af
2020-12-30 17:18:31 +01:00
Harald Welte c8ea464939 foo
Change-Id: If4b20db51a81a90b3e069b45114a3200f5be57a8
2020-12-30 17:18:15 +01:00
Harald Welte 85d1b36e9d foo
Change-Id: I266dfb3862e7c9794fc1bbbb143740eb120b3125
2020-12-30 17:18:07 +01:00
Harald Welte 7523f4ebf7 vty: Add show commands
Change-Id: Ib52d1e02294c10c9f9801507aab1cd327cbdd4fe
2020-12-30 17:17:04 +01:00
Harald Welte 6b5f8c15ab add missing copyright/license statements
Change-Id: I0ddfdb1a88ed3559bc32f317a85387e6ca75934f
2020-12-30 17:17:03 +01:00
Vadim Yanitskiy f85aab834d vty: use install_lib_element() and install_lib_element_ve()
See https://lists.osmocom.org/pipermail/openbsc/2020-October/013278.html.

Change-Id: I87d3720bd4e944de461c24fe2874b3785d644221
Depends: I8baf31ace93c536421893c2aa4e3d9d298dcbcc6
Related: SYS#4937
2020-10-04 16:47:59 +07:00
Harald Welte be8cbaf3fc exit(2) on unsupported positional arguments on command line
Change-Id: I701e6bffbfdfc98ff09b1d824e7707ef5a8b8059
2019-12-04 12:14:29 +01:00
Harald Welte 2dd3ecdca6 use cbsp_category rather than cbc_message_prio
Change-Id: Ie837ba7af11d56c4f48d2dc3d8e6b4d37de89002
2019-08-05 22:09:35 +02:00
Harald Welte 568fe5de57 log REST API HTTP port on startup
Change-Id: I13e6e5d0e572626332b5675e96c249a7664374ba
2019-08-05 22:09:35 +02:00
Harald Welte 40354a4b19 fix smscb_message array order
Change-Id: I3ad2b6344edf8ee527740f98092364a35b00be89
2019-08-05 22:09:34 +02:00
Harald Welte fb6ea76b76 add cbc_peer_proto_name value_string
Change-Id: I695cd5030c4bae79e215d3a3f9a6bd56c80788cd
2019-08-05 22:09:34 +02:00
Harald Welte fdb29d94e3 track libulfius memory allocations using talloc
Change-Id: I9be666e5fac0caf6f7d07c01f39e0f409c7465db
2019-08-05 22:09:34 +02:00
Harald Welte 0b9fd3945a cbsp_server: move llist_add() up a bit to ensure llist_del() works in error paths
Change-Id: I39b977cbc3a3cbc81b0fb322158d9e81baf9a8dc
2019-08-05 22:09:34 +02:00
Harald Welte 83b4096efa add minimalistic VTY
Change-Id: I55cd44fd7ef342c1262eaede393312aa29f01b58
2019-08-05 22:09:15 +02:00
Harald Welte bdf74e9a89 CBSP Server improvements
Change-Id: Id4e661ab9281c394eaa82430d49f7e3dfeab3f57
2019-08-05 22:08:53 +02:00
Harald Welte ba6868f4b9 Add some basic functions operating on cbc_data structures
Change-Id: I6c2e5a193a902040f21e6c6d5de578647696d9d6
2019-07-20 21:51:53 +02:00
Harald Welte 0c7a0346fc fix 'make dist': Include header files
Change-Id: Ie8728c4fc1fe60b8fd3b5d20b95721a800f3aa7e
2019-07-20 15:39:40 +02:00
Harald Welte f8d8a01b6e introduce cbc_data.h with core data model of CBC
Change-Id: I5afecfede6c0b718d71bd9c825d4074d3c6635ca
2019-07-20 15:37:29 +02:00
Harald Welte b8f7c3bd5e cbsp_server: Allow for bind to non-standard port + bind to IP
Change-Id: I7bf0002b514318ca8014bf92a7ce9a15ee4227c5
2019-07-20 15:32:58 +02:00
Harald Welte 1b13c35884 Add initial version of REST API
Change-Id: Ib38cefa59553af6f5bc0414d6d2845f40de8fd04
2019-07-20 14:44:22 +02:00
Harald Welte 693fa2537e WIP: add basic character set conversion routines
The UCS2 conversion is done using iconv of glibc; Proper GSM 7-bit still
pending.

Change-Id: I8121b4df89f077ef15e42289e76ae54d0d2a7924
2019-07-20 14:44:22 +02:00
Harald Welte 5a17cf671b osmo_cbsp_recv_buffered() is now part of libosmocore
Change-Id: I93995e6c611701ca8688de8904adf8ea57292e69
2019-07-20 14:44:22 +02:00
Harald Welte 0560768ad2 update CBSP API to current libosmocore
Change-Id: I719b04e10cc2d6e33ac9655bc1166a70bdc7e95b
2019-07-20 14:44:18 +02:00
Harald Welte 63b7905fa3 Initial (building) start of OsmoCBC (Cell Broadcast Centre)
this is far from doing anything useful yet. Stay tuned.

Change-Id: I64a6833ce068db60d713d0fa318a1d8093e37be9
2019-05-06 23:15:23 +02:00
Harald Welte 6c8bf25d11 initial checkin of cbsp_server.c 2019-05-05 14:24:43 +02:00