blob: 120c6e6b1b229d0bc218958ca4da5590a270e7ef [file] [log] [blame]
Harald Weltec4338de2015-12-24 00:40:52 +01001#pragma once
2
3#include <stdint.h>
Neels Hofmeyredf13672016-04-23 13:50:46 +02004#include <stdbool.h>
Neels Hofmeyrf1f2d7c2016-01-05 12:00:06 +01005#include <osmocom/ranap/RANAP_Cause.h>
6#include <osmocom/ranap/RANAP_CN-DomainIndicator.h>
7#include <osmocom/ranap/RANAP_GlobalRNC-ID.h>
Neels Hofmeyra9f55662016-04-19 01:21:41 +02008#include <osmocom/ranap/RANAP_ChosenIntegrityProtectionAlgorithm.h>
9#include <osmocom/ranap/RANAP_ChosenEncryptionAlgorithm.h>
Harald Weltef8db61b2015-12-18 17:29:59 +010010
11/*! \brief generate RANAP DIRECT TRANSFER message */
12struct 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 Willmannf44d12c2016-04-20 10:16:37 +020015struct msgb *ranap_new_msg_sec_mod_cmd(const uint8_t *ik, const uint8_t *ck, enum RANAP_KeyStatus status);
Harald Weltef8db61b2015-12-18 17:29:59 +010016
Neels Hofmeyra9f55662016-04-19 01:21:41 +020017/*! \brief generate RANAP SECURITY MODE COMPLETE message */
18struct msgb *ranap_new_msg_sec_mod_compl(
19 RANAP_ChosenIntegrityProtectionAlgorithm_t chosen_ip_alg,
20 RANAP_ChosenEncryptionAlgorithm_t chosen_enc_alg);
21
Harald Weltef8db61b2015-12-18 17:29:59 +010022/*! \brief generate RANAP COMMON ID message */
23struct msgb *ranap_new_msg_common_id(const char *imsi);
24
25/*! \brief generate RANAP IU RELEASE COMMAND message */
26struct msgb *ranap_new_msg_iu_rel_cmd(const RANAP_Cause_t *cause_in);
27
Neels Hofmeyrf6e16b72016-04-19 02:32:05 +020028/*! \brief generate RAPAP IU RELEASE COMPLETE message */
29struct msgb *ranap_new_msg_iu_rel_compl(void);
30
Harald Weltef8db61b2015-12-18 17:29:59 +010031/*! \brief generate RANAP PAGING COMMAND message */
32struct 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 Hofmeyrf6673b72016-09-08 15:39:18 +020035struct 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 Weltef8db61b2015-12-18 17:29:59 +010038
39/*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for PS (data) */
Neels Hofmeyredf13672016-04-23 13:50:46 +020040struct 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 Weltec4338de2015-12-24 00:40:52 +010042
43/*! \brief generate RANAP RESET message */
44struct msgb *ranap_new_msg_reset(RANAP_CN_DomainIndicator_t domain,
Harald Welte1cdb81d2016-01-01 16:21:05 +010045 const RANAP_Cause_t *cause);
Harald Weltec4338de2015-12-24 00:40:52 +010046
47/*! \brief generate RANAP RESET ACK message */
48struct msgb *ranap_new_msg_reset_ack(RANAP_CN_DomainIndicator_t domain,
49 RANAP_GlobalRNC_ID_t *rnc_id);
Harald Welteea98b6f2015-12-24 15:09:06 +010050
51
52/*! \brief generate RANAP INITIAL UE message */
53struct 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 Welte37223d82016-01-01 16:18:55 +010056
57/*! \brief generate RANAP IU RELEASE REQUEST message */
58struct msgb *ranap_new_msg_iu_rel_req(const RANAP_Cause_t *cause);
59
60/*! \brief generate RANAP RAB RELEASE REQUEST message */
61struct msgb *ranap_new_msg_rab_rel_req(uint8_t rab_id, const RANAP_Cause_t *cause);