Neels Hofmeyr | c4628a3 | 2018-12-07 14:47:34 +0100 | [diff] [blame] | 1 | /* 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. |
Neels Hofmeyr | c4628a3 | 2018-12-07 14:47:34 +0100 | [diff] [blame] | 19 | */ |
| 20 | |
| 21 | #pragma once |
| 22 | |
| 23 | #include <osmocom/core/linuxlist.h> |
| 24 | #include <osmocom/gsm/gsm0808_utils.h> |
| 25 | |
| 26 | struct cell_id_list_entry { |
| 27 | struct llist_head entry; |
| 28 | struct gsm0808_cell_id cell_id; |
| 29 | }; |
| 30 | |
| 31 | int cell_id_list_add_cell(void *talloc_ctx, struct llist_head *list, const struct gsm0808_cell_id *cid); |
| 32 | int cell_id_list_add_list(void *talloc_ctx, struct llist_head *list, const struct gsm0808_cell_id_list2 *cil); |
| 33 | |
| 34 | struct 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 | |
| 39 | void cell_id_list_del_entry(struct cell_id_list_entry *e); |