Neels Hofmeyr | 5b214e2 | 2020-09-18 18:00:50 +0200 | [diff] [blame] | 1 | /*! \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 | |
| 33 | struct 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 | }; |
| 39 | struct msgb *gsm0808_create_perform_location_request(const struct gsm0808_perform_location_request *params); |
| 40 | |
| 41 | struct gsm0808_perform_location_response { |
| 42 | bool location_estimate_present; |
| 43 | union gad_raw location_estimate; |
| 44 | |
| 45 | struct lcs_cause_ie lcs_cause; |
| 46 | }; |
| 47 | struct msgb *gsm0808_create_perform_location_response(const struct gsm0808_perform_location_response *params); |
| 48 | |
| 49 | int gsm0808_enc_lcs_cause(struct msgb *msg, const struct lcs_cause_ie *lcs_cause); |
| 50 | struct msgb *gsm0808_create_perform_location_abort(const struct lcs_cause_ie *lcs_cause); |
| 51 | |
| 52 | /*! @} */ |