Holger Freyther | d0e38c3 | 2009-01-04 03:48:30 +0000 | [diff] [blame] | 1 | /* Management functions to allocate/release struct gsm_lchan */ |
| 2 | /* (C) 2008 by Harald Welte <laforge@gnumonks.org> |
| 3 | * (C) 2009 by Holger Hans Peter Freyther <zecke@selfish.org> |
| 4 | * All Rights Reserved |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (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 along |
| 17 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | * |
| 20 | */ |
Harald Welte | 8470bf2 | 2008-12-25 23:28:35 +0000 | [diff] [blame] | 21 | #ifndef _CHAN_ALLOC_H |
| 22 | #define _CHAN_ALLOC_H |
| 23 | |
Holger Freyther | d0e38c3 | 2009-01-04 03:48:30 +0000 | [diff] [blame] | 24 | #include "gsm_subscriber.h" |
| 25 | |
Harald Welte | 8470bf2 | 2008-12-25 23:28:35 +0000 | [diff] [blame] | 26 | /* Special allocator for C0 of BTS */ |
| 27 | struct gsm_bts_trx_ts *ts_c0_alloc(struct gsm_bts *bts, |
| 28 | enum gsm_phys_chan_config pchan); |
| 29 | |
| 30 | /* Regular physical channel allocator */ |
| 31 | struct gsm_bts_trx_ts *ts_alloc(struct gsm_bts *bts, |
| 32 | enum gsm_phys_chan_config pchan); |
| 33 | |
| 34 | /* Regular physical channel (TS) */ |
| 35 | void ts_free(struct gsm_bts_trx_ts *ts); |
| 36 | |
Holger Freyther | d0e38c3 | 2009-01-04 03:48:30 +0000 | [diff] [blame] | 37 | /* Find an allocated channel */ |
| 38 | struct gsm_lchan *lchan_find(struct gsm_bts *bts, struct gsm_subscriber *subscr); |
Harald Welte | 8470bf2 | 2008-12-25 23:28:35 +0000 | [diff] [blame] | 39 | |
| 40 | /* Allocate a logical channel (SDCCH, TCH, ...) */ |
| 41 | struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type); |
| 42 | |
| 43 | /* Free a logical channel (SDCCH, TCH, ...) */ |
| 44 | void lchan_free(struct gsm_lchan *lchan); |
| 45 | |
Holger Freyther | 67b4b9a | 2009-01-01 03:46:11 +0000 | [diff] [blame] | 46 | /* Consider releasing the channel */ |
| 47 | int lchan_auto_release(struct gsm_lchan *lchan); |
| 48 | |
Harald Welte | 8470bf2 | 2008-12-25 23:28:35 +0000 | [diff] [blame] | 49 | #endif /* _CHAN_ALLOC_H */ |