Harald Welte | 75827d6 | 2010-05-18 11:07:34 +0200 | [diff] [blame] | 1 | #ifndef _GPRS_GMM_H |
| 2 | #define _GPRS_GMM_H |
| 3 | |
Pablo Neira Ayuso | 136f453 | 2011-03-22 16:47:59 +0100 | [diff] [blame] | 4 | #include <osmocom/core/msgb.h> |
Neels Hofmeyr | 396f2e6 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 5 | #include <osmocom/sgsn/gprs_sgsn.h> |
Harald Welte | 807a5d8 | 2010-06-01 11:53:01 +0200 | [diff] [blame] | 6 | |
Max | 8204010 | 2016-07-06 11:59:18 +0200 | [diff] [blame] | 7 | #include <stdbool.h> |
| 8 | |
Alexander Couzens | d4788cd | 2018-05-02 22:32:19 +0200 | [diff] [blame] | 9 | int gsm48_tx_gmm_auth_ciph_req(struct sgsn_mm_ctx *mm, |
| 10 | const struct osmo_auth_vector *vec, |
| 11 | uint8_t key_seq, bool force_standby); |
Harald Welte | 77289c2 | 2010-05-18 14:32:29 +0200 | [diff] [blame] | 12 | |
Max | 8204010 | 2016-07-06 11:59:18 +0200 | [diff] [blame] | 13 | int gsm0408_gprs_rcvmsg_gb(struct msgb *msg, struct gprs_llc_llme *llme, |
| 14 | bool drop_cipherable); |
Pau Espin Pedrol | 6dfb5fe | 2019-08-29 17:21:00 +0200 | [diff] [blame] | 15 | int gsm0408_rcv_gmm(struct sgsn_mm_ctx *mmctx, struct msgb *msg, |
| 16 | struct gprs_llc_llme *llme, bool drop_cipherable); |
Pau Espin Pedrol | 35f0e66 | 2019-09-02 18:27:27 +0200 | [diff] [blame] | 17 | int gsm48_gmm_sendmsg(struct msgb *msg, int command, |
| 18 | struct sgsn_mm_ctx *mm, bool encryptable); |
Jacob Erlbeck | abdf02b | 2014-10-31 12:20:49 +0100 | [diff] [blame] | 19 | int gsm0408_gprs_force_reattach(struct sgsn_mm_ctx *mmctx); |
Max | b997f84 | 2016-07-06 15:57:01 +0200 | [diff] [blame] | 20 | int gsm0408_gprs_force_reattach_oldmsg(struct msgb *msg, |
| 21 | struct gprs_llc_llme *llme); |
Jacob Erlbeck | 423f8bf | 2014-10-24 18:09:54 +0200 | [diff] [blame] | 22 | void gsm0408_gprs_access_granted(struct sgsn_mm_ctx *mmctx); |
Jacob Erlbeck | af3d5c5 | 2015-01-05 17:51:17 +0100 | [diff] [blame] | 23 | void gsm0408_gprs_access_denied(struct sgsn_mm_ctx *mmctx, int gmm_cause); |
| 24 | void gsm0408_gprs_access_cancelled(struct sgsn_mm_ctx *mmctx, int gmm_cause); |
Jacob Erlbeck | 4adb136 | 2014-12-02 09:47:26 +0100 | [diff] [blame] | 25 | void gsm0408_gprs_authenticate(struct sgsn_mm_ctx *mmctx); |
Harald Welte | 75827d6 | 2010-05-18 11:07:34 +0200 | [diff] [blame] | 26 | |
Harald Welte | 5bfe499 | 2010-06-09 11:22:47 +0200 | [diff] [blame] | 27 | int gprs_gmm_rx_suspend(struct gprs_ra_id *raid, uint32_t tlli); |
| 28 | int gprs_gmm_rx_resume(struct gprs_ra_id *raid, uint32_t tlli, |
| 29 | uint8_t suspend_ref); |
| 30 | |
Jacob Erlbeck | 81ffb74 | 2015-01-23 11:33:51 +0100 | [diff] [blame] | 31 | time_t gprs_max_time_to_idle(void); |
| 32 | |
Alexander Couzens | d4788cd | 2018-05-02 22:32:19 +0200 | [diff] [blame] | 33 | int gsm48_tx_gmm_id_req(struct sgsn_mm_ctx *mm, uint8_t id_type); |
| 34 | int gsm48_tx_gmm_att_rej(struct sgsn_mm_ctx *mm, |
| 35 | uint8_t gmm_cause); |
| 36 | int gsm48_tx_gmm_att_ack(struct sgsn_mm_ctx *mm); |
| 37 | |
Alexander Couzens | f7198d7 | 2018-05-22 18:29:14 +0200 | [diff] [blame] | 38 | int gprs_gmm_attach_req_ies(struct msgb *a, struct msgb *b); |
| 39 | |
Pau Espin Pedrol | 6dfb5fe | 2019-08-29 17:21:00 +0200 | [diff] [blame] | 40 | int gsm48_gmm_authorize(struct sgsn_mm_ctx *ctx); |
Alexander Couzens | 8007be4 | 2018-05-14 06:48:24 +0200 | [diff] [blame] | 41 | /* TODO: move extract_subscr_* when gsm48_gmm_authorize() got removed */ |
| 42 | void extract_subscr_msisdn(struct sgsn_mm_ctx *ctx); |
| 43 | void extract_subscr_hlr(struct sgsn_mm_ctx *ctx); |
Pau Espin Pedrol | 8c7d259 | 2018-07-09 20:44:17 +0200 | [diff] [blame] | 44 | |
Pau Espin Pedrol | 8333ef1 | 2019-08-29 19:26:12 +0200 | [diff] [blame] | 45 | void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg); |
Pau Espin Pedrol | 35f0e66 | 2019-09-02 18:27:27 +0200 | [diff] [blame] | 46 | void mmctx2msgid(struct msgb *msg, const struct sgsn_mm_ctx *mm); |
Harald Welte | 75827d6 | 2010-05-18 11:07:34 +0200 | [diff] [blame] | 47 | #endif /* _GPRS_GMM_H */ |