Skip to content
Success

Changes

Summary

  1. mtp: Improve mtp_sap/ss7_user APIs (details)
Commit d07bdb661c55f728da9c61bbc260877f877e1cc8 by Pau Espin Pedrol
mtp: Improve mtp_sap/ss7_user APIs

* The ss7_user API was so far never used externally, and internally only
  by SCCP and a unit test. It has several bad practices like first
  passing a inst parent ptr to allocate it, and then require a inst
  pointer again to operate on it (eg. register/unregister, send a
  primitive, etc.). This only makes the API more complex than needed and
  creates potential problems where a isnt differnet than the one ss7_user
  was allocated on is passed. Instead, the ss7_user is pinned to its
  parent inst during alloction, and all MTP-SAP always happens uniquely
  through the ss7_user. This follows much more closely the already
  sanitized and much more used sccp_sap/sccp_user APIs.

* Move more primitive/SAP related code to mtp_sap.c, to make it easier to
  spot where the inter-layer communication happens. This way we also have
  the same disposition as with sccp_sap/sccp_user.

* Clean up some primitive related APIs to unify naming with other usual
  SAP/primitive osmocom code.

Change-Id: If320db2bcec7ccbbc2cdac0cbf018fd8be7bde22
The file was modifiedtests/ss7/ss7_test.c
The file was modifiedsrc/xua_internal.h
The file was modifiedsrc/ss7_user.h
The file was modifiedsrc/sccp_scrc.c
The file was modifiedsrc/mtp_sap.c
The file was modifiedsrc/ss7_hmrt.c
The file was modifiedsrc/ss7_instance.h
The file was modifiedsrc/sccp_instance.c
The file was modifiedsrc/ss7_user.c
The file was modifiedTODO-RELEASE
The file was modifiedinclude/osmocom/sigtran/osmo_ss7.h