Commit Graph

85 Commits

Author SHA1 Message Date
Pau Espin 5689081325 hnbap: Improve rx path and implement HnbRegisterReject
The process is shut down if we receive such a message.

Change-Id: Id4656140b7f51b07860dcbeed449ed68c3a9f85a
2021-11-24 21:31:32 +01:00
Pau Espin 807e52a2da Implement initial shutdown + reconnect FSM
The shutdown_fsm doesn't do much right now, but it's included there in
order to allow easy clean up of resources upon Iuh reconnect in the
future, as well as reset the lower layers.

Change-Id: Id35d692218af366843186b0966b62f65bb9eb620
2021-11-24 21:23:45 +01:00
Pau Espin fd440b7a67 Fix typos and non-related test content
Artifacts from initial commits adding the project skeleton.

Change-Id: I00cce8fbfeef9688dd2fd235cb859c27bd864e8b
2021-11-24 21:22:42 +01:00
Pau Espin 65489ed7c6 iuh: Improve logging of SCTP notifications
Change-Id: I08842665effec6e70a3c7f6b93ea62c45549d69d
2021-11-24 21:22:42 +01:00
Pau Espin 9828dbed18 Introduce SCTP log category
Change-Id: I2c9cb54958807bd68c04a4c0d3a0f355dd641282
2021-11-24 21:22:42 +01:00
Pau Espin 4310b0d57a Move Iuh code to its own module
The Iuh code will be further extended next to properly support
reconnect, and hnb will also gain proper shutdown support soon.

