Commit Graph

5 Commits

Author SHA1 Message Date
Oliver Smith 318b4820fc bsc_nat: use sub-structs for cn, ran
As suggested in code review, create sub-structs for cn and ran. The
following patches will fill them up with mscs, bscs etc.

Related: SYS#5560
Change-Id: I6a3cc0d837a3d89e7153c2296812df0863f3471f
2022-03-21 16:36:32 +01:00
Oliver Smith 122beff8bb treewide: tweak includes
Categorize includes by:
* (library includes)
* Osmocom includes except for OsmoBSCNAT
* OsmoBSCNAT includes

Order the includes in each category alphabetically, and remove empty
lines between them. This allows me to keep them consistent, and with
empty lines removed between these categories it doesn't look
inconsistent if there is only one include from two categories in one
file, but multiple includes from the same category in another file.

While at it, also have one empty line after the license header in all
c, h files, and one after the includes.

Related: SYS#5560
Change-Id: I1a7b95ccb0c87fd53645c72f0c02449e8403043b
2022-03-10 18:52:31 +01:00
Oliver Smith 6afc0e3314 vty: use osmo_ss7_vty_go_parent
Remove unnecessary bsc_nat_vty_go_parent function, and use
osmo_ss7_vty_go_parent instead. Without the latter, it segfaults while
attempting to parse a config segment like this:

  cs7 instance 0
   point-code 0.23.3
   asp asp-clnt-OsmoBSCNAT-CN 2905 0 m3ua
    remote-ip 127.0.0.1
    local-ip 127.0.0.3
   sccp-address msc  # segfault here, vty->index == NULL
    routing-indicator PC
    point-code 0.23.1

Related: SYS#5560
Related: https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26659/comment/c99b8cca_865449aa/
Change-Id: Iee6ece062f11694acb771463be7effb7342e92f2
2022-01-31 18:51:22 +01:00
Oliver Smith 8f7b750b22 Add bsc_nat fsm
Create the initial FSM that starts and stops two SS7 instances (one for
CN, one for RAN), and binds an sccp user to each.

Related: SYS#5560
Depends: libosmocore I81c64a7ae440304522c2179c212023a566ddced8
Change-Id: I7d52fa649c397582b18a1a7dcc40bb407f3b2c97
2022-01-31 18:50:59 +01:00
Oliver Smith c448efb3aa Add vty interface
Related: OS#2545
Change-Id: I6f2d8d1d62b97be471ebcf1bb14aac0b895833d1
2021-12-23 10:47:26 +01:00