Neels Hofmeyr | e2f24d5 | 2017-05-08 15:12:20 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <osmocom/core/msgb.h> |
Neels Hofmeyr | 9084396 | 2017-09-04 15:04:35 +0200 | [diff] [blame] | 4 | #include <osmocom/msc/gsm_data.h> |
Max | 43b01b0 | 2017-09-15 11:22:30 +0200 | [diff] [blame] | 5 | #include <osmocom/msc/transaction.h> |
Neels Hofmeyr | e2f24d5 | 2017-05-08 15:12:20 +0200 | [diff] [blame] | 6 | |
| 7 | /* These are the interfaces of the MSC layer towards (from?) the BSC and RNC, |
| 8 | * i.e. in the direction towards the mobile device (MS aka UE). |
| 9 | * |
| 10 | * 2G will use the A-interface, |
| 11 | * 3G aka UMTS will use the Iu-interface (for the MSC, it's IuCS). |
| 12 | * |
| 13 | * To allow linking parts of the MSC code without having to include entire |
| 14 | * infrastructures of external libraries, the core transmitting and receiving |
| 15 | * functions are left unimplemented. For example, a unit test does not need to |
| 16 | * link against external ASN1 libraries if it is never going to encode actual |
| 17 | * outgoing messages. It is up to each building scope to implement real world |
| 18 | * functions or to plug mere dummy implementations. |
| 19 | * |
| 20 | * For example, msc_tx_dtap(conn, msg), depending on conn->via_iface, will call |
| 21 | * either iu_tx() or a_tx() [note: at time of writing, the A-interface is not |
| 22 | * yet implemented]. When you try to link against libmsc, you will find that |
| 23 | * the compiler complains about an undefined reference to iu_tx(). If you, |
| 24 | * however, link against libiu as well as the osmo-iuh libs (etc.), iu_tx() is |
| 25 | * available. A unit test may instead simply implement a dummy iu_tx() function |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 26 | * and not link against osmo-iuh, see tests/libiudummy/. |
Neels Hofmeyr | e2f24d5 | 2017-05-08 15:12:20 +0200 | [diff] [blame] | 27 | */ |
| 28 | |
| 29 | /* Each main linkage must implement this function (see comment above). */ |
| 30 | extern int iu_tx(struct msgb *msg, uint8_t sapi); |
| 31 | |
Neels Hofmeyr | c036b79 | 2018-11-29 22:37:51 +0100 | [diff] [blame] | 32 | int msc_tx_dtap(struct ran_conn *conn, |
Neels Hofmeyr | e2f24d5 | 2017-05-08 15:12:20 +0200 | [diff] [blame] | 33 | struct msgb *msg); |
| 34 | |
Neels Hofmeyr | c036b79 | 2018-11-29 22:37:51 +0100 | [diff] [blame] | 35 | int msc_gsm48_tx_mm_serv_ack(struct ran_conn *conn); |
| 36 | int msc_gsm48_tx_mm_serv_rej(struct ran_conn *conn, |
Neels Hofmeyr | e2f24d5 | 2017-05-08 15:12:20 +0200 | [diff] [blame] | 37 | enum gsm48_reject_value value); |
| 38 | |
Neels Hofmeyr | c036b79 | 2018-11-29 22:37:51 +0100 | [diff] [blame] | 39 | int msc_tx_common_id(struct ran_conn *conn); |