Change-Id: I6e94210ab06a34b70c61bb074c58d7b0f4ee75de
2021-11-24 21:22:38 +01:00
Pau Espin 7465e42bed Bump version: 0.0.0 → 0.0.1
Change-Id: I7c561ce54d8c2ff2cad8f66685016ab71991138e
2021-11-16 18:29:42 +01:00
Oliver Smith 7657886220 gitignore: add src/osmo-hnodeb/osmo-hnodeb
Change-Id: I6bfb0b0696b8910c3f095390d6634f49baeebb14
2021-11-03 09:08:05 +01:00
Oliver Smith 33e4059c05 rpm spec: fix invalid file paths
Fix for:
  File not found: /home/abuild/rpmbuild/BUILDROOT/osmo-hnodeb-0.0.0.202111021358-1.1.arm/usr/share/doc/packages/osmo-hnodeb/examples/osmo-hnodeb/*/osmo-hnodeb*.cfg
  File not found: /home/abuild/rpmbuild/BUILDROOT/osmo-hnodeb-0.0.0.202111021358-1.1.arm/usr/share/doc/packages/osmo-hnodeb/README

With this patch applied, the deb and rpm packages build successfully now
(verified in own OBS namespace).

Related: SYS#5516
Change-Id: I3c728489d38272d8477da5050f407708b8c4289b
2021-11-03 09:08:05 +01:00
Oliver Smith 4de0518d22 d/control, spec: add missing builddeps
autoconf-archive is apparently needed to build the package. We have it
in few other Osmocom projects as build dependency too, others seem to
ship related m4 macros directly in a m4 dir.

Fix for:
  configure: error: Please install autoconf-archive; re-run 'autoreconf -fi' for it to take effect.

Related: SYS#5516
Change-Id: If9ff232844d72094fb883700185ae152ca40493d
2021-11-03 09:08:00 +01:00
Pau Espin c40d445506 ranap: Fix compiler warnings passing func callback
Fixes following warning types:
"passing argument 1 of ‘ranap_cn_rx_co’ from incompatible pointer type
[-Wincompatible-pointer-types]"

Change-Id: If80b57a8d36c28dee7db28cb36a88ed41e0a7328
2021-11-02 12:41:14 +01:00
Pau Espin b80125f5c9 hnb.c: Fix memleak in hnb_iuh_read_cb
Port from osmo-iuh.git Change-Id I6ecbce6aab11e1382ff9f71d901e1c6ac145f835.

Change-Id: If5d5d41693e26f485aa5372129dccf0dcfb7fa6c
2021-11-02 12:41:14 +01:00
Pau Espin 72ef4c0cd4 Generate proper rnc_id and plmn in LuRequest
Change-Id: Ib40b5eb96b7cc13c424076a4ca725019514d52af
2021-11-02 12:41:14 +01:00
Pau Espin c475158e0c Configure HNB-Identity over VTY and use it in HnbRegisterRequest
Change-Id: Ida47bbb85b5438a2ec9805005bc2ab834c79b765
2021-11-02 12:41:14 +01:00
Pau Espin e2c17101be Configure CI,LAC,RAC,SAC over VTY and use it in HnbRegisterRequest
Change-Id: I06f21758e361b7d4d7141086d758893bee434e5c
2021-11-02 12:41:14 +01:00
Pau Espin 3423fada07 Configure PLMN over VTY and use it in HnbRegisterRequest
Change-Id: I6d67aa547d5496fe1407744e1dde07d2a41df500
2021-11-02 12:41:14 +01:00
Pau Espin b4cc30ae1d Send HnbRegisterRequest when HnodeB connects on Iuh
Change-Id: I901fd456221a3bdc3f4f95b7fd3b9484c7830f24
2021-11-02 12:41:14 +01:00
Pau Espin feb5d9a1c7 use osmo_stream_cli to manage sctp Iuh conn
Let's use already available functionality to handle the conn for us.
This is specially useful since we gain a connect_cb.

Change-Id: I9d884231577aa47af22cd6319130ca5c9e595d61
2021-11-02 12:41:14 +01:00
Pau Espin 5b86a80193 Use osmocom logging in non-main files
Change-Id: I649b17803aeffd20354aa76dde61094959f08e43
2021-11-02 12:41:14 +01:00
Pau Espin 9b5e3d46d0 hnb: Move wqueue to .iuh, add wrapper to use it
Change-Id: I38498858fc315ad3d57644d7b905f5393f43e884
2021-11-02 12:41:14 +01:00
Pau Espin 5c84fd43d9 Drop unused fields in struct hnb
Change-Id: Ia981d99bf521eb8b79bdf8d7f81ca50f6cdeba8c
2021-11-02 12:41:14 +01:00
Pau Espin bf3cb41af5 Set up Iuh conn params through VTY
Change-Id: Id5a17742643e8f02c22228e3055bcc213423a416
2021-11-02 12:41:14 +01:00
Pau Espin 5e3098d56a More work on main.c to add osmocom functionalitites
Change-Id: I61a5ee2e100f79cef7e42dbd981e308597c30900
2021-11-02 12:41:14 +01:00
Pau Espin 50502a77b0 main.c: Fix cap in naming for vty_info.name
It was decided the program name is OsmoHNodeB, and we already use that
one everywhere.

Change-Id: I8ce83aa17ad7dd3ec991e4d7d9cca01dc1bf4681
2021-11-02 12:41:14 +01:00
Pau Espin 24326610a6 Move protocol related code in main.c to related proto files
Change-Id: I771b3d3f61207137477eed2b316a5f670fb79ef2
2021-11-02 12:41:14 +01:00
Pau Espin c1307f75b2 Allocate g_hnb as a pointer, move code to hnb.c/h
Change-Id: I5ec61d2a72d55d182e1498939209b30b6e652467
2021-11-02 12:41:14 +01:00
Pau Espin 8403def059 Move hnbap related code to hnbap.c/h
Change-Id: I8356421169bebe1d411b05b19241ea639dc3f733
2021-11-02 12:41:14 +01:00
Pau Espin 5d269725b6 Move rua related code to rua.c/h
Change-Id: Ibefe952fe1b642cab5c4abe36383a7ebb05f39c3
2021-11-02 12:41:14 +01:00
Pau Espin e98c2ac463 main.c: Drop commented out code
We can always get it back from git history if necessary, let's drop it.

Change-Id: I6ea1e3b8692cc6e162962d2e812eb1342c100251
2021-11-02 12:41:14 +01:00
Pau Espin 8125fd0d95 Move existing vty code to its own vty.c/h file
Change-Id: I88107e9ed03ff8f807b57a3ea0d189fd70864861
2021-11-02 12:41:14 +01:00
Pau Espin 67a3c4a7c6 Import hnb-test from osmo-iuh.git
Import from osmo-iuh.git Change-Id Iba106dcc18e3d429b4b9808610a44ac29b798172,
with minimal renaming of s/hnb_test/hnb/ and required mangling to have
it compile and run.

Change-Id: I36fd4aa5d39222371bd36e9f540b91e36a26de43
2021-11-02 12:41:12 +01:00
Pau Espin 18ac28abd6 configure: link against libsctp
osmo-hnodeb calls sctp_recvmsg directly, which is provided by libsctp.
Hence, we need to depend and link on it.

Change-Id: I793d6fe8601cf9a8dd72bf6884b469204b513c11
2021-11-02 12:40:54 +01:00
Harald Welte 7fece4d7e8 populated debian/changelog to avoid build failures
An empty debian/changelog is illegal and makes dpkg-buildpackage fail.

This in turn causes our nightly builds to fail like this

+ git -C ./debian commit -m 'auto-commit: debian: depend on osmocom-nightly (= 1.0.0.202111020026)' .
[master 83b1eb7] auto-commit: debian: depend on osmocom-nightly (= 1.0.0.202111020026)
 1 file changed, 3 insertions(+), 3 deletions(-)
+ dch -b -v .202111020026 -m 'Snapshot build'
dch: warning:     debian/changelog(l0): found end of file where expected first heading
dch: error: fatal error occurred while parsing debian/changelog
Build step 'Execute shell' marked build as failure
Sending e-mails to: jenkins-notifications@lists.osmocom.org
Finished: FAILURE

Change-Id: Ic0c1fcd34a40355691f39224d9a473951b0f3d8e
2021-11-02 09:19:39 +01:00
Pau Espin 243ccbafd6 Add project skeleton
This commit contains all the relevant project structure to build the
osmo-hnodeb binary, its doc, tests, packaging, etc.

The osmo-hnodeb binary itself is still just an empty main().

Related: SYS#5516
Change-Id: I6ae3215ae4b956689d2adc88db7c3ead5df14f37
2021-10-21 13:48:46 +02:00
Pau Espin 4feac7fc6e Initial commit
Change-Id: I132a83c8c5d265ff90654f2afa004648a1418e40
2021-10-21 11:54:39 +02:00