blob: cf4350d233db349fa22cf3cefa3faf1ae3329495 [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 */
Daniel Willmannf44d12c2016-04-20 10:16:37 +020014struct 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 +010015
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
Neels Hofmeyrf6e16b72016-04-19 02:32:05 +020027/*! \brief generate RAPAP IU RELEASE COMPLETE message */
28struct msgb *ranap_new_msg_iu_rel_compl(void);
29
Harald Weltef8db61b2015-12-18 17:29:59 +010030/*! \brief generate RANAP PAGING COMMAND message */
31struct msgb *ranap_new_msg_paging_cmd(const char *imsi, const uint32_t *tmsi, int is_ps, uint32_t cause);
32
33/*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for CS (voice) */
34struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, uint16_t rtp_port);
35
36/*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for PS (data) */
37struct 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 +010038
39/*! \brief generate RANAP RESET message */
40struct msgb *ranap_new_msg_reset(RANAP_CN_DomainIndicator_t domain,
Harald Welte1cdb81d2016-01-01 16:21:05 +010041 const RANAP_Cause_t *cause);
Harald Weltec4338de2015-12-24 00:40:52 +010042
43/*! \brief generate RANAP RESET ACK message */
44struct msgb *ranap_new_msg_reset_ack(RANAP_CN_DomainIndicator_t domain,
45 RANAP_GlobalRNC_ID_t *rnc_id);
Harald Welteea98b6f2015-12-24 15:09:06 +010046
47
48/*! \brief generate RANAP INITIAL UE message */
49struct msgb *ranap_new_msg_initial_ue(uint32_t conn_id, int is_ps,
50 RANAP_GlobalRNC_ID_t *rnc_id,
51 uint8_t *nas_pdu, unsigned int nas_len);
Harald Welte37223d82016-01-01 16:18:55 +010052
53/*! \brief generate RANAP IU RELEASE REQUEST message */
54struct msgb *ranap_new_msg_iu_rel_req(const RANAP_Cause_t *cause);
55
56/*! \brief generate RANAP RAB RELEASE REQUEST message */
57struct msgb *ranap_new_msg_rab_rel_req(uint8_t rab_id, const RANAP_Cause_t *cause);