Pau Espin Pedrol | 6dfb5fe | 2019-08-29 17:21:00 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <osmocom/core/msgb.h> |
| 4 | #include <osmocom/sgsn/gprs_sgsn.h> |
| 5 | |
| 6 | #ifdef BUILD_IU |
| 7 | #include <osmocom/ranap/ranap_ies_defs.h> |
| 8 | #include <osmocom/ranap/ranap_msg_factory.h> |
| 9 | #include <osmocom/ranap/iu_client.h> |
| 10 | |
| 11 | void activate_pdp_rabs(struct sgsn_mm_ctx *ctx); |
| 12 | int sgsn_ranap_iu_event(struct ranap_ue_conn_ctx *ctx, enum ranap_iu_event_type type, void *data); |
| 13 | int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp); |
| 14 | |
Alexander Couzens | eb5aee5 | 2019-09-10 21:00:18 +0200 | [diff] [blame] | 15 | /* free the Iu UE context */ |
| 16 | void sgsn_ranap_iu_free(struct sgsn_mm_ctx *ctx); |
| 17 | |
| 18 | /* send a Iu Release Command and free afterwards the UE context */ |
| 19 | void sgsn_ranap_iu_release_free(struct sgsn_mm_ctx *ctx, |
| 20 | const struct RANAP_Cause *cause); |
| 21 | |
Pau Espin Pedrol | 6dfb5fe | 2019-08-29 17:21:00 +0200 | [diff] [blame] | 22 | int gsm0408_gprs_rcvmsg_iu(struct msgb *msg, struct gprs_ra_id *ra_id, uint16_t *sai); |
Alexander Couzens | eb5aee5 | 2019-09-10 21:00:18 +0200 | [diff] [blame] | 23 | |
| 24 | #else /* ifndef BUILD_IU */ |
| 25 | inline static void sgsn_ranap_iu_free(void *ctx) {}; |
| 26 | inline static void sgsn_ranap_iu_release_free(void *ctx, void *cause) {}; |
| 27 | #endif /* BUILD_IU*/ |
Pau Espin Pedrol | 6dfb5fe | 2019-08-29 17:21:00 +0200 | [diff] [blame] | 28 | |
| 29 | struct ranap_ue_conn_ctx; |
| 30 | /* On RANAP, Returns pointer to he associated ranap_ue_conn_ctx in msg, filled |
| 31 | * in by osmo-iuh's iu_recv_cb(). |
| 32 | * On Gb, returns NULL */ |
| 33 | #define MSG_IU_UE_CTX(msg) ((struct ranap_ue_conn_ctx *)(msg)->dst) |
| 34 | #define MSG_IU_UE_CTX_SET(msg, val) (msg)->dst = (val) |