gb_proxy_peer: Add Function to get gbproxy cell by cell id
Change-Id: I3403736eed9d6819634c26db0b90393ac6f4416a Related: SYS#5103
This commit is contained in:
parent
da3af94bf8
commit
fccbef0a28
|
@ -270,6 +270,7 @@ int gbproxy_cleanup_bvcs(struct gbproxy_nse *nse, uint16_t bvci);
|
||||||
|
|
||||||
struct gbproxy_cell *gbproxy_cell_alloc(struct gbproxy_config *cfg, uint16_t bvci);
|
struct gbproxy_cell *gbproxy_cell_alloc(struct gbproxy_config *cfg, uint16_t bvci);
|
||||||
struct gbproxy_cell *gbproxy_cell_by_bvci(struct gbproxy_config *cfg, uint16_t bvci);
|
struct gbproxy_cell *gbproxy_cell_by_bvci(struct gbproxy_config *cfg, uint16_t bvci);
|
||||||
|
struct gbproxy_cell *gbproxy_cell_by_cellid(struct gbproxy_config *cfg, const struct gprs_ra_id *raid, uint16_t cid);
|
||||||
void gbproxy_cell_free(struct gbproxy_cell *cell);
|
void gbproxy_cell_free(struct gbproxy_cell *cell);
|
||||||
bool gbproxy_cell_add_sgsn_bvc(struct gbproxy_cell *cell, struct gbproxy_bvc *bvc);
|
bool gbproxy_cell_add_sgsn_bvc(struct gbproxy_cell *cell, struct gbproxy_bvc *bvc);
|
||||||
|
|
||||||
|
|
|
@ -206,6 +206,19 @@ struct gbproxy_cell *gbproxy_cell_by_bvci_or_new(struct gbproxy_config *cfg, uin
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct gbproxy_cell *gbproxy_cell_by_cellid(struct gbproxy_config *cfg, const struct gprs_ra_id *raid, uint16_t cid)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
struct gbproxy_cell *cell;
|
||||||
|
|
||||||
|
hash_for_each(cfg->cells, i, cell, list) {
|
||||||
|
if (cell->id.cid == cid && gsm48_ra_equal(&cell->id.raid, raid)) {
|
||||||
|
return cell;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void gbproxy_cell_free(struct gbproxy_cell *cell)
|
void gbproxy_cell_free(struct gbproxy_cell *cell)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
Loading…
Reference in New Issue