Jacob Erlbeck | 62e96a3 | 2015-06-04 09:42:14 +0200 | [diff] [blame] | 1 | /* pcu_vty_functions.cpp |
| 2 | * |
| 3 | * Copyright (C) 2015 by Sysmocom s.f.m.c. GmbH |
| 4 | * Author: Jacob Erlbeck <jerlbeck@sysmocom.de> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version 2 |
| 9 | * of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 19 | */ |
| 20 | /* OsmoBTS VTY interface */ |
| 21 | |
| 22 | |
| 23 | #include <stdint.h> |
| 24 | #include <stdlib.h> |
| 25 | #include "pcu_vty_functions.h" |
Jacob Erlbeck | f47f68a | 2015-06-04 10:23:24 +0200 | [diff] [blame^] | 26 | #include "bts.h" |
| 27 | #include "gprs_ms_storage.h" |
| 28 | #include "gprs_ms.h" |
| 29 | #include "cxx_linuxlist.h" |
Jacob Erlbeck | 62e96a3 | 2015-06-04 09:42:14 +0200 | [diff] [blame] | 30 | |
| 31 | extern "C" { |
| 32 | # include <osmocom/vty/command.h> |
| 33 | # include <osmocom/vty/logging.h> |
| 34 | # include <osmocom/vty/misc.h> |
| 35 | } |
| 36 | |
| 37 | int pcu_vty_config_write_pcu_ext(struct vty *vty) |
| 38 | { |
| 39 | return CMD_SUCCESS; |
| 40 | } |
Jacob Erlbeck | f47f68a | 2015-06-04 10:23:24 +0200 | [diff] [blame^] | 41 | |
| 42 | int pcu_vty_show_ms_all(struct vty *vty, struct gprs_rlcmac_bts *bts_data) |
| 43 | { |
| 44 | BTS *bts = bts_data->bts; |
| 45 | LListHead<GprsMs> *ms_iter; |
| 46 | |
| 47 | llist_for_each(ms_iter, &bts->ms_store().ms_list()) { |
| 48 | GprsMs *ms = ms_iter->entry(); |
| 49 | |
| 50 | vty_out(vty, "MS TLLI=%08x, TA=%d, CS-UL=%d, CS-DL=%d, IMSI=%s%s", |
| 51 | ms->tlli(), |
| 52 | ms->ta(), ms->current_cs_ul(), ms->current_cs_dl(), |
| 53 | ms->imsi(), |
| 54 | VTY_NEWLINE); |
| 55 | } |
| 56 | return CMD_SUCCESS; |
| 57 | } |