Harald Welte | c4338de | 2015-12-24 00:40:52 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <stdint.h> |
Neels Hofmeyr | edf1367 | 2016-04-23 13:50:46 +0200 | [diff] [blame] | 4 | #include <stdbool.h> |
Neels Hofmeyr | f1f2d7c | 2016-01-05 12:00:06 +0100 | [diff] [blame] | 5 | #include <osmocom/ranap/RANAP_Cause.h> |
| 6 | #include <osmocom/ranap/RANAP_CN-DomainIndicator.h> |
| 7 | #include <osmocom/ranap/RANAP_GlobalRNC-ID.h> |
Neels Hofmeyr | a9f5566 | 2016-04-19 01:21:41 +0200 | [diff] [blame] | 8 | #include <osmocom/ranap/RANAP_ChosenIntegrityProtectionAlgorithm.h> |
| 9 | #include <osmocom/ranap/RANAP_ChosenEncryptionAlgorithm.h> |
Neels Hofmeyr | 04b5b66 | 2019-01-16 17:00:15 +0100 | [diff] [blame] | 10 | #include <osmocom/ranap/RANAP_KeyStatus.h> |
Harald Welte | f8db61b | 2015-12-18 17:29:59 +0100 | [diff] [blame] | 11 | |
| 12 | /*! \brief generate RANAP DIRECT TRANSFER message */ |
| 13 | struct msgb *ranap_new_msg_dt(uint8_t sapi, const uint8_t *nas, unsigned int nas_len); |
| 14 | |
| 15 | /*! \brief generate RANAP SECURITY MODE COMMAND message */ |
Daniel Willmann | f44d12c | 2016-04-20 10:16:37 +0200 | [diff] [blame] | 16 | struct msgb *ranap_new_msg_sec_mod_cmd(const uint8_t *ik, const uint8_t *ck, enum RANAP_KeyStatus status); |
Harald Welte | f8db61b | 2015-12-18 17:29:59 +0100 | [diff] [blame] | 17 | |
Neels Hofmeyr | a9f5566 | 2016-04-19 01:21:41 +0200 | [diff] [blame] | 18 | /*! \brief generate RANAP SECURITY MODE COMPLETE message */ |
| 19 | struct msgb *ranap_new_msg_sec_mod_compl( |
| 20 | RANAP_ChosenIntegrityProtectionAlgorithm_t chosen_ip_alg, |
| 21 | RANAP_ChosenEncryptionAlgorithm_t chosen_enc_alg); |
| 22 | |
Harald Welte | f8db61b | 2015-12-18 17:29:59 +0100 | [diff] [blame] | 23 | /*! \brief generate RANAP COMMON ID message */ |
| 24 | struct msgb *ranap_new_msg_common_id(const char *imsi); |
| 25 | |
| 26 | /*! \brief generate RANAP IU RELEASE COMMAND message */ |
| 27 | struct msgb *ranap_new_msg_iu_rel_cmd(const RANAP_Cause_t *cause_in); |
| 28 | |
Neels Hofmeyr | f6e16b7 | 2016-04-19 02:32:05 +0200 | [diff] [blame] | 29 | /*! \brief generate RAPAP IU RELEASE COMPLETE message */ |
| 30 | struct msgb *ranap_new_msg_iu_rel_compl(void); |
| 31 | |
Harald Welte | f8db61b | 2015-12-18 17:29:59 +0100 | [diff] [blame] | 32 | /*! \brief generate RANAP PAGING COMMAND message */ |
| 33 | struct msgb *ranap_new_msg_paging_cmd(const char *imsi, const uint32_t *tmsi, int is_ps, uint32_t cause); |
| 34 | |
| 35 | /*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for CS (voice) */ |
Neels Hofmeyr | f6673b7 | 2016-09-08 15:39:18 +0200 | [diff] [blame] | 36 | struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, |
| 37 | uint16_t rtp_port, |
| 38 | bool use_x213_nsap); |
Harald Welte | f8db61b | 2015-12-18 17:29:59 +0100 | [diff] [blame] | 39 | |
| 40 | /*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for PS (data) */ |
Neels Hofmeyr | edf1367 | 2016-04-23 13:50:46 +0200 | [diff] [blame] | 41 | struct msgb *ranap_new_msg_rab_assign_data(uint8_t rab_id, uint32_t gtp_ip, |
| 42 | uint32_t gtp_tei, bool use_x213_nsap); |
Harald Welte | c4338de | 2015-12-24 00:40:52 +0100 | [diff] [blame] | 43 | |
| 44 | /*! \brief generate RANAP RESET message */ |
| 45 | struct msgb *ranap_new_msg_reset(RANAP_CN_DomainIndicator_t domain, |
Harald Welte | 1cdb81d | 2016-01-01 16:21:05 +0100 | [diff] [blame] | 46 | const RANAP_Cause_t *cause); |
Harald Welte | c4338de | 2015-12-24 00:40:52 +0100 | [diff] [blame] | 47 | |
| 48 | /*! \brief generate RANAP RESET ACK message */ |
| 49 | struct msgb *ranap_new_msg_reset_ack(RANAP_CN_DomainIndicator_t domain, |
| 50 | RANAP_GlobalRNC_ID_t *rnc_id); |
Harald Welte | ea98b6f | 2015-12-24 15:09:06 +0100 | [diff] [blame] | 51 | |
| 52 | |
| 53 | /*! \brief generate RANAP INITIAL UE message */ |
| 54 | struct msgb *ranap_new_msg_initial_ue(uint32_t conn_id, int is_ps, |
| 55 | RANAP_GlobalRNC_ID_t *rnc_id, |
| 56 | uint8_t *nas_pdu, unsigned int nas_len); |
Harald Welte | 37223d8 | 2016-01-01 16:18:55 +0100 | [diff] [blame] | 57 | |
| 58 | /*! \brief generate RANAP IU RELEASE REQUEST message */ |
| 59 | struct msgb *ranap_new_msg_iu_rel_req(const RANAP_Cause_t *cause); |
| 60 | |
| 61 | /*! \brief generate RANAP RAB RELEASE REQUEST message */ |
| 62 | struct msgb *ranap_new_msg_rab_rel_req(uint8_t rab_id, const RANAP_Cause_t *cause); |