blob: 8fcbe380e8fb90941e4c052724688ccf2893f052 [file] [log] [blame]
Neels Hofmeyr5b214e22020-09-18 18:00:50 +02001/*! \addtogroup gsm0808
2 * @{
3 * \file gsm0808_lcs.h
4 *
5 * Declarations that depend on both gsm0808.h and bssmap_le.h: LCS related message coding.
6 * (This file prevents circular dependency between struct definitions for BSSMAP messages, since BSSMAP references
7 * struct lcs_cause and struct bssmap_le_location_type, and BSSMAP-LE references gsm0808_cause.
8 */
9/*
10 * (C) 2020 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
11 * All Rights Reserved
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 *
27 */
28#pragma once
29
30#include <osmocom/gsm/gsm0808.h>
31#include <osmocom/gsm/bssmap_le.h>
32
33struct gsm0808_perform_location_request {
34 struct bssmap_le_location_type location_type;
35 struct osmo_mobile_identity imsi;
36
37 bool more_items; /*!< always set this to false */
38};
39struct msgb *gsm0808_create_perform_location_request(const struct gsm0808_perform_location_request *params);
40
41struct gsm0808_perform_location_response {
42 bool location_estimate_present;
43 union gad_raw location_estimate;
44
45 struct lcs_cause_ie lcs_cause;
46};
47struct msgb *gsm0808_create_perform_location_response(const struct gsm0808_perform_location_response *params);
48
49int gsm0808_enc_lcs_cause(struct msgb *msg, const struct lcs_cause_ie *lcs_cause);
50struct msgb *gsm0808_create_perform_location_abort(const struct lcs_cause_ie *lcs_cause);
51
52/*! @} */