blob: 83d05f5dae0e4b91d8f2ccf7130fddebd8df29f3 [file] [log] [blame]
Neels Hofmeyrc4628a32018-12-07 14:47:34 +01001/* Manage a list of struct gsm0808_cell_id */
2/*
3 * (C) 2019 by sysmocom - s.m.f.c. GmbH <info@sysmocom.de>
4 * All Rights Reserved
5 *
6 * Author: Neels Hofmeyr
7 *
8 * SPDX-License-Identifier: GPL-2.0+
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 */
24
25#pragma once
26
27#include <osmocom/core/linuxlist.h>
28#include <osmocom/gsm/gsm0808_utils.h>
29
30struct cell_id_list_entry {
31 struct llist_head entry;
32 struct gsm0808_cell_id cell_id;
33};
34
35int cell_id_list_add_cell(void *talloc_ctx, struct llist_head *list, const struct gsm0808_cell_id *cid);
36int cell_id_list_add_list(void *talloc_ctx, struct llist_head *list, const struct gsm0808_cell_id_list2 *cil);
37
38struct cell_id_list_entry *cell_id_list_find(struct llist_head *list,
39 const struct gsm0808_cell_id *id,
40 unsigned int match_nr,
41 bool exact_match);
42
43void cell_id_list_del_entry(struct cell_id_list_entry *e);