Osmocom's Base Station Controller for 2G mobile networks https://osmocom.org/projects/osmobsc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
osmo-bsc/include/osmocom/bsc/lchan_select.h

28 lines
1.1 KiB

/* Select a suitable lchan from a given cell. */
#pragma once
enum lchan_select_reason {
SELECT_FOR_MS_CHAN_REQ,
SELECT_FOR_ASSIGNMENT,
SELECT_FOR_HANDOVER,
};
extern const struct value_string lchan_select_reason_names[];
static inline const char *lchan_select_reason_name(enum lchan_select_reason reason)
{ return get_value_string(lchan_select_reason_names, reason); }
struct gsm_lchan *lchan_select_by_type(struct gsm_bts *bts,
enum gsm_chan_t type,
enum lchan_select_reason reason,
void *ctx);
enum gsm_chan_t chan_mode_to_chan_type(enum gsm48_chan_mode chan_mode, enum channel_rate chan_rate);
struct gsm_lchan *lchan_select_by_chan_mode(struct gsm_bts *bts,
enum gsm48_chan_mode chan_mode,
enum channel_rate chan_rate,
enum lchan_select_reason reason,
void *ctx);
struct gsm_lchan *lchan_avail_by_type(struct gsm_bts *bts,
enum gsm_chan_t type,
enum lchan_select_reason reason,
void *ctx, bool log);
void lchan_select_set_type(struct gsm_lchan *lchan, enum gsm_chan_t type);