Commit Graph

18 Commits

Author SHA1 Message Date
Harald Welte 909be19285 Convert README to README.md and expand like in other projects
Let's align with structure and content of README.md in other osmo-*
projects.

Change-Id: Id9a78ccc0d10f0e3a9d832ac4c4988cfbb8ddb3c
2024-01-29 08:17:09 +01:00
Vadim Yanitskiy 8ee08c6b78 build: include README into the release tarball
Change-Id: I4e302914340467e8c047d60ab862267f4e94acad
2024-01-26 23:35:20 +07:00
Neels Hofmeyr 6521fc0695 manuals: generate vty reference xml at build time
Move 'doc' subdir further down to "make sure" the osmo-mgw binary is built
before the docs.

Remove mgw_vty_reference.xml from the source tree.

In manuals/Makefile.am use the new BUILT_REFERENCE_XML feature recently added
to osmo-gsm-manuals, and add a build target to generate the XML using the new
osmo-mgw --vty-ref-xml cmdline switch.

Depends: I613d692328050a036d05b49a436ab495fc2087ba (osmo-gsm-manuals)
Change-Id: I526af21134087e2b43b9ada59c93f636ae242e24
2020-07-11 02:02:50 +00:00
Oliver Smith abfb858f0c Makefile.am: EXTRA_DIST: debian, contrib/*.spec.in
Change-Id: I1ab1e30cc0c8a7ece997ae776ab0945a989eb82a
2020-05-22 13:41:39 +02:00
Oliver Smith 82c1d1eb20 Fix DISTCHECK_CONFIGURE_FLAGS override
Set AM_DISTCHECK_CONFIGURE_FLAGS in Makefile.am instead of
DISTCHECK_CONFIGURE_FLAGS. This is the recommended way from the
automake manual, as otherwise the flag can't be changed by the user
anymore.

Related: OS#3718
Change-Id: Ie9db1519e89d2a8ca1e403e480f57d72fc25ab75
2018-12-04 15:36:37 +01:00
Pau Espin e686675f7d Install systemd services with autotools
Change-Id: I7e4dae6b8c1685e8a673c58a843c41fa0af1b35c
2018-09-12 14:14:55 +02:00
Pau Espin 31b4729f27 Remove libosmo-legacy-mgcp and osmo-bsc-mgcp
They are only used by openbsc.git programs and belong there.

Change-Id: Id31bef052d3f9b8aada1824d6f7f995ebd39bbfd
2018-09-06 20:39:53 +00:00
Harald Welte 19d640e806 Turn libosmo-mgcp into local, non-installed library
This is an internal library simmilar to 'libmsc' in osmo-msc, which
we don't expect to be used by other programs except osmo-mgw.  Hence,
there's no need to install it as a shared library, which introduces
requirements about ABI/API stability and the like.

osmo-bsc_nat uses libosmo-legacy-mgcp, and once we should rewrite
osmo-bsc_nat, we might need some of the libosmo-mgcp related functions,
but at this point it's unclear what exactly would be needed and if
current libosmo-mgcp can provide that.  As needed, we can introduce
a related shared library at that point.

Change-Id: Iba0a2c9c694e360356ac2ca584e97795281c6198
2018-02-05 22:41:32 +00:00
Philipp Maier 87bd9be0b0 Initially implement the new osmo-mgw and libosmo-mgcp
Leave the old osmo-bsc_mgcp and libosmo-legacy-mgcp as it is; on a copy thereof
(added by a previous commit), apply changes to initially implement the new
osmo-mgw.

Adjust build system and debian packaging to accomodate the new libosmo-mgcp and
osmo-mgw.

The main differences:

*) use a list to manage rtp connections.

Aggregate all rtp related information inside a single struct.

Use a linked list to manage the both connections (net and bts).
The idea behind using a list is that we might support conference
calls at some later point.

Store the linked list in struct mgcp_endpoint, have a private linked
list for each endpoint. The list contains connection items which are
implemented in struct mgcp_conn. A connection is allocated and freed
using the functions in mgcp_conn.c. A connection is allocated on the
reception of a CRCX command and freed with the reception of a DLCX
command.

*) remove external transcoder feature

Fortunatelly the external transcoder feature is not needed
anymore. This patch removes the related code.

*) vty: get rid of CONN_BTS and CONN_NET

Since the new connection model does not make a difference
between BTS and NET connections the VTY should not use
the fixed CONN_BTS and CONN_NET constants.

- Handle the conns list inside the endpoint directly
- introduce function to dump basic rtp connection info
- introduce human readable names for connections

Parts of the code adjusted to use generalized connections instead of explicit
BTS/NET ones:

- teach mgcp_send_dummy() to send dummy packets to any RTP connection
- network: generalize mgcp_bind_net/bts_rtp_port()
- network: generalize mgcp_send()
- tap: generalize call tapping feature
- stat: generalize statistics
- Replace rtp_data_net() and rtp_data_bts() with generalized rtp_data_rx()

*) mgcp_protocol.c fixes:

- check ci string before it is converted:
  In case of missing ci, a nullpointer is delivered to strtoul().
  Add a function that takes ci, checks it and converts it to an
  uint32_t. Use the return code to react on missing ci.
- output error message on missing CI.
- when parsing the mode, print log message when mode is missing.
- use mode_orig when mode is missing.
- fix ptime formatstring to use %u rather than %d.
- cosmetic: log when connection is deleted on DLCX.
- change loglevels of CRCX, MDCX, DLCX events from DEBUG to NOTICE.

*) mgcp_test

- apply rename of strline_r() to mgcp_strline().
- MGCP command macros:
  - Add 'I: 1' parameters.
  - Use proper port numbers:
    from m=audio 0 RTP/AVP 126
    to   m=audio 16002 RTP/AVP 128
  - Change ptime to 'a=ptime:40' because this is what the MGW currently
    returns.  CRCX generally feed a ptime:40 and this is expected to be
    returned.
- struct mgcp_test: Use only one ptype, there are no explicit BTS and NET
  endpoints anymore.
  Hence remove one column from tests[].
- test_messages():
  - Enable: remove '#if 0'
  - Remove concept of BTS and NET endpoints: test only one conn, as they are
    now interchangeable anyway.
  - remove endpoint init, now done internally.
  - add false asserts in error cases.
- test_retransmission():
  - remove endpoint init, now done internally.
  - add false asserts in error cases.
- test_packet_error_detection():
  - Remove concept of BTS and NET endpoints: test only one conn, as they are
    now interchangeable anyway. Use arbitrary conn ids (e.g. 4711).
  - remove endpoint init, now done internally.
  - add false assert in error case.
  - Assert that a conn really vanishes on DLCX, previously the conn would
    remain and just be unused, now it is actually discarded.
- test_no_cycle()
  - Remove concept of BTS and NET endpoints: test only one conn, as they are
    now interchangeable anyway. Use arbitrary conn ids (e.g. 4711).
- test_no_name()
  - Enable: remove '#if 0'.
  - remove endpoint init, now done internally.
  - add false assert in error case.
- mgcp_test.ok: adjust expected results to status quo:
  - We now see two dummy packets instead of one, now sent to both sides because
    we don't know of BTS or NET side. (maybe drop dummy packets later...)
  - packet duration, conn mode: now sane defaults show instead of unset.
- various whitespace and formatting changes from lindent.

Change-Id: Ie008599136c7ed8a0dfbb0cf803188975a499fc5
2017-10-05 01:40:43 +00:00
Neels Hofmeyr 97df691307 separate libosmo-mgcp-client from mgcp server code
When osmo-mgw is built --with-mgcp-transcoding, linking the mgcp library
also requires linking libgsm, even though e.g. osmo-msc never use it.
Separate the MGCP client code from the MGCP server code to avoid this dep.

The mgcp client code does use some definitions from mgcp.h and mgcp_common.c.
For simplicity, link mgcp_common.c in both libosmo-legacy-mgcp as well as
libosmo-mgcp-client. That means it is not possible to link both
libosmo-legacy-mgcp and libosmo-mgcp-client in the same binary because of
duplicate symbols, but currently that is sufficient. (An alternative would be
code dup or yet another libosmo-mgcp-common library.)

Add libosmo-mgcp-client to debian packaging.

Related: OS#2488
Change-Id: I8e0b2d2a399b77086a36606f5e427271c6242df1
2017-09-05 20:56:27 +00:00
Neels Hofmeyr e9920f24b1 split off osmo-mgw: remove files, apply build, rename
Add vty and logging previously used from libcommon

Rename libmgcp to libosmo-legacy-mgcp and install.

Use DLMGCP, not DMGCP.

Slim down the public mgcpgw_client API, move all elements not actually used by
current callers to private headers / static c.

Depends: libosmocore I09c587e2d59472cbde852d467d457254746d9e67
Change-Id: I71a0a16ebaaef881c34235849601fc40aa12cfd7
2017-08-30 15:04:52 +02:00
Max 58cfd25c2f Use release helper from libosmocore
See
https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release
for details.

Change-Id: I869395d5c9ab5ec1a487aff15418d1517f47e831
Related: OS#1861
2017-08-30 14:20:17 +02:00
Neels Hofmeyr ffebe6e938 fix make distcheck with python tests
- bscs.config needed by the vty tests was not picked up as a dist file, because
  its suffix is not 'cfg'. Rename to *.cfg. Apply this rename in
  vty_test_runner.py and osmo-bsc_nat.cfg.
- Remove restart counters after external tests, otherwise distcheck complains
  about uncleaned files.
- Add contrib/ipa.py to EXTRA_DIST, hence add a Makefile.am to contrib/.
  Otherwise the python tests cannot find that dependency.

Change-Id: I42b55cb1125099afc3a8e3f87c0e398426b2e2a9
2017-08-27 17:44:55 +02:00
Neels Hofmeyr 85929a7be7 move openbsc/* to repos root
This is the first step in creating this repository from the legacy openbsc.git.

Like all other Osmocom repositories, keep the autoconf and automake files in
the repository root. openbsc.git has been the sole exception, which ends now.

Change-Id: I9c6f2a448d9cb1cc088cf1cf6918b69d7e69b4e7
2017-08-27 17:44:55 +02:00
Harald Welte 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00
Holger Freyther c7aa3c4f79 pkg-config: Create and install a pkg-config file
Let automake create the openbsc.pc and then install it
into the pkg-config directory of ${libdir}. This is done
in preparation for the public API that will be added soon.

The advertised include directory will be ${incluedir}/openbsc-1.0
to follow userspace practive from glib/gtk/cairo/freetype2 and
many more.
2009-06-08 10:32:39 +00:00
Holger Freyther 5f75598c28 Introduce a simple timer API....
One can use add_timer or schedule_timer to add a timer. After
the timeout time has been reached the callback will be called.
One can call add_time/schedule_timer and del_timer from within
the callback.
2008-12-27 09:42:59 +00:00
Harald Welte de729a139e autoconf 2008-12-23 21:01:25 +00:00