blob: d0fe4a25f8af4a5b6d75add83bb12d802af0adb6 [file] [log] [blame]
Harald Weltec4338de2015-12-24 00:40:52 +01001#pragma once
2
3#include <stdint.h>
Neels Hofmeyrf1f2d7c2016-01-05 12:00:06 +01004#include <osmocom/ranap/RANAP_Cause.h>
5#include <osmocom/ranap/RANAP_CN-DomainIndicator.h>
6#include <osmocom/ranap/RANAP_GlobalRNC-ID.h>
Neels Hofmeyra9f55662016-04-19 01:21:41 +02007#include <osmocom/ranap/RANAP_ChosenIntegrityProtectionAlgorithm.h>
8#include <osmocom/ranap/RANAP_ChosenEncryptionAlgorithm.h>
Harald Weltef8db61b2015-12-18 17:29:59 +01009
10/*! \brief generate RANAP DIRECT TRANSFER message */
11struct msgb *ranap_new_msg_dt(uint8_t sapi, const uint8_t *nas, unsigned int nas_len);
12
13/*! \brief generate RANAP SECURITY MODE COMMAND message */
14struct msgb *ranap_new_msg_sec_mod_cmd(const uint8_t *ik, const uint8_t *ck);
15
Neels Hofmeyra9f55662016-04-19 01:21:41 +020016/*! \brief generate RANAP SECURITY MODE COMPLETE message */
17struct msgb *ranap_new_msg_sec_mod_compl(
18 RANAP_ChosenIntegrityProtectionAlgorithm_t chosen_ip_alg,
19 RANAP_ChosenEncryptionAlgorithm_t chosen_enc_alg);
20
Harald Weltef8db61b2015-12-18 17:29:59 +010021/*! \brief generate RANAP COMMON ID message */
22struct msgb *ranap_new_msg_common_id(const char *imsi);
23
24/*! \brief generate RANAP IU RELEASE COMMAND message */
25struct msgb *ranap_new_msg_iu_rel_cmd(const RANAP_Cause_t *cause_in);
26
27/*! \brief generate RANAP PAGING COMMAND message */
28struct msgb *ranap_new_msg_paging_cmd(const char *imsi, const uint32_t *tmsi, int is_ps, uint32_t cause);
29
30/*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for CS (voice) */
31struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, uint16_t rtp_port);
32
33/*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for PS (data) */
34struct msgb *ranap_new_msg_rab_assign_data(uint8_t rab_id, uint32_t gtp_ip, uint32_t gtp_tei);
Harald Weltec4338de2015-12-24 00:40:52 +010035
36/*! \brief generate RANAP RESET message */
37struct msgb *ranap_new_msg_reset(RANAP_CN_DomainIndicator_t domain,
Harald Welte1cdb81d2016-01-01 16:21:05 +010038 const RANAP_Cause_t *cause);
Harald Weltec4338de2015-12-24 00:40:52 +010039
40/*! \brief generate RANAP RESET ACK message */
41struct msgb *ranap_new_msg_reset_ack(RANAP_CN_DomainIndicator_t domain,
42 RANAP_GlobalRNC_ID_t *rnc_id);
Harald Welteea98b6f2015-12-24 15:09:06 +010043
44
45/*! \brief generate RANAP INITIAL UE message */
46struct msgb *ranap_new_msg_initial_ue(uint32_t conn_id, int is_ps,
47 RANAP_GlobalRNC_ID_t *rnc_id,
48 uint8_t *nas_pdu, unsigned int nas_len);
Harald Welte37223d82016-01-01 16:18:55 +010049
50/*! \brief generate RANAP IU RELEASE REQUEST message */
51struct msgb *ranap_new_msg_iu_rel_req(const RANAP_Cause_t *cause);
52
53/*! \brief generate RANAP RAB RELEASE REQUEST message */
54struct msgb *ranap_new_msg_rab_rel_req(uint8_t rab_id, const RANAP_Cause_t *cause);