aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns2_internal.h
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-12-01 01:03:52 +0100
committerlynxis lazus <lynxis@fe80.eu>2020-12-15 11:46:45 +0000
commitd923cff170904e4d22ef00dd410b0d6256f95068 (patch)
tree8da2620ac71558b45409587c6f6359343ccdfc8f /src/gb/gprs_ns2_internal.h
parentc8158ecfc40e29a2b6b9f328aafb2dad0007def2 (diff)
gprs_ns2: introduce NS dialects
A NS dialect describes how the NS Entity interacts with different virtual circuits. E.g. ipaccess use reset/block on udp and is a dynamic connection. A single NS Entity can only support one dialect. This can be later used to protect a NS Entity against dynamic NS virtual circuits of a different type. It further allows a bind to support multiple dialects at the same time. Change-Id: Ia118bb6f994845d84db09de7a94856f5ca573404
Diffstat (limited to 'src/gb/gprs_ns2_internal.h')
-rw-r--r--src/gb/gprs_ns2_internal.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h
index e72deff1..8c0c1354 100644
--- a/src/gb/gprs_ns2_internal.h
+++ b/src/gb/gprs_ns2_internal.h
@@ -130,6 +130,9 @@ struct gprs_ns2_nse {
/*! which link-layer are we based on? */
enum gprs_ns2_ll ll;
+ /*! which dialect does this NSE speaks? */
+ enum gprs_ns2_dialect dialect;
+
struct osmo_fsm_inst *bss_sns_fi;
};
@@ -188,8 +191,8 @@ struct gprs_ns2_vc_bind {
struct gprs_ns2_inst *nsi;
struct gprs_ns2_vc_driver *driver;
- /*! if VCs use reset/block/unblock method. IP shall not use this */
- enum gprs_ns2_vc_mode vc_mode;
+ bool accept_ipaccess;
+ bool accept_sns;
/*! which link-layer are we based on? */
enum gprs_ns2_ll ll;
@@ -222,7 +225,8 @@ int ns2_recv_vc(struct gprs_ns2_vc *nsvc,
struct gprs_ns2_vc *ns2_vc_alloc(struct gprs_ns2_vc_bind *bind,
struct gprs_ns2_nse *nse,
- bool initiater);
+ bool initiater,
+ enum gprs_ns2_vc_mode vc_mode);
struct msgb *gprs_ns2_msgb_alloc(void);
@@ -298,8 +302,6 @@ int gprs_ns2_vc_rx(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed
int gprs_ns2_vc_is_alive(struct gprs_ns2_vc *nsvc);
int gprs_ns2_vc_is_unblocked(struct gprs_ns2_vc *nsvc);
-/* vty.c */
-void ns2_vty_bind_apply(struct gprs_ns2_vc_bind *bind);
-
/* nse */
void ns2_nse_notify_unblocked(struct gprs_ns2_vc *nsvc, bool unblocked);
+enum gprs_ns2_vc_mode gprs_ns2_dialect_to_vc_mode(enum gprs_ns2_dialect dialect);