blob: 4c0c6eac43976e0b7f51b6a9ace4b61c0d4a22a7 [file] [log] [blame]
Neels Hofmeyrc4628a32018-12-07 14:47:34 +01001/* Manage a list of struct gsm0808_cell_id */
2/*
Vadim Yanitskiy999a5932023-05-18 17:22:26 +07003 * (C) 2019 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
Neels Hofmeyrc4628a32018-12-07 14:47:34 +01004 * 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.
Neels Hofmeyrc4628a32018-12-07 14:47:34 +010019 */
20
21#pragma once
22
23#include <osmocom/core/linuxlist.h>
24#include <osmocom/gsm/gsm0808_utils.h>
25
26struct cell_id_list_entry {
27 struct llist_head entry;
28 struct gsm0808_cell_id cell_id;
29};
30
31int cell_id_list_add_cell(void *talloc_ctx, struct llist_head *list, const struct gsm0808_cell_id *cid);
32int cell_id_list_add_list(void *talloc_ctx, struct llist_head *list, const struct gsm0808_cell_id_list2 *cil);
33
34struct cell_id_list_entry *cell_id_list_find(struct llist_head *list,
35 const struct gsm0808_cell_id *id,
36 unsigned int match_nr,
37 bool exact_match);
38
39void cell_id_list_del_entry(struct cell_id_list_entry *e);