Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 1 | /*! \file gprs_ns2_internal.h */ |
| 2 | |
| 3 | #pragma once |
| 4 | |
| 5 | #include <stdbool.h> |
| 6 | #include <stdint.h> |
| 7 | |
| 8 | #include <osmocom/gprs/protocol/gsm_08_16.h> |
| 9 | #include <osmocom/gprs/gprs_ns2.h> |
| 10 | |
Harald Welte | f294974 | 2021-01-20 14:54:14 +0100 | [diff] [blame] | 11 | #define LOGNSE(nse, lvl, fmt, args ...) \ |
| 12 | LOGP(DLNS, lvl, "NSE(%05u) " fmt, (nse)->nsei, ## args) |
| 13 | |
| 14 | #define LOGBIND(bind, lvl, fmt, args ...) \ |
| 15 | LOGP(DLNS, lvl, "BIND(%s) " fmt, (bind)->name, ## args) |
| 16 | |
| 17 | |
| 18 | #define LOGNSVC(nsvc, lvl, fmt, args ...) \ |
| 19 | do { \ |
| 20 | if ((nsvc)->nsvci_is_valid) { \ |
| 21 | LOGP(DLNS, lvl, "NSE(%05u)-NSVC(%05u) " fmt, \ |
| 22 | (nsvc)->nse->nsei, (nsvc)->nsvci, ## args); \ |
| 23 | } else { \ |
| 24 | LOGP(DLNS, lvl, "NSE(%05u)-NSVC(none) " fmt, \ |
| 25 | (nsvc)->nse->nsei, ## args); \ |
| 26 | } \ |
| 27 | } while (0) |
| 28 | |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 29 | struct osmo_fsm_inst; |
| 30 | struct tlv_parsed; |
| 31 | struct vty; |
| 32 | |
| 33 | struct gprs_ns2_vc_driver; |
| 34 | struct gprs_ns2_vc_bind; |
| 35 | |
Alexander Couzens | 90ee963 | 2020-12-07 06:18:32 +0100 | [diff] [blame] | 36 | #define NS_TIMERS_COUNT 10 |
Harald Welte | 3a44d17 | 2020-12-16 12:02:51 +0100 | [diff] [blame] | 37 | #define NS_TIMERS "(tns-block|tns-block-retries|tns-reset|tns-reset-retries|tns-test|tns-alive|tns-alive-retries|tsns-prov|tsns-size-retries|tsns-config-retries)" |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 38 | #define NS_TIMERS_HELP \ |
| 39 | "(un)blocking Timer (Tns-block) timeout\n" \ |
| 40 | "(un)blocking Timer (Tns-block) number of retries\n" \ |
| 41 | "Reset Timer (Tns-reset) timeout\n" \ |
| 42 | "Reset Timer (Tns-reset) number of retries\n" \ |
| 43 | "Test Timer (Tns-test) timeout\n" \ |
| 44 | "Alive Timer (Tns-alive) timeout\n" \ |
| 45 | "Alive Timer (Tns-alive) number of retries\n" \ |
Alexander Couzens | 90ee963 | 2020-12-07 06:18:32 +0100 | [diff] [blame] | 46 | "SNS Provision Timer (Tsns-prov) timeout\n" \ |
| 47 | "SNS Size number of retries\n" \ |
| 48 | "SNS Config number of retries\n" \ |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 49 | |
| 50 | /* Educated guess - LLC user payload is 1500 bytes plus possible headers */ |
| 51 | #define NS_ALLOC_SIZE 3072 |
| 52 | #define NS_ALLOC_HEADROOM 20 |
| 53 | |
| 54 | enum ns2_timeout { |
| 55 | NS_TOUT_TNS_BLOCK, |
| 56 | NS_TOUT_TNS_BLOCK_RETRIES, |
| 57 | NS_TOUT_TNS_RESET, |
| 58 | NS_TOUT_TNS_RESET_RETRIES, |
| 59 | NS_TOUT_TNS_TEST, |
| 60 | NS_TOUT_TNS_ALIVE, |
| 61 | NS_TOUT_TNS_ALIVE_RETRIES, |
| 62 | NS_TOUT_TSNS_PROV, |
Alexander Couzens | 90ee963 | 2020-12-07 06:18:32 +0100 | [diff] [blame] | 63 | NS_TOUT_TSNS_SIZE_RETRIES, |
| 64 | NS_TOUT_TSNS_CONFIG_RETRIES, |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 65 | }; |
| 66 | |
| 67 | enum nsvc_timer_mode { |
| 68 | /* standard timers */ |
| 69 | NSVC_TIMER_TNS_TEST, |
| 70 | NSVC_TIMER_TNS_ALIVE, |
| 71 | NSVC_TIMER_TNS_RESET, |
| 72 | _NSVC_TIMER_NR, |
| 73 | }; |
| 74 | |
| 75 | enum ns_stat { |
| 76 | NS_STAT_ALIVE_DELAY, |
| 77 | }; |
| 78 | |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 79 | /*! Osmocom NS2 VC create status */ |
| 80 | enum gprs_ns2_cs { |
| 81 | GPRS_NS2_CS_CREATED, /*!< A NSVC object has been created */ |
| 82 | GPRS_NS2_CS_FOUND, /*!< A NSVC object has been found */ |
| 83 | GPRS_NS2_CS_REJECTED, /*!< Rejected and answered message */ |
| 84 | GPRS_NS2_CS_SKIPPED, /*!< Skipped message */ |
| 85 | GPRS_NS2_CS_ERROR, /*!< Failed to process message */ |
| 86 | }; |
| 87 | |
| 88 | |
| 89 | #define NSE_S_BLOCKED 0x0001 |
| 90 | #define NSE_S_ALIVE 0x0002 |
| 91 | #define NSE_S_RESET 0x0004 |
| 92 | |
| 93 | #define NS_DESC_B(st) ((st) & NSE_S_BLOCKED ? "BLOCKED" : "UNBLOCKED") |
| 94 | #define NS_DESC_A(st) ((st) & NSE_S_ALIVE ? "ALIVE" : "DEAD") |
| 95 | #define NS_DESC_R(st) ((st) & NSE_S_RESET ? "RESET" : "UNRESET") |
| 96 | |
| 97 | /*! An instance of the NS protocol stack */ |
| 98 | struct gprs_ns2_inst { |
| 99 | /*! callback to the user for incoming UNIT DATA IND */ |
| 100 | osmo_prim_cb cb; |
| 101 | |
| 102 | /*! callback data */ |
| 103 | void *cb_data; |
| 104 | |
| 105 | /*! linked lists of all NSVC binds (e.g. IPv4 bind, but could be also E1 */ |
| 106 | struct llist_head binding; |
| 107 | |
| 108 | /*! linked lists of all NSVC in this instance */ |
| 109 | struct llist_head nse; |
| 110 | |
| 111 | /*! create dynamic NSE on receiving packages */ |
| 112 | bool create_nse; |
| 113 | |
| 114 | uint16_t timeout[NS_TIMERS_COUNT]; |
| 115 | |
| 116 | /*! workaround for rate counter until rate counter accepts char str as index */ |
| 117 | uint32_t rate_ctr_idx; |
Harald Welte | 53a2fde | 2020-12-01 22:21:14 +0100 | [diff] [blame] | 118 | |
| 119 | /*! libmnl netlink socket for link state monitoring */ |
| 120 | struct osmo_mnl *linkmon_mnl; |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 121 | }; |
| 122 | |
Harald Welte | 53a2fde | 2020-12-01 22:21:14 +0100 | [diff] [blame] | 123 | |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 124 | /*! Structure repesenting a NSE. The BSS/PCU will only have a single NSE, while SGSN has one for each BSS/PCU */ |
| 125 | struct gprs_ns2_nse { |
| 126 | uint16_t nsei; |
| 127 | |
| 128 | /*! entry back to ns2_inst */ |
| 129 | struct gprs_ns2_inst *nsi; |
| 130 | |
| 131 | /*! llist entry for gprs_ns2_inst */ |
| 132 | struct llist_head list; |
| 133 | |
| 134 | /*! llist head to hold all nsvc */ |
| 135 | struct llist_head nsvc; |
| 136 | |
Alexander Couzens | 8a2a1a4 | 2020-12-26 18:00:17 +0100 | [diff] [blame] | 137 | /*! count all active NSVCs */ |
| 138 | int nsvc_count; |
Alexander Couzens | fc3dd1f | 2020-11-19 00:41:47 +0100 | [diff] [blame] | 139 | |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 140 | /*! true if this NSE was created by VTY or pcu socket) */ |
| 141 | bool persistent; |
| 142 | |
Alexander Couzens | da0a285 | 2020-10-01 23:24:07 +0200 | [diff] [blame] | 143 | /*! true if this NSE wasn't yet alive at all. |
| 144 | * Will be true after the first status ind with NS_AFF_CAUSE_RECOVERY */ |
| 145 | bool first; |
| 146 | |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 147 | /*! true if this NSE has at least one alive VC */ |
| 148 | bool alive; |
| 149 | |
Alexander Couzens | aac9016 | 2020-11-19 02:44:04 +0100 | [diff] [blame] | 150 | /*! which link-layer are we based on? */ |
| 151 | enum gprs_ns2_ll ll; |
| 152 | |
Alexander Couzens | d923cff | 2020-12-01 01:03:52 +0100 | [diff] [blame] | 153 | /*! which dialect does this NSE speaks? */ |
| 154 | enum gprs_ns2_dialect dialect; |
| 155 | |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 156 | struct osmo_fsm_inst *bss_sns_fi; |
Harald Welte | 3221f87 | 2021-01-18 14:58:51 +0100 | [diff] [blame] | 157 | |
| 158 | /*! sum of all the data weight of _active_ NS-VCs */ |
| 159 | uint32_t sum_data_weight; |
| 160 | |
| 161 | /*! sum of all the signalling weight of _active_ NS-VCs */ |
| 162 | uint32_t sum_sig_weight; |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 163 | }; |
| 164 | |
| 165 | /*! Structure representing a single NS-VC */ |
| 166 | struct gprs_ns2_vc { |
| 167 | /*! list of NS-VCs within NSE */ |
| 168 | struct llist_head list; |
| 169 | |
| 170 | /*! list of NS-VCs within bind, bind is the owner! */ |
| 171 | struct llist_head blist; |
| 172 | |
| 173 | /*! pointer to NS Instance */ |
| 174 | struct gprs_ns2_nse *nse; |
| 175 | |
| 176 | /*! pointer to NS VL bind. bind own the memory of this instance */ |
| 177 | struct gprs_ns2_vc_bind *bind; |
| 178 | |
| 179 | /*! true if this NS was created by VTY or pcu socket) */ |
| 180 | bool persistent; |
| 181 | |
| 182 | /*! uniquely identifies NS-VC if VC contains nsvci */ |
| 183 | uint16_t nsvci; |
| 184 | |
| 185 | /*! signalling weight. 0 = don't use for signalling (BVCI == 0)*/ |
| 186 | uint8_t sig_weight; |
| 187 | |
Alexander Couzens | fc3dd1f | 2020-11-19 00:41:47 +0100 | [diff] [blame] | 188 | /*! signalling packet counter for the load sharing function */ |
| 189 | uint8_t sig_counter; |
| 190 | |
| 191 | /*! data weight. 0 = don't use for user data (BVCI != 0) */ |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 192 | uint8_t data_weight; |
| 193 | |
| 194 | /*! can be used by the bind/driver of the virtual circuit. e.g. ipv4/ipv6/frgre/e1 */ |
| 195 | void *priv; |
| 196 | |
| 197 | bool nsvci_is_valid; |
| 198 | bool sns_only; |
| 199 | |
| 200 | struct rate_ctr_group *ctrg; |
| 201 | struct osmo_stat_item_group *statg; |
| 202 | |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 203 | enum gprs_ns2_vc_mode mode; |
| 204 | |
| 205 | struct osmo_fsm_inst *fi; |
| 206 | }; |
| 207 | |
| 208 | /*! Structure repesenting a bind instance. E.g. IPv4 listen port. */ |
| 209 | struct gprs_ns2_vc_bind { |
Alexander Couzens | aaa55a6 | 2020-12-03 06:02:03 +0100 | [diff] [blame] | 210 | /*! unique name */ |
| 211 | const char *name; |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 212 | /*! list entry in nsi */ |
| 213 | struct llist_head list; |
| 214 | /*! list of all VC */ |
| 215 | struct llist_head nsvc; |
| 216 | /*! driver private structure */ |
| 217 | void *priv; |
| 218 | /*! a pointer back to the nsi */ |
| 219 | struct gprs_ns2_inst *nsi; |
| 220 | struct gprs_ns2_vc_driver *driver; |
| 221 | |
Alexander Couzens | d923cff | 2020-12-01 01:03:52 +0100 | [diff] [blame] | 222 | bool accept_ipaccess; |
| 223 | bool accept_sns; |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 224 | |
Alexander Couzens | 1c8785d | 2020-12-17 06:58:53 +0100 | [diff] [blame] | 225 | /*! transfer capability in mbit */ |
| 226 | int transfer_capability; |
| 227 | |
Alexander Couzens | aac9016 | 2020-11-19 02:44:04 +0100 | [diff] [blame] | 228 | /*! which link-layer are we based on? */ |
| 229 | enum gprs_ns2_ll ll; |
| 230 | |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 231 | /*! send a msg over a VC */ |
| 232 | int (*send_vc)(struct gprs_ns2_vc *nsvc, struct msgb *msg); |
| 233 | |
| 234 | /*! free the vc priv data */ |
| 235 | void (*free_vc)(struct gprs_ns2_vc *nsvc); |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 236 | |
Alexander Couzens | 22f3471 | 2020-10-02 02:34:39 +0200 | [diff] [blame] | 237 | /*! allow to show information for the vty */ |
| 238 | void (*dump_vty)(const struct gprs_ns2_vc_bind *bind, |
| 239 | struct vty *vty, bool stats); |
| 240 | }; |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 241 | |
| 242 | struct gprs_ns2_vc_driver { |
| 243 | const char *name; |
| 244 | void *priv; |
| 245 | void (*free_bind)(struct gprs_ns2_vc_bind *driver); |
| 246 | }; |
| 247 | |
| 248 | enum gprs_ns2_cs ns2_create_vc(struct gprs_ns2_vc_bind *bind, |
| 249 | struct msgb *msg, |
| 250 | const char *logname, |
| 251 | struct msgb **reject, |
| 252 | struct gprs_ns2_vc **success); |
| 253 | |
Alexander Couzens | ffd49d0 | 2020-09-24 00:47:17 +0200 | [diff] [blame] | 254 | int ns2_recv_vc(struct gprs_ns2_vc *nsvc, |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 255 | struct msgb *msg); |
| 256 | |
| 257 | struct gprs_ns2_vc *ns2_vc_alloc(struct gprs_ns2_vc_bind *bind, |
| 258 | struct gprs_ns2_nse *nse, |
Alexander Couzens | d923cff | 2020-12-01 01:03:52 +0100 | [diff] [blame] | 259 | bool initiater, |
Harald Welte | 603f404 | 2020-11-29 17:39:19 +0100 | [diff] [blame] | 260 | enum gprs_ns2_vc_mode vc_mode, |
| 261 | const char *id); |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 262 | |
| 263 | struct msgb *gprs_ns2_msgb_alloc(void); |
| 264 | |
Alexander Couzens | 412bc34 | 2020-11-19 05:24:37 +0100 | [diff] [blame] | 265 | void gprs_ns2_sns_write_vty(struct vty *vty, const struct gprs_ns2_nse *nse); |
Harald Welte | 1262c4f | 2021-01-19 20:58:33 +0100 | [diff] [blame] | 266 | void gprs_ns2_sns_dump_vty(struct vty *vty, const char *prefix, const struct gprs_ns2_nse *nse, bool stats); |
Alexander Couzens | bf95f0f | 2020-10-01 22:56:03 +0200 | [diff] [blame] | 267 | void ns2_prim_status_ind(struct gprs_ns2_nse *nse, |
Daniel Willmann | 15c09a8 | 2020-11-03 23:05:43 +0100 | [diff] [blame] | 268 | struct gprs_ns2_vc *nsvc, |
Alexander Couzens | bf95f0f | 2020-10-01 22:56:03 +0200 | [diff] [blame] | 269 | uint16_t bvci, |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 270 | enum gprs_ns2_affecting_cause cause); |
| 271 | void ns2_nse_notify_alive(struct gprs_ns2_vc *nsvc, bool alive); |
| 272 | |
| 273 | /* message */ |
| 274 | int gprs_ns2_validate(struct gprs_ns2_vc *nsvc, |
| 275 | uint8_t pdu_type, |
| 276 | struct msgb *msg, |
| 277 | struct tlv_parsed *tp, |
| 278 | uint8_t *cause); |
| 279 | |
| 280 | /* SNS messages */ |
| 281 | int ns2_tx_sns_ack(struct gprs_ns2_vc *nsvc, uint8_t trans_id, uint8_t *cause, |
| 282 | const struct gprs_ns_ie_ip4_elem *ip4_elems, |
| 283 | unsigned int num_ip4_elems, |
| 284 | const struct gprs_ns_ie_ip6_elem *ip6_elems, |
| 285 | unsigned int num_ip6_elems); |
| 286 | int ns2_tx_sns_config(struct gprs_ns2_vc *nsvc, bool end_flag, |
| 287 | const struct gprs_ns_ie_ip4_elem *ip4_elems, |
| 288 | unsigned int num_ip4_elems, |
| 289 | const struct gprs_ns_ie_ip6_elem *ip6_elems, |
| 290 | unsigned int num_ip6_elems); |
| 291 | int ns2_tx_sns_config_ack(struct gprs_ns2_vc *nsvc, uint8_t *cause); |
| 292 | int ns2_tx_sns_size(struct gprs_ns2_vc *nsvc, bool reset_flag, uint16_t max_nr_nsvc, |
| 293 | int ip4_ep_nr, int ip6_ep_nr); |
| 294 | int ns2_tx_sns_size_ack(struct gprs_ns2_vc *nsvc, uint8_t *cause); |
| 295 | |
| 296 | /* transmit message over a VC */ |
| 297 | int ns2_tx_block(struct gprs_ns2_vc *nsvc, uint8_t cause); |
| 298 | int ns2_tx_block_ack(struct gprs_ns2_vc *nsvc); |
| 299 | |
| 300 | int ns2_tx_reset(struct gprs_ns2_vc *nsvc, uint8_t cause); |
| 301 | int ns2_tx_reset_ack(struct gprs_ns2_vc *nsvc); |
| 302 | |
| 303 | int ns2_tx_unblock(struct gprs_ns2_vc *nsvc); |
| 304 | int ns2_tx_unblock_ack(struct gprs_ns2_vc *nsvc); |
| 305 | |
| 306 | int ns2_tx_alive(struct gprs_ns2_vc *nsvc); |
| 307 | int ns2_tx_alive_ack(struct gprs_ns2_vc *nsvc); |
| 308 | |
| 309 | int ns2_tx_unit_data(struct gprs_ns2_vc *nsvc, |
| 310 | uint16_t bvci, uint8_t sducontrol, |
| 311 | struct msgb *msg); |
| 312 | |
| 313 | int ns2_tx_status(struct gprs_ns2_vc *nsvc, uint8_t cause, |
| 314 | uint16_t bvci, struct msgb *orig_msg); |
| 315 | |
| 316 | /* driver */ |
| 317 | struct gprs_ns2_vc *gprs_ns2_ip_bind_connect(struct gprs_ns2_vc_bind *bind, |
| 318 | struct gprs_ns2_nse *nse, |
Vadim Yanitskiy | a07f25e | 2020-10-09 21:47:01 +0700 | [diff] [blame] | 319 | const struct osmo_sockaddr *remote); |
Alexander Couzens | e769f52 | 2020-12-07 07:37:07 +0100 | [diff] [blame] | 320 | int ns2_ip_count_bind(struct gprs_ns2_inst *nsi, struct osmo_sockaddr *remote); |
| 321 | struct gprs_ns2_vc_bind *ns2_ip_get_bind_by_index(struct gprs_ns2_inst *nsi, |
| 322 | struct osmo_sockaddr *remote, |
| 323 | int index); |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 324 | |
| 325 | /* sns */ |
| 326 | int gprs_ns2_sns_rx(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp); |
| 327 | struct osmo_fsm_inst *ns2_sns_bss_fsm_alloc(struct gprs_ns2_nse *nse, |
| 328 | const char *id); |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 329 | void ns2_sns_free_nsvc(struct gprs_ns2_vc *nsvc); |
| 330 | |
| 331 | /* vc */ |
| 332 | struct osmo_fsm_inst *gprs_ns2_vc_fsm_alloc(struct gprs_ns2_vc *nsvc, |
| 333 | const char *id, bool initiate); |
| 334 | int gprs_ns2_vc_fsm_start(struct gprs_ns2_vc *nsvc); |
Daniel Willmann | ed0c982 | 2020-11-18 14:08:07 +0100 | [diff] [blame] | 335 | int gprs_ns2_vc_force_unconfigured(struct gprs_ns2_vc *nsvc); |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 336 | int gprs_ns2_vc_rx(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp); |
| 337 | int gprs_ns2_vc_is_alive(struct gprs_ns2_vc *nsvc); |
| 338 | int gprs_ns2_vc_is_unblocked(struct gprs_ns2_vc *nsvc); |
Alexander Couzens | 47afc42 | 2021-01-17 20:12:46 +0100 | [diff] [blame] | 339 | int ns2_vc_block(struct gprs_ns2_vc *nsvc); |
| 340 | int ns2_vc_unblock(struct gprs_ns2_vc *nsvc); |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 341 | |
Alexander Couzens | 6a16149 | 2020-07-12 13:45:50 +0200 | [diff] [blame] | 342 | /* nse */ |
| 343 | void ns2_nse_notify_unblocked(struct gprs_ns2_vc *nsvc, bool unblocked); |
Alexander Couzens | d923cff | 2020-12-01 01:03:52 +0100 | [diff] [blame] | 344 | enum gprs_ns2_vc_mode gprs_ns2_dialect_to_vc_mode(enum gprs_ns2_dialect dialect); |
Alexander Couzens | 1c8785d | 2020-12-17 06:58:53 +0100 | [diff] [blame] | 345 | int ns2_count_transfer_cap(struct gprs_ns2_nse *nse, |
| 346 | uint16_t bvci); |