Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 1 | #ifndef _GB_PROXY_H |
| 2 | #define _GB_PROXY_H |
| 3 | |
| 4 | |
| 5 | #include <osmocom/core/msgb.h> |
Alexander Couzens | 951e133 | 2020-09-22 13:21:46 +0200 | [diff] [blame] | 6 | #include <osmocom/core/timer.h> |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 7 | #include <osmocom/core/fsm.h> |
Harald Welte | d2fef95 | 2020-12-05 00:31:07 +0100 | [diff] [blame] | 8 | #include <osmocom/core/hashtable.h> |
Neels Hofmeyr | 6179f0c | 2018-02-21 00:39:36 +0100 | [diff] [blame] | 9 | #include <osmocom/gsm/gsm23003.h> |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 10 | #include <osmocom/gsm/gsm23236.h> |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 11 | |
Alexander Couzens | 951e133 | 2020-09-22 13:21:46 +0200 | [diff] [blame] | 12 | #include <osmocom/gprs/gprs_ns2.h> |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 13 | #include <osmocom/vty/command.h> |
| 14 | |
| 15 | #include <sys/types.h> |
| 16 | #include <regex.h> |
Harald Welte | bec7041 | 2019-03-22 09:44:42 +0100 | [diff] [blame] | 17 | #include <stdbool.h> |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 18 | |
| 19 | #define GBPROXY_INIT_VU_GEN_TX 256 |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 20 | #define GBPROXY_MAX_NR_SGSN 16 |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 21 | |
Daniel Willmann | 8f407b1 | 2020-12-02 19:33:50 +0100 | [diff] [blame] | 22 | /* BVCI uses 16 bits */ |
| 23 | #define BVC_LOG_CTX_FLAG (1<<17) |
| 24 | |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 25 | struct rate_ctr_group; |
| 26 | struct gprs_gb_parse_context; |
| 27 | struct tlv_parsed; |
| 28 | |
| 29 | enum gbproxy_global_ctr { |
| 30 | GBPROX_GLOB_CTR_INV_BVCI, |
| 31 | GBPROX_GLOB_CTR_INV_LAI, |
| 32 | GBPROX_GLOB_CTR_INV_RAI, |
| 33 | GBPROX_GLOB_CTR_INV_NSEI, |
| 34 | GBPROX_GLOB_CTR_PROTO_ERR_BSS, |
| 35 | GBPROX_GLOB_CTR_PROTO_ERR_SGSN, |
| 36 | GBPROX_GLOB_CTR_NOT_SUPPORTED_BSS, |
| 37 | GBPROX_GLOB_CTR_NOT_SUPPORTED_SGSN, |
| 38 | GBPROX_GLOB_CTR_RESTART_RESET_SGSN, |
| 39 | GBPROX_GLOB_CTR_TX_ERR_SGSN, |
| 40 | GBPROX_GLOB_CTR_OTHER_ERR, |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 41 | }; |
| 42 | |
Harald Welte | 560bdb3 | 2020-12-04 22:24:47 +0100 | [diff] [blame] | 43 | enum gbproxy_bvc_ctr { |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 44 | GBPROX_PEER_CTR_BLOCKED, |
| 45 | GBPROX_PEER_CTR_UNBLOCKED, |
| 46 | GBPROX_PEER_CTR_DROPPED, |
| 47 | GBPROX_PEER_CTR_INV_NSEI, |
| 48 | GBPROX_PEER_CTR_TX_ERR, |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 49 | GBPROX_PEER_CTR_LAST, |
| 50 | }; |
| 51 | |
Harald Welte | 4a8769a | 2019-03-22 08:26:45 +0100 | [diff] [blame] | 52 | /* global gb-proxy configuration */ |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 53 | struct gbproxy_config { |
Harald Welte | 4a8769a | 2019-03-22 08:26:45 +0100 | [diff] [blame] | 54 | /* NS instance of libosmogb */ |
Alexander Couzens | 951e133 | 2020-09-22 13:21:46 +0200 | [diff] [blame] | 55 | struct gprs_ns2_inst *nsi; |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 56 | |
Harald Welte | 209dc9f | 2020-12-12 19:02:16 +0100 | [diff] [blame] | 57 | struct { |
| 58 | /* percentage of BVC flow control advertised to each SGSN in the pool */ |
| 59 | uint8_t bvc_fc_ratio; |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 60 | /* NRI bitlen and usable NULL-NRI ranges */ |
| 61 | uint8_t nri_bitlen; |
| 62 | struct osmo_nri_ranges *null_nri_ranges; |
Daniel Willmann | b387c1e | 2020-12-27 18:14:39 +0100 | [diff] [blame] | 63 | |
| 64 | /* Used for testing: If not NULL then this SGSN is returned by |
| 65 | * gbproxy_sgsn_by_tlli() */ |
| 66 | struct gbproxy_sgsn *nsf_override; |
Harald Welte | 209dc9f | 2020-12-12 19:02:16 +0100 | [diff] [blame] | 67 | } pool; |
| 68 | |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 69 | /* hash table of all BSS side Gb peers */ |
Harald Welte | d2fef95 | 2020-12-05 00:31:07 +0100 | [diff] [blame] | 70 | DECLARE_HASHTABLE(bss_nses, 8); |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 71 | |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 72 | /* hash table of all SGSN-side Gb peers */ |
| 73 | DECLARE_HASHTABLE(sgsn_nses, 8); |
| 74 | |
| 75 | /* hash table of all gbproxy_cell */ |
| 76 | DECLARE_HASHTABLE(cells, 8); |
| 77 | |
Daniel Willmann | 77493b1 | 2020-12-29 21:13:31 +0100 | [diff] [blame^] | 78 | /* tlli<->nse cache used to map SUSPEND/RESUME (N)ACKS */ |
| 79 | struct { |
| 80 | DECLARE_HASHTABLE(entries, 10); |
| 81 | struct osmo_timer_list timer; |
| 82 | /* Time in seconds that the entries should be valid */ |
| 83 | uint8_t timeout; |
| 84 | } tlli_cache; |
| 85 | |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 86 | /* List of all SGSNs */ |
| 87 | struct llist_head sgsns; |
| 88 | |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 89 | /* Counter */ |
| 90 | struct rate_ctr_group *ctrg; |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 91 | }; |
| 92 | |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 93 | /* One Cell within the BSS: Links BSS-side BVC to SGSN-side BVCs */ |
| 94 | struct gbproxy_cell { |
| 95 | /* linked to gbproxy_config.cells hashtable */ |
| 96 | struct hlist_node list; |
| 97 | |
| 98 | /* point back to the config */ |
| 99 | struct gbproxy_config *cfg; |
| 100 | |
| 101 | /* BVCI of PTP BVCs associated to this cell */ |
| 102 | uint16_t bvci; |
| 103 | |
| 104 | /* Routing Area that this BVC is part of (raw 04.08 encoding) */ |
| 105 | uint8_t ra[6]; |
| 106 | |
| 107 | /* pointer to the BSS-side BVC */ |
| 108 | struct gbproxy_bvc *bss_bvc; |
| 109 | |
| 110 | /* pointers to SGSN-side BVC (one for each pool member) */ |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 111 | struct gbproxy_bvc *sgsn_bvc[GBPROXY_MAX_NR_SGSN]; |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 112 | }; |
| 113 | |
Daniel Willmann | e50550e | 2020-11-26 18:19:21 +0100 | [diff] [blame] | 114 | /* One BVC inside an NSE */ |
Harald Welte | 560bdb3 | 2020-12-04 22:24:47 +0100 | [diff] [blame] | 115 | struct gbproxy_bvc { |
| 116 | /* linked to gbproxy_nse.bvcs */ |
Harald Welte | 8b4c794 | 2020-12-05 10:14:49 +0100 | [diff] [blame] | 117 | struct hlist_node list; |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 118 | |
Harald Welte | 560bdb3 | 2020-12-04 22:24:47 +0100 | [diff] [blame] | 119 | /* The NSE this BVC belongs to */ |
Daniel Willmann | e50550e | 2020-11-26 18:19:21 +0100 | [diff] [blame] | 120 | struct gbproxy_nse *nse; |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 121 | |
Harald Welte | 560bdb3 | 2020-12-04 22:24:47 +0100 | [diff] [blame] | 122 | /* PTP BVCI of this BVC */ |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 123 | uint16_t bvci; |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 124 | |
Harald Welte | 560bdb3 | 2020-12-04 22:24:47 +0100 | [diff] [blame] | 125 | /* Routing Area that this BVC is part of (raw 04.08 encoding) */ |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 126 | uint8_t ra[6]; |
| 127 | |
| 128 | /* Counter */ |
| 129 | struct rate_ctr_group *ctrg; |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 130 | |
| 131 | /* the cell to which this BVC belongs */ |
| 132 | struct gbproxy_cell *cell; |
| 133 | |
| 134 | /* per-BVC FSM instance */ |
| 135 | struct osmo_fsm_inst *fi; |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 136 | }; |
| 137 | |
Harald Welte | 560bdb3 | 2020-12-04 22:24:47 +0100 | [diff] [blame] | 138 | /* one NS Entity that we interact with (BSS/PCU) */ |
Daniel Willmann | e50550e | 2020-11-26 18:19:21 +0100 | [diff] [blame] | 139 | struct gbproxy_nse { |
Harald Welte | 2b7b1bb | 2020-12-04 23:58:20 +0100 | [diff] [blame] | 140 | /* linked to gbproxy_config.bss_nses */ |
Harald Welte | d2fef95 | 2020-12-05 00:31:07 +0100 | [diff] [blame] | 141 | struct hlist_node list; |
Daniel Willmann | e50550e | 2020-11-26 18:19:21 +0100 | [diff] [blame] | 142 | |
| 143 | /* point back to the config */ |
| 144 | struct gbproxy_config *cfg; |
| 145 | |
Harald Welte | 560bdb3 | 2020-12-04 22:24:47 +0100 | [diff] [blame] | 146 | /* NSEI of the NSE */ |
Daniel Willmann | e50550e | 2020-11-26 18:19:21 +0100 | [diff] [blame] | 147 | uint16_t nsei; |
| 148 | |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 149 | /* Are we facing towards a SGSN (true) or BSS (false) */ |
| 150 | bool sgsn_facing; |
| 151 | |
Daniel Willmann | e50550e | 2020-11-26 18:19:21 +0100 | [diff] [blame] | 152 | /* List of all BVCs in this NSE */ |
Harald Welte | 8b4c794 | 2020-12-05 10:14:49 +0100 | [diff] [blame] | 153 | DECLARE_HASHTABLE(bvcs, 10); |
Daniel Willmann | e50550e | 2020-11-26 18:19:21 +0100 | [diff] [blame] | 154 | }; |
| 155 | |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 156 | /* SGSN configuration such as pool options (only for NSE where sgsn_facing == true) */ |
| 157 | struct gbproxy_sgsn { |
| 158 | /* linked to gbproxy_config.sgsns */ |
| 159 | struct llist_head list; |
| 160 | |
| 161 | /* The NSE belonging to this SGSN */ |
| 162 | struct gbproxy_nse *nse; |
| 163 | |
Daniel Willmann | a648f3c | 2020-12-28 18:07:27 +0100 | [diff] [blame] | 164 | /* Name of the SGSN */ |
| 165 | char *name; |
| 166 | |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 167 | /* Pool configuration for the sgsn (only valid if sgsn_facing == true) */ |
| 168 | struct { |
| 169 | bool allow_attach; |
| 170 | struct osmo_nri_ranges *nri_ranges; |
| 171 | } pool; |
| 172 | }; |
| 173 | |
Daniel Willmann | 77493b1 | 2020-12-29 21:13:31 +0100 | [diff] [blame^] | 174 | /* TLLI cache */ |
| 175 | struct gbproxy_tlli_cache_entry { |
| 176 | /* linked to gbproxy_config.tlli_cache */ |
| 177 | struct hlist_node list; |
| 178 | |
| 179 | /* TLLI of the entry */ |
| 180 | uint32_t tlli; |
| 181 | /* When was this entry last seen */ |
| 182 | time_t tstamp; |
| 183 | /* The Cell this TLLI was last seen */ |
| 184 | struct gbproxy_nse *nse; |
| 185 | }; |
| 186 | |
Daniel Willmann | 066c4cb | 2020-12-01 16:36:29 +0100 | [diff] [blame] | 187 | /* Convenience logging macros for NSE/BVC */ |
| 188 | #define LOGPNSE_CAT(NSE, SUBSYS, LEVEL, FMT, ARGS...) \ |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 189 | LOGP(SUBSYS, LEVEL, "NSE(%05u/%s) " FMT, (NSE)->nsei, \ |
| 190 | (NSE)->sgsn_facing ? "SGSN" : "BSS", ## ARGS) |
Daniel Willmann | 066c4cb | 2020-12-01 16:36:29 +0100 | [diff] [blame] | 191 | #define LOGPNSE(NSE, LEVEL, FMT, ARGS...) \ |
| 192 | LOGPNSE_CAT(NSE, DGPRS, LEVEL, FMT, ## ARGS) |
| 193 | |
| 194 | #define LOGPBVC_CAT(BVC, SUBSYS, LEVEL, FMT, ARGS...) \ |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 195 | LOGP(SUBSYS, LEVEL, "NSE(%05u/%s)-BVC(%05u/%s) " FMT, (BVC)->nse->nsei, \ |
| 196 | (BVC)->nse->sgsn_facing ? "SGSN" : "BSS", (BVC)->bvci, \ |
| 197 | osmo_fsm_inst_state_name((BVC)->fi), ## ARGS) |
Daniel Willmann | 066c4cb | 2020-12-01 16:36:29 +0100 | [diff] [blame] | 198 | #define LOGPBVC(BVC, LEVEL, FMT, ARGS...) \ |
| 199 | LOGPBVC_CAT(BVC, DGPRS, LEVEL, FMT, ## ARGS) |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 200 | |
Harald Welte | cfc7e8e | 2020-12-07 12:03:10 +0100 | [diff] [blame] | 201 | #define LOGPCELL_CAT(CELL, SUBSYS, LEVEL, FMT, ARGS...) \ |
| 202 | LOGP(SUBSYS, LEVEL, "CELL(%05u) " FMT, (CELL)->bvci, ## ARGS) |
| 203 | #define LOGPCELL(CELL, LEVEL, FMT, ARGS...) \ |
| 204 | LOGPCELL_CAT(CELL, DGPRS, LEVEL, FMT, ## ARGS) |
| 205 | |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 206 | #define LOGPSGSN_CAT(SGSN, SUBSYS, LEVEL, FMT, ARGS...) \ |
Daniel Willmann | a648f3c | 2020-12-28 18:07:27 +0100 | [diff] [blame] | 207 | LOGP(SUBSYS, LEVEL, "NSE(%05u)-SGSN(%s) " FMT, (SGSN)->nse->nsei, (SGSN)->name, ## ARGS) |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 208 | #define LOGPSGSN(SGSN, LEVEL, FMT, ARGS...) \ |
| 209 | LOGPSGSN_CAT(SGSN, DGPRS, LEVEL, FMT, ## ARGS) |
| 210 | |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 211 | /* gb_proxy_vty .c */ |
| 212 | |
| 213 | int gbproxy_vty_init(void); |
| 214 | int gbproxy_parse_config(const char *config_file, struct gbproxy_config *cfg); |
| 215 | |
Daniel Willmann | 13404b7 | 2018-06-01 07:21:20 +0200 | [diff] [blame] | 216 | /* gb_proxy_ctrl.c */ |
| 217 | int gb_ctrl_cmds_install(void); |
| 218 | |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 219 | |
| 220 | /* gb_proxy.c */ |
| 221 | int gbproxy_init_config(struct gbproxy_config *cfg); |
| 222 | |
| 223 | /* Main input function for Gb proxy */ |
Alexander Couzens | 951e133 | 2020-09-22 13:21:46 +0200 | [diff] [blame] | 224 | int gbprox_rcvmsg(void *ctx, struct msgb *msg); |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 225 | |
| 226 | int gbprox_signal(unsigned int subsys, unsigned int signal, |
| 227 | void *handler_data, void *signal_data); |
| 228 | |
Alexander Couzens | 951e133 | 2020-09-22 13:21:46 +0200 | [diff] [blame] | 229 | |
| 230 | int gprs_ns2_prim_cb(struct osmo_prim_hdr *oph, void *ctx); |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 231 | |
| 232 | void gbprox_reset(struct gbproxy_config *cfg); |
| 233 | |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 234 | /* Peer handling */ |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 235 | #define NSE_F_SGSN 0x0001 |
| 236 | #define NSE_F_BSS 0x0002 |
| 237 | |
| 238 | struct gbproxy_bvc *gbproxy_bvc_by_bvci(struct gbproxy_nse *nse, uint16_t bvci); |
Harald Welte | 560bdb3 | 2020-12-04 22:24:47 +0100 | [diff] [blame] | 239 | struct gbproxy_bvc *gbproxy_bvc_alloc(struct gbproxy_nse *nse, uint16_t bvci); |
| 240 | void gbproxy_bvc_free(struct gbproxy_bvc *bvc); |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 241 | int gbproxy_cleanup_bvcs(struct gbproxy_nse *nse, uint16_t bvci); |
| 242 | |
| 243 | struct gbproxy_cell *gbproxy_cell_alloc(struct gbproxy_config *cfg, uint16_t bvci); |
| 244 | struct gbproxy_cell *gbproxy_cell_by_bvci(struct gbproxy_config *cfg, uint16_t bvci); |
| 245 | void gbproxy_cell_free(struct gbproxy_cell *cell); |
| 246 | bool gbproxy_cell_add_sgsn_bvc(struct gbproxy_cell *cell, struct gbproxy_bvc *bvc); |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 247 | |
Daniel Willmann | e50550e | 2020-11-26 18:19:21 +0100 | [diff] [blame] | 248 | /* NSE handling */ |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 249 | struct gbproxy_nse *gbproxy_nse_alloc(struct gbproxy_config *cfg, uint16_t nsei, bool sgsn_facing); |
Daniel Willmann | e50550e | 2020-11-26 18:19:21 +0100 | [diff] [blame] | 250 | void gbproxy_nse_free(struct gbproxy_nse *nse); |
Harald Welte | e520964 | 2020-12-05 19:59:45 +0100 | [diff] [blame] | 251 | struct gbproxy_nse *gbproxy_nse_by_nsei(struct gbproxy_config *cfg, uint16_t nsei, uint32_t flags); |
| 252 | struct gbproxy_nse *gbproxy_nse_by_nsei_or_new(struct gbproxy_config *cfg, uint16_t nsei, bool sgsn_facing); |
Daniel Willmann | 77493b1 | 2020-12-29 21:13:31 +0100 | [diff] [blame^] | 253 | struct gbproxy_nse *gbproxy_nse_by_tlli(struct gbproxy_config *cfg, uint32_t tlli); |
| 254 | |
| 255 | /* TLLI cache */ |
| 256 | void gbproxy_tlli_cache_update(struct gbproxy_nse *nse, uint32_t tlli); |
| 257 | void gbproxy_tlli_cache_remove(struct gbproxy_config *cfg, uint32_t tlli); |
| 258 | int gbproxy_tlli_cache_cleanup(struct gbproxy_config *cfg); |
Daniel Willmann | e50550e | 2020-11-26 18:19:21 +0100 | [diff] [blame] | 259 | |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 260 | /* SGSN handling */ |
Daniel Willmann | a648f3c | 2020-12-28 18:07:27 +0100 | [diff] [blame] | 261 | struct gbproxy_sgsn *gbproxy_sgsn_alloc(struct gbproxy_config *cfg, uint16_t nsei, const char *name); |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 262 | void gbproxy_sgsn_free(struct gbproxy_sgsn *sgsn); |
Daniel Willmann | a648f3c | 2020-12-28 18:07:27 +0100 | [diff] [blame] | 263 | struct gbproxy_sgsn *gbproxy_sgsn_by_name(struct gbproxy_config *cfg, const char *name); |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 264 | struct gbproxy_sgsn *gbproxy_sgsn_by_nsei(struct gbproxy_config *cfg, uint16_t nsei); |
| 265 | struct gbproxy_sgsn *gbproxy_sgsn_by_nsei_or_new(struct gbproxy_config *cfg, uint16_t nsei); |
| 266 | struct gbproxy_sgsn *gbproxy_sgsn_by_nri(struct gbproxy_config *cfg, uint16_t nri, bool *null_nri); |
Daniel Willmann | d4ab1f9 | 2020-12-21 18:53:55 +0100 | [diff] [blame] | 267 | struct gbproxy_sgsn *gbproxy_sgsn_by_tlli(struct gbproxy_config *cfg, struct gbproxy_sgsn *sgsn_avoid, |
| 268 | uint32_t tlli); |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 269 | |
Neels Hofmeyr | 4b4c586 | 2017-09-04 15:13:25 +0200 | [diff] [blame] | 270 | #endif |