blob: 71665013e805fd5068e71c3b9ba92a2f0a0c6dd2 [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 *
Neels Hofmeyr5b214e22020-09-18 18:00:50 +020023 */
24#pragma once
25
26#include <osmocom/gsm/gsm0808.h>
27#include <osmocom/gsm/bssmap_le.h>
28
29struct gsm0808_perform_location_request {
30 struct bssmap_le_location_type location_type;
31 struct osmo_mobile_identity imsi;
32
33 bool more_items; /*!< always set this to false */
34};
35struct msgb *gsm0808_create_perform_location_request(const struct gsm0808_perform_location_request *params);
36
37struct gsm0808_perform_location_response {
38 bool location_estimate_present;
39 union gad_raw location_estimate;
40
41 struct lcs_cause_ie lcs_cause;
42};
43struct msgb *gsm0808_create_perform_location_response(const struct gsm0808_perform_location_response *params);
44
45int gsm0808_enc_lcs_cause(struct msgb *msg, const struct lcs_cause_ie *lcs_cause);
46struct msgb *gsm0808_create_perform_location_abort(const struct lcs_cause_ie *lcs_cause);
47
48/*! @} */