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