lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

January 2024

  • 1 participants
  • 1559 discussions
[S] Change in osmo-upf[master]: manual: explain IP forwarding
by neels 24 Jan '24

24 Jan '24
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/35668?usp=email ) Change subject: manual: explain IP forwarding ...................................................................... Patch Set 1: (1 comment) File doc/manuals/chapters/running.adoc: https://gerrit.osmocom.org/c/osmo-upf/+/35668/comment/3034821b_1b92a649 PS1, Line 259: and to two specific network interfaces eth0 and eth23. but where to put this configuration?? -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/35668?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I7b54f9203c1a77efd43f90b9a1c0105bc5c3efde Gerrit-Change-Number: 35668 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Wed, 24 Jan 2024 02:55:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-upf[master]: manual: explain IP forwarding
by neels 24 Jan '24

24 Jan '24
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/35668?usp=email ) Change subject: manual: explain IP forwarding ...................................................................... Patch Set 1: Code-Review-1 (1 comment) Patchset: PS1: the IP Forwarding netfilter rules are not tested -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/35668?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I7b54f9203c1a77efd43f90b9a1c0105bc5c3efde Gerrit-Change-Number: 35668 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Wed, 24 Jan 2024 02:54:37 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-upf[master]: manual: fix typo in running.adoc
by neels 24 Jan '24

24 Jan '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/35664?usp=email ) Change subject: manual: fix typo in running.adoc ...................................................................... manual: fix typo in running.adoc Change-Id: Ibb1b548f588b27b23af687e5c44d18e81bca7c87 --- M doc/manuals/chapters/running.adoc 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/64/35664/1 diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index 0f56521..5c0a7b4 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -177,4 +177,4 @@ ---- When running more than one osmo-upf process on a system, pick distinct table -names to avoid name collisions in the nftables reulesets. +names to avoid name collisions in the nftables rulesets. -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/35664?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ibb1b548f588b27b23af687e5c44d18e81bca7c87 Gerrit-Change-Number: 35664 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-upf[master]: manual: 'Running': flatten section depths a bit
by neels 24 Jan '24

24 Jan '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/35665?usp=email ) Change subject: manual: 'Running': flatten section depths a bit ...................................................................... manual: 'Running': flatten section depths a bit I'd like to add more sub-levels in an upcoming commit, and the levels are becoming too many. So let's get rid of one depth level in the 'Running osmo-upf' chapter. Change-Id: I0bd43300aa4b45315ea58ab35c77da005d1a4fa4 --- M doc/manuals/chapters/running.adoc 1 file changed, 17 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/65/35665/1 diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index 5c0a7b4..683c444 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -59,9 +59,7 @@ table-name osmo-upf-2 ---- -=== Configuring Primary Links - -==== Configure PFCP Server +=== Configure PFCP Server The following example configures OsmoUPF to listen for PFCP association requests from Control Plane Function entities on local interface 10.9.8.7, port 8805: @@ -83,7 +81,7 @@ must not be "0.0.0.0", which is an unfortunate consequence. This is likely to improve in the future, see https://osmocom.org/issues/5682 . -==== Configure Linux Kernel GTP Features +=== Linux Kernel Features OsmoUPF uses two distinct Linux kernel features: @@ -103,7 +101,7 @@ forwarding proxy, without encapsulation/decapsulation of GTP payloads. [[gtp_module]] -===== Configure Linux Kernel GTP Module for `tunend` +=== Configure Linux Kernel GTP Module for `tunend` The Linux kernel GTP module is used for the `tunend` use case, i.e. GTP encapsulation/decapsulation from/to "the internet". @@ -160,7 +158,7 @@ this GTP device. When using ANY, there should be exactly one GTP dev configured. [[nftables]] -===== Configure Linux netfilter for `tunmap` +=== Configure Linux netfilter for `tunmap` The Linux kernel netfilter module is used for GTP tunnel proxying, also known as tunnel forwarding or tunnel mapping. -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/35665?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I0bd43300aa4b45315ea58ab35c77da005d1a4fa4 Gerrit-Change-Number: 35665 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-upf[master]: manual: 'Running': tweak, mention 'tunmap' and 'tunend'
by neels 24 Jan '24

24 Jan '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/35666?usp=email ) Change subject: manual: 'Running': tweak, mention 'tunmap' and 'tunend' ...................................................................... manual: 'Running': tweak, mention 'tunmap' and 'tunend' Change-Id: I9760ca214933d0b05080a3e70807b0cd06380a27 --- M doc/manuals/chapters/running.adoc 1 file changed, 17 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/66/35666/1 diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index 683c444..32db271 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -85,10 +85,10 @@ OsmoUPF uses two distinct Linux kernel features: -* The GTP module is used for GTP encapsulation/decapsulation from/to +* The GTP module is used for `tunend`: GTP encapsulation/decapsulation from/to "the internet". -* The netfilter module is used for GTP tunnel proxying, also known as +* The netfilter module is used for `tunmap`: GTP tunnel proxying, also known as tunnel forwarding or tunnel mapping. .Linux kernel feature usage @@ -97,8 +97,12 @@ include::upf_gtp_roles.dot[] ---- -GTP kernel module configuration can be omitted for sites that serve only as GTP -forwarding proxy, without encapsulation/decapsulation of GTP payloads. +GTP kernel module configuration in the `tunend` section can be omitted for sites +that serve only as GTP forwarding proxy, without encapsulation/decapsulation of +GTP payloads. + +Likewise, netfilter configuration in the `tunmap` section can be omitted for +sites only serving as GTP tunnel endpoint. [[gtp_module]] === Configure Linux Kernel GTP Module for `tunend` -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/35666?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I9760ca214933d0b05080a3e70807b0cd06380a27 Gerrit-Change-Number: 35666 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-upf[master]: manual: explain IP forwarding
by neels 24 Jan '24

24 Jan '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/35668?usp=email ) Change subject: manual: explain IP forwarding ...................................................................... manual: explain IP forwarding Change-Id: I7b54f9203c1a77efd43f90b9a1c0105bc5c3efde --- M doc/manuals/chapters/running.adoc 1 file changed, 47 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/68/35668/1 diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index d1a399b..ee66970 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -167,7 +167,7 @@ The Linux kernel netfilter module is used for GTP tunnel proxying, also known as tunnel forwarding or tunnel mapping. -When using the netfilter module, you may set up `osmo-upf.cfg` for: +When using the netfilter module, you should configure: - GTP Echo (required) - netfilter table name (optional) @@ -220,3 +220,40 @@ When running more than one osmo-upf process on a system, pick distinct table names to avoid name collisions in the nftables rulesets. + +=== IP Forwarding + +In order to allow the forwarding GTP payloads, the Linux operating system must +be configured to allow IP forwarding. There are several options: + +To allow IP forwarding from and to all interfaces globally in a reboot-safe way, +you may put a line like this in /etc/sysctl.conf: + +---- +net.ipv4.ip_forward=1 +---- + +To do the same in an ad-hoc way that is not reboot safe but takes effect +immediately: + +---- +sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" +---- + +The above options may be too permissive for your production environment. It is +possible to instruct netfilter to allow IP forwarding for specific interfaces +only, with a configuration like this: + +---- +define gtp_netdevs = { eth0, eth23 }; + +table inet filter { + chain forward { + type filter hook forward priority filter; policy drop; + iifname $gtp_netdevs oifname $gtp_netdevs udp dport 2152 accept + } +} +---- + +This netfilter ruleset allows IP forwarding, but limited to the GTP-U port 2152, +and to two specific network interfaces eth0 and eth23. -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/35668?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I7b54f9203c1a77efd43f90b9a1c0105bc5c3efde Gerrit-Change-Number: 35668 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-upf[master]: manual: explain GTP Echo workaround for tunmap
by neels 24 Jan '24

24 Jan '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/35667?usp=email ) Change subject: manual: explain GTP Echo workaround for tunmap ...................................................................... manual: explain GTP Echo workaround for tunmap Change-Id: Ic824fc876d1fad181254cb6894e51464c443b53c --- M doc/manuals/chapters/running.adoc 1 file changed, 56 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/67/35667/1 diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index 32db271..d1a399b 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -99,10 +99,10 @@ GTP kernel module configuration in the `tunend` section can be omitted for sites that serve only as GTP forwarding proxy, without encapsulation/decapsulation of -GTP payloads. +GTP payloads -- except to provide GTP Echo service, see <<gtp_echo>>. -Likewise, netfilter configuration in the `tunmap` section can be omitted for -sites only serving as GTP tunnel endpoint. +Netfilter configuration in the `tunmap` section can be omitted for sites only +serving as GTP tunnel endpoint. [[gtp_module]] === Configure Linux Kernel GTP Module for `tunend` @@ -167,11 +167,51 @@ The Linux kernel netfilter module is used for GTP tunnel proxying, also known as tunnel forwarding or tunnel mapping. -Using the netfilter module usually requires no configuration in `osmo-upf.cfg`. +When using the netfilter module, you may set up `osmo-upf.cfg` for: +- GTP Echo (required) +- netfilter table name (optional) -`osmo-upf` creates a new netfilter table, under which it submits rule sets for -GTP tunnel proxying. This table name defaults to `osmo-upf`. A custom table name -can be configured in `osmo-upf.cfg` like this: +[[gtp_echo]] +==== GTP Echo + +Each GTP peer should respond directly to GTP Echo requests. +- A GTP device configured for `tunend` implicitly includes a GTP Echo service. +- For `tunmap`, no GTP Echo mechanism is implemented. + +So, when your use case is `tunmap`, you should still add a GTP device as for +`tunend`, only to provide the GTP Echo service. There are some options: + +If you have no GTP devices configured in `osmo-upf.cfg` yet, you can add a +single GTP device without a specific IP address, in order to respond to GTP-U +Echo requests on all interfaces to anyone that is asking: + +---- +tunend + dev create gtp-echo +---- + +This will bind osmo-upf on 0.0.0.0:2152 to respond to GTP Echo requests. + +If you would like to limit GTP Echo responses to specific network interfaces, +you need to add a separate GTP device per local IP address: + +---- +tunend + dev create gtp-echo1 192.168.0.23 + dev create gtp-echo2 10.9.8.17 +---- + +This will bind osmo-upf only on 192.168.0.23:2152 and 10.9.8.17:2152 to respond +to GTP Echo requests. + +For creating and manipulating a GTP device in more versatile ways, see +<<gtp_module>>. + +==== netfilter Table Name + +For `tunmap`, `osmo-upf` creates a new netfilter table, under which it submits +rule sets for GTP tunnel proxying. This table name defaults to `osmo-upf`. A +custom table name can be configured in `osmo-upf.cfg` like this: ---- tunmap -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/35667?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ic824fc876d1fad181254cb6894e51464c443b53c Gerrit-Change-Number: 35667 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmocom-bb[master]: mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm
by fixeria 24 Jan '24

24 Jan '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35661?usp=email ) Change subject: mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm ...................................................................... mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm Change-Id: Iebc0692f17a5a5d04e57d74a720db52775937bdd Related: OS#4396 --- M src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/src/common/settings.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/vty_interface.c 4 files changed, 20 insertions(+), 33 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/61/35661/1 diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h index 3873611..ecebae8 100644 --- a/src/host/layer23/include/osmocom/bb/common/settings.h +++ b/src/host/layer23/include/osmocom/bb/common/settings.h @@ -6,6 +6,7 @@ #include <osmocom/core/utils.h> #include <osmocom/core/linuxlist.h> #include <osmocom/gsm/protocol/gsm_23_003.h> +#include <osmocom/gsm/protocol/gsm_04_08.h> #include <osmocom/gsm/gsm23003.h> #include <osmocom/gsm/gsm48.h> @@ -130,19 +131,11 @@ DATA_CALL_RATE_V110_14400, }; -/* Connection Element (transparency) */ -enum data_call_ce { - DATA_CALL_CE_TRANSP, - DATA_CALL_CE_TRANSP_PREF, - DATA_CALL_CE_NON_TRANSP, - DATA_CALL_CE_NON_TRANSP_PREF, -}; - /* Data (CSD) call parameters */ struct data_call_params { - enum data_call_type type; - enum data_call_rate rate; - enum data_call_ce ce; + enum data_call_type type; + enum data_call_rate rate; + enum gsm48_bcap_transp transp; }; struct gsm_settings { diff --git a/src/host/layer23/src/common/settings.c b/src/host/layer23/src/common/settings.c index 3fca52d..6ffb095 100644 --- a/src/host/layer23/src/common/settings.c +++ b/src/host/layer23/src/common/settings.c @@ -138,7 +138,7 @@ set->call_params.data = (struct data_call_params) { .type = DATA_CALL_TYPE_ISDN, .rate = DATA_CALL_RATE_V110_9600, - .ce = DATA_CALL_CE_TRANSP, + .transp = GSM48_BCAP_TR_TRANSP, }; return 0; diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c index c03eed5..4bdb845 100644 --- a/src/host/layer23/src/mobile/mnccms.c +++ b/src/host/layer23/src/mobile/mnccms.c @@ -218,7 +218,7 @@ .rate_adaption = GSM48_BCAP_RA_V110_X30, .sig_access = GSM48_BCAP_SA_I440_I450, .async = 1, - /* .transp is set below */ + .transp = cp->transp, .nr_data_bits = 8, .parity = GSM48_BCAP_PAR_NONE, .nr_stop_bits = 1, @@ -284,22 +284,6 @@ break; } - /* Connection element (octet 6c) */ - switch (cp->ce) { - case DATA_CALL_CE_TRANSP: - bcap->data.transp = GSM48_BCAP_TR_TRANSP; - break; - case DATA_CALL_CE_TRANSP_PREF: - bcap->data.transp = GSM48_BCAP_TR_TR_PREF; - break; - case DATA_CALL_CE_NON_TRANSP: - bcap->data.transp = GSM48_BCAP_TR_RLP; - break; - case DATA_CALL_CE_NON_TRANSP_PREF: - bcap->data.transp = GSM48_BCAP_TR_RLP_PREF; - break; - } - /* FAX calls are special (see 3GPP TS 24.008, Annex D.3) */ if (call_type == GSM_CALL_T_DATA_FAX) { bcap->data.rate_adaption = GSM48_BCAP_RA_NONE; diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 6293768..05a20e4 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -741,14 +741,14 @@ if (!strcmp(argv[1], "transparent")) { if (argc > 2) - cp->ce = DATA_CALL_CE_TRANSP_PREF; + cp->transp = GSM48_BCAP_TR_TR_PREF; else - cp->ce = DATA_CALL_CE_TRANSP; + cp->transp = GSM48_BCAP_TR_TRANSP; } else if (!strcmp(argv[1], "non-transparent")) { if (argc > 2) - cp->ce = DATA_CALL_CE_NON_TRANSP_PREF; + cp->transp = GSM48_BCAP_TR_RLP_PREF; else - cp->ce = DATA_CALL_CE_NON_TRANSP; + cp->transp = GSM48_BCAP_TR_RLP; } else { /* should not happen */ return CMD_WARNING; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35661?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iebc0692f17a5a5d04e57d74a720db52775937bdd Gerrit-Change-Number: 35661 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmocom-bb[master]: mobile: VTY: make soft-UART parameters configurable
by fixeria 24 Jan '24

24 Jan '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35662?usp=email ) Change subject: mobile: VTY: make soft-UART parameters configurable ...................................................................... mobile: VTY: make soft-UART parameters configurable Change-Id: I48bb58aaf1101fbc0e58db3fb1100927e506ede2 Related: OS#4396 --- M src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/src/common/settings.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/vty_interface.c 4 files changed, 156 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/62/35662/1 diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h index ecebae8..a1c9b3e 100644 --- a/src/host/layer23/include/osmocom/bb/common/settings.h +++ b/src/host/layer23/include/osmocom/bb/common/settings.h @@ -136,6 +136,12 @@ enum data_call_type type; enum data_call_rate rate; enum gsm48_bcap_transp transp; + + /* async call parameters */ + bool is_async; + unsigned int nr_stop_bits; + unsigned int nr_data_bits; + enum gsm48_bcap_parity parity; }; struct gsm_settings { diff --git a/src/host/layer23/src/common/settings.c b/src/host/layer23/src/common/settings.c index 6ffb095..bc5d115 100644 --- a/src/host/layer23/src/common/settings.c +++ b/src/host/layer23/src/common/settings.c @@ -139,6 +139,12 @@ .type = DATA_CALL_TYPE_ISDN, .rate = DATA_CALL_RATE_V110_9600, .transp = GSM48_BCAP_TR_TRANSP, + + /* async call parameters (8-N-1) */ + .is_async = true, + .nr_stop_bits = 1, + .nr_data_bits = 8, + .parity = GSM48_BCAP_PAR_NONE, }; return 0; diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c index 4bdb845..fa3b284 100644 --- a/src/host/layer23/src/mobile/mnccms.c +++ b/src/host/layer23/src/mobile/mnccms.c @@ -217,11 +217,11 @@ /* TODO: make these fields configurable via *set */ .rate_adaption = GSM48_BCAP_RA_V110_X30, .sig_access = GSM48_BCAP_SA_I440_I450, - .async = 1, + .async = cp->is_async, .transp = cp->transp, - .nr_data_bits = 8, - .parity = GSM48_BCAP_PAR_NONE, - .nr_stop_bits = 1, + .nr_data_bits = cp->nr_data_bits, + .nr_stop_bits = cp->nr_stop_bits, + .parity = cp->parity, /* .user_rate is set below */ /* .interm_rate is set below */ }, diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 05a20e4..4c2263a 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -756,6 +756,119 @@ return CMD_SUCCESS; } +DEFUN(call_params_data_sync_async, + call_params_data_sync_async_cmd, + CALL_PARAMS_DATA_CMD " (sync|async)", + CALL_PARAMS_DATA_CMD_DESC + "Synchronous connection (always used for FAX calls)\n" + "Asynchronous connection (does not apply to FAX calls)\n") +{ + struct osmocom_ms *ms; + struct gsm_settings *set; + struct data_call_params *cp; + + ms = l23_vty_get_ms(argv[0], vty); + if (!ms) + return CMD_WARNING; + set = &ms->settings; + cp = &set->call_params.data; + + cp->is_async = (argv[1][0] == 'a'); + + return CMD_SUCCESS; +} + +#define CALL_PARAMS_DATA_ASYNC_CMD \ + CALL_PARAMS_DATA_CMD " async" +#define CALL_PARAMS_DATA_ASYNC_CMD_DESC \ + CALL_PARAMS_DATA_CMD_DESC \ + "Asynchronous connection params (does not apply to FAX calls)\n" + +DEFUN(call_params_data_async_nr_stop_bits, + call_params_data_async_nr_stop_bits_cmd, + CALL_PARAMS_DATA_ASYNC_CMD " nr-stop-bits <1-2>", + CALL_PARAMS_DATA_ASYNC_CMD_DESC + "Number of stop bits (soft-UART config)\n" + "Number of stop bits (default: 1)\n") +{ + struct osmocom_ms *ms; + struct gsm_settings *set; + struct data_call_params *cp; + + ms = l23_vty_get_ms(argv[0], vty); + if (!ms) + return CMD_WARNING; + set = &ms->settings; + cp = &set->call_params.data; + + cp->nr_stop_bits = atoi(argv[1]); + + return CMD_SUCCESS; +} + +DEFUN(call_params_data_async_nr_data_bits, + call_params_data_async_nr_data_bits_cmd, + CALL_PARAMS_DATA_ASYNC_CMD " nr-data-bits <7-8>", + CALL_PARAMS_DATA_ASYNC_CMD_DESC + "Number of data bits (soft-UART config)\n" + "Number of data bits (default: 8)\n") +{ + struct osmocom_ms *ms; + struct gsm_settings *set; + struct data_call_params *cp; + + ms = l23_vty_get_ms(argv[0], vty); + if (!ms) + return CMD_WARNING; + set = &ms->settings; + cp = &set->call_params.data; + + cp->nr_data_bits = atoi(argv[1]); + + return CMD_SUCCESS; +} + +static const struct value_string async_parity_names[] = { + { GSM48_BCAP_PAR_NONE, "none" }, + { GSM48_BCAP_PAR_EVEN, "even" }, + { GSM48_BCAP_PAR_ODD, "odd" }, + { GSM48_BCAP_PAR_ONE, "mark" }, + { GSM48_BCAP_PAR_ZERO, "space" }, + { 0, NULL } +}; + +static const struct value_string async_parity_descs[] = { + { GSM48_BCAP_PAR_NONE, "No parity bit (default)" }, + { GSM48_BCAP_PAR_EVEN, "Even parity" }, + { GSM48_BCAP_PAR_ODD, "Odd parity" }, + { GSM48_BCAP_PAR_ONE, "Always 1" }, + { GSM48_BCAP_PAR_ZERO, "Always 0" }, + { 0, NULL } +}; + +DEFUN(call_params_data_async_parity, + call_params_data_async_parity_cmd, + CALL_PARAMS_DATA_ASYNC_CMD /* generated */, + CALL_PARAMS_DATA_ASYNC_CMD_DESC /* generated */) +{ + struct osmocom_ms *ms; + struct gsm_settings *set; + struct data_call_params *cp; + int val; + + ms = l23_vty_get_ms(argv[0], vty); + if (!ms) + return CMD_WARNING; + set = &ms->settings; + cp = &set->call_params.data; + + val = get_string_value(async_parity_names, argv[1]); + OSMO_ASSERT(val >= 0); /* should not happen */ + cp->parity = (enum gsm48_bcap_parity)val; + + return CMD_SUCCESS; +} + DEFUN(sms, sms_cmd, "sms MS_NAME NUMBER .LINE", "Send an SMS\nName of MS (see \"show ms\")\nPhone number to send SMS " "(Use digits '0123456789*#abc', and '+' to dial international)\n" @@ -2766,6 +2879,19 @@ { int rc; + call_params_data_async_parity_cmd.string = + vty_cmd_string_from_valstr(NULL, + async_parity_names, + CALL_PARAMS_DATA_ASYNC_CMD + " parity (", "|", ")", 0); + + call_params_data_async_parity_cmd.doc = + vty_cmd_string_from_valstr(NULL, + async_parity_descs, + CALL_PARAMS_DATA_ASYNC_CMD_DESC + "Parity mode (soft-UART config)\n", + "\n", "", 0); + if ((rc = l23_vty_init(config_write, l23_vty_signal_cb)) < 0) return rc; @@ -2792,6 +2918,10 @@ install_element(ENABLE_NODE, &call_params_data_type_cmd); install_element(ENABLE_NODE, &call_params_data_rate_cmd); install_element(ENABLE_NODE, &call_params_data_ce_cmd); + install_element(ENABLE_NODE, &call_params_data_sync_async_cmd); + install_element(ENABLE_NODE, &call_params_data_async_nr_stop_bits_cmd); + install_element(ENABLE_NODE, &call_params_data_async_nr_data_bits_cmd); + install_element(ENABLE_NODE, &call_params_data_async_parity_cmd); install_element(ENABLE_NODE, &sms_cmd); install_element(ENABLE_NODE, &service_cmd); install_element(ENABLE_NODE, &vgcs_enter_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35662?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I48bb58aaf1101fbc0e58db3fb1100927e506ede2 Gerrit-Change-Number: 35662 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in osmocom-bb[master]: mobile: VTY: rework data type/rate configuration commands
by fixeria 24 Jan '24

24 Jan '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35663?usp=email ) Change subject: mobile: VTY: rework data type/rate configuration commands ...................................................................... mobile: VTY: rework data type/rate configuration commands Change-Id: I7393fce82613a57275033f5c47e16bbf708a3bfb Related: OS#4396 --- M src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/src/common/settings.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/vty_interface.c 4 files changed, 207 insertions(+), 109 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/63/35663/1 diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h index a1c9b3e..1d3e53d 100644 --- a/src/host/layer23/include/osmocom/bb/common/settings.h +++ b/src/host/layer23/include/osmocom/bb/common/settings.h @@ -117,24 +117,58 @@ } locigprs; }; -enum data_call_type { - DATA_CALL_TYPE_ISDN, - DATA_CALL_TYPE_ANALOG, -}; - -enum data_call_rate { - DATA_CALL_RATE_V110_300, - DATA_CALL_RATE_V110_1200, - DATA_CALL_RATE_V110_2400, - DATA_CALL_RATE_V110_4800, - DATA_CALL_RATE_V110_9600, - DATA_CALL_RATE_V110_14400, +/* Data (CSD) call type and rate, values like in the '<speed>' part of 'AT+CBST'. + * See 3GPP TS 27.007, section 6.7 "Select bearer service type +CBST". */ +enum data_call_type_rate { + DATA_CALL_TR_AUTO = 0, + DATA_CALL_TR_V21_300 = 1, + DATA_CALL_TR_V22_1200 = 2, + DATA_CALL_TR_V23_1200_75 = 3, + DATA_CALL_TR_V22bis_2400 = 4, + DATA_CALL_TR_V26ter_2400 = 5, + DATA_CALL_TR_V32_4800 = 6, + DATA_CALL_TR_V32_9600 = 7, + DATA_CALL_TR_V34_9600 = 12, + DATA_CALL_TR_V34_14400 = 14, + DATA_CALL_TR_V34_19200 = 15, + DATA_CALL_TR_V34_28800 = 16, + DATA_CALL_TR_V34_33600 = 17, + DATA_CALL_TR_V120_1200 = 34, + DATA_CALL_TR_V120_2400 = 36, + DATA_CALL_TR_V120_4800 = 38, + DATA_CALL_TR_V120_9600 = 39, + DATA_CALL_TR_V120_14400 = 43, + DATA_CALL_TR_V120_19200 = 47, + DATA_CALL_TR_V120_28800 = 48, + DATA_CALL_TR_V120_38400 = 49, + DATA_CALL_TR_V120_48000 = 50, + DATA_CALL_TR_V120_56000 = 51, + DATA_CALL_TR_V110_300 = 65, + DATA_CALL_TR_V110_1200 = 66, + DATA_CALL_TR_V110_2400 = 68, + DATA_CALL_TR_V110_4800 = 70, + DATA_CALL_TR_V110_9600 = 71, + DATA_CALL_TR_V110_14400 = 75, + DATA_CALL_TR_V110_19200 = 79, + DATA_CALL_TR_V110_28800 = 80, + DATA_CALL_TR_V110_38400 = 81, + DATA_CALL_TR_V110_48000 = 82, + DATA_CALL_TR_V110_56000 = 83, + DATA_CALL_TR_V110_64000 = 84, + DATA_CALL_TR_BTR_56000 = 115, + DATA_CALL_TR_BTR_64000 = 116, + DATA_CALL_TR_PIAFS32k_32000 = 120, + DATA_CALL_TR_PIAFS64k_64000 = 121, + DATA_CALL_TR_MMEDIA_28800 = 130, + DATA_CALL_TR_MMEDIA_32000 = 131, + DATA_CALL_TR_MMEDIA_33600 = 132, + DATA_CALL_TR_MMEDIA_56000 = 133, + DATA_CALL_TR_MMEDIA_64000 = 134, }; /* Data (CSD) call parameters */ struct data_call_params { - enum data_call_type type; - enum data_call_rate rate; + enum data_call_type_rate type_rate; enum gsm48_bcap_transp transp; /* async call parameters */ diff --git a/src/host/layer23/src/common/settings.c b/src/host/layer23/src/common/settings.c index bc5d115..6bc5634 100644 --- a/src/host/layer23/src/common/settings.c +++ b/src/host/layer23/src/common/settings.c @@ -136,8 +136,7 @@ set->uplink_release_local = true; set->call_params.data = (struct data_call_params) { - .type = DATA_CALL_TYPE_ISDN, - .rate = DATA_CALL_RATE_V110_9600, + .type_rate = DATA_CALL_TR_V110_9600, .transp = GSM48_BCAP_TR_TRANSP, /* async call parameters (8-N-1) */ diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c index fa3b284..95d7f0d 100644 --- a/src/host/layer23/src/mobile/mnccms.c +++ b/src/host/layer23/src/mobile/mnccms.c @@ -199,12 +199,95 @@ mncc->bearer_cap.mode = GSM48_BCAP_TMOD_CIRCUIT; } +static const struct bcap_data_set { + enum gsm48_bcap_ra ra; + enum gsm48_bcap_interm_rate ir; + enum gsm48_bcap_user_rate ur; + enum gsm48_bcap_modem_type mt; +} bcap_data_set_map[] = { + [DATA_CALL_TR_V21_300] = { + .ir = GSM48_BCAP_IR_8k, + .ur = GSM48_BCAP_UR_300, + .mt = GSM48_BCAP_MT_V21, + }, + [DATA_CALL_TR_V22_1200] = { + .ir = GSM48_BCAP_IR_8k, + .ur = GSM48_BCAP_UR_1200, + .mt = GSM48_BCAP_MT_V22, + }, + [DATA_CALL_TR_V23_1200_75] = { + .ir = GSM48_BCAP_IR_8k, + .ur = GSM48_BCAP_UR_1200_75, + .mt = GSM48_BCAP_MT_V23, + }, + [DATA_CALL_TR_V22bis_2400] = { + .ir = GSM48_BCAP_IR_8k, + .ur = GSM48_BCAP_UR_2400, + .mt = GSM48_BCAP_MT_V22bis, + }, + [DATA_CALL_TR_V26ter_2400] = { + .ir = GSM48_BCAP_IR_8k, + .ur = GSM48_BCAP_UR_2400, + .mt = GSM48_BCAP_MT_V26ter, + }, + [DATA_CALL_TR_V32_4800] = { + .ir = GSM48_BCAP_IR_8k, + .ur = GSM48_BCAP_UR_4800, + .mt = GSM48_BCAP_MT_V32, + }, + [DATA_CALL_TR_V32_9600] = { + .ir = GSM48_BCAP_IR_16k, + .ur = GSM48_BCAP_UR_9600, + .mt = GSM48_BCAP_MT_V32, + }, +#if 0 + [DATA_CALL_TR_V34_9600] = { + .ir = GSM48_BCAP_IR_16k, + .ur = GSM48_BCAP_UR_9600, + .mt = GSM48_BCAP_MT_V34, /* XXX */ + }, +#endif + [DATA_CALL_TR_V110_300] = { + .ra = GSM48_BCAP_RA_V110_X30, + .ir = GSM48_BCAP_IR_8k, + .ur = GSM48_BCAP_UR_300, + }, + [DATA_CALL_TR_V110_1200] = { + .ra = GSM48_BCAP_RA_V110_X30, + .ir = GSM48_BCAP_IR_8k, + .ur = GSM48_BCAP_UR_1200, + }, + [DATA_CALL_TR_V110_2400] = { + .ra = GSM48_BCAP_RA_V110_X30, + .ir = GSM48_BCAP_IR_8k, + .ur = GSM48_BCAP_UR_2400, + }, + [DATA_CALL_TR_V110_4800] = { + .ra = GSM48_BCAP_RA_V110_X30, + .ir = GSM48_BCAP_IR_8k, + .ur = GSM48_BCAP_UR_4800, + }, + [DATA_CALL_TR_V110_9600] = { + .ra = GSM48_BCAP_RA_V110_X30, + .ir = GSM48_BCAP_IR_16k, + .ur = GSM48_BCAP_UR_9600, + }, +}; + static void mncc_set_bcap_data(struct gsm_mncc *mncc, const struct gsm_settings *set, enum gsm_call_type call_type) { const struct data_call_params *cp = &set->call_params.data; struct gsm_mncc_bearer_cap *bcap = &mncc->bearer_cap; + const struct bcap_data_set *ds; + + OSMO_ASSERT(cp->type_rate < ARRAY_SIZE(bcap_data_set_map)); + ds = &bcap_data_set_map[cp->type_rate]; + if (ds->ir == 0 && ds->ur == 0) { + LOGP(DMNCC, LOGL_ERROR, "AT+CBST=%d is not supported\n", cp->type_rate); + return; + } mncc->fields |= MNCC_F_BEARER_CAP; @@ -214,16 +297,18 @@ .coding = GSM48_BCAP_CODING_GSM_STD, /* .radio is set below */ .data = { - /* TODO: make these fields configurable via *set */ - .rate_adaption = GSM48_BCAP_RA_V110_X30, .sig_access = GSM48_BCAP_SA_I440_I450, - .async = cp->is_async, + .rate_adaption = ds->ra, + .interm_rate = ds->ir, + .user_rate = ds->ur, + .modem_type = ds->mt, .transp = cp->transp, + + /* async call params */ + .async = cp->is_async, .nr_data_bits = cp->nr_data_bits, .nr_stop_bits = cp->nr_stop_bits, .parity = cp->parity, - /* .user_rate is set below */ - /* .interm_rate is set below */ }, }; @@ -242,9 +327,9 @@ /* Information transfer capability (octet 3) */ switch (call_type) { case GSM_CALL_T_DATA: - if (cp->type == DATA_CALL_TYPE_ISDN) + if (ds->mt == GSM48_BCAP_MT_NONE) bcap->transfer = GSM_MNCC_BCAP_UNR_DIG; - else /* == DATA_CALL_TYPE_ANALOG */ + else /* analog modem */ bcap->transfer = GSM_MNCC_BCAP_AUDIO; break; case GSM_CALL_T_DATA_FAX: @@ -255,35 +340,6 @@ OSMO_ASSERT(0); } - /* User rate (octet 6a) */ - switch (cp->rate) { - case DATA_CALL_RATE_V110_300: - bcap->data.user_rate = GSM48_BCAP_UR_300; - bcap->data.interm_rate = GSM48_BCAP_IR_8k; - break; - case DATA_CALL_RATE_V110_1200: - bcap->data.user_rate = GSM48_BCAP_UR_1200; - bcap->data.interm_rate = GSM48_BCAP_IR_8k; - break; - case DATA_CALL_RATE_V110_2400: - bcap->data.user_rate = GSM48_BCAP_UR_2400; - bcap->data.interm_rate = GSM48_BCAP_IR_8k; - break; - case DATA_CALL_RATE_V110_4800: - bcap->data.user_rate = GSM48_BCAP_UR_4800; - bcap->data.interm_rate = GSM48_BCAP_IR_8k; - break; - case DATA_CALL_RATE_V110_9600: - bcap->data.user_rate = GSM48_BCAP_UR_9600; - bcap->data.interm_rate = GSM48_BCAP_IR_16k; - break; - case DATA_CALL_RATE_V110_14400: /* TODO: the bcap encoder does not support 14400 bps */ - LOGP(DMNCC, LOGL_INFO, " support for 14400 bps is incomplete\n"); - bcap->data.user_rate = GSM48_BCAP_UR_9600; - bcap->data.interm_rate = GSM48_BCAP_IR_16k; - break; - } - /* FAX calls are special (see 3GPP TS 24.008, Annex D.3) */ if (call_type == GSM_CALL_T_DATA_FAX) { bcap->data.rate_adaption = GSM48_BCAP_RA_NONE; diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 4c2263a..edff584 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -644,49 +644,57 @@ CALL_PARAMS_CMD_DESC \ "Parameters for data calls\n" -DEFUN(call_params_data_type, - call_params_data_type_cmd, - CALL_PARAMS_DATA_CMD " type (isdn|analog-modem)", - CALL_PARAMS_DATA_CMD_DESC - "Data call type (does not apply to FAX calls)\n" - "ISDN (Unrestricted Digital Information)\n" - "Analog modem (3.1 kHz audio, ex PLMN)\n") +/* only supported rate/type ('<speed>' in AT+CBST) values are listed here */ +static const struct value_string data_type_rate_descs[] = { +#if 0 + /* TODO: rates below 2400 bps are not supported */ + { DATA_CALL_TR_V21_300, "300 bps (V.21)" }, + { DATA_CALL_TR_V22_1200, "1200 bps (V.22)" }, + { DATA_CALL_TR_V23_1200_75, "1200/75 bps (V.23)" }, +#endif + { DATA_CALL_TR_V22bis_2400, "2400 bps (V.22bis)" }, + { DATA_CALL_TR_V26ter_2400, "2400 bps (V.26ter)" }, + { DATA_CALL_TR_V32_4800, "4800 bps (V.32)" }, + { DATA_CALL_TR_V32_9600, "9600 bps (V.32)" }, + { DATA_CALL_TR_V34_9600, "9600 bps (V.34)" }, +#if 0 + /* TODO: rates below 2400 bps are not supported */ + { DATA_CALL_TR_V110_300, "300 bps (V.110)" }, + { DATA_CALL_TR_V110_1200, "1200 bps (V.110)" }, +#endif + { DATA_CALL_TR_V110_2400, "2400 bps (V.110 or X.31 flag stuffing)" }, + { DATA_CALL_TR_V110_4800, "4800 bps (V.110 or X.31 flag stuffing)" }, + { DATA_CALL_TR_V110_9600, "9600 bps (V.110 or X.31 flag stuffing)" }, +#if 0 + /* TODO: 14400 bps is not supported */ + { DATA_CALL_TR_V110_14400, "14400 bps (V.110 or X.31 flag stuffing)" }, +#endif + { 0, NULL } +}; + +static char *call_params_data_type_rate_cmd_string(void *ctx) { - struct osmocom_ms *ms; - struct gsm_settings *set; - struct data_call_params *cp; - ms = l23_vty_get_ms(argv[0], vty); - if (!ms) - return CMD_WARNING; - set = &ms->settings; - cp = &set->call_params.data; + const struct value_string *vs; + char *string; - if (!strcmp(argv[1], "isdn")) - cp->type = DATA_CALL_TYPE_ISDN; - else if (!strcmp(argv[1], "analog-modem")) - cp->type = DATA_CALL_TYPE_ANALOG; - else /* should not happen */ - return CMD_WARNING; + string = talloc_asprintf(ctx, CALL_PARAMS_DATA_CMD " type-rate ("); + for (vs = &data_type_rate_descs[0]; vs->value || vs->str; vs++) + string = talloc_asprintf_append(string, "%u|", vs->value); + string[strlen(string) - 1] = ')'; - return CMD_SUCCESS; + return string; } -DEFUN(call_params_data_rate, - call_params_data_rate_cmd, - CALL_PARAMS_DATA_CMD " rate (65|66|68|70|71|75)", - CALL_PARAMS_DATA_CMD_DESC - "Data rate (values like in AT+CBST)\n" - "300 bps (V.110)\n" - "1200 bps (V.110)\n" - "2400 bps (V.110 or X.31 flag stuffing)\n" - "4800 bps (V.110 or X.31 flag stuffing)\n" - "9600 bps (V.110 or X.31 flag stuffing)\n" - "14400 bps (V.110 or X.31 flag stuffing)\n") +DEFUN(call_params_data_type_rate, + call_params_data_type_rate_cmd, + CALL_PARAMS_DATA_CMD /* generated */, + CALL_PARAMS_DATA_CMD_DESC /* generated */) { struct osmocom_ms *ms; struct gsm_settings *set; struct data_call_params *cp; + int val; ms = l23_vty_get_ms(argv[0], vty); if (!ms) @@ -694,28 +702,9 @@ set = &ms->settings; cp = &set->call_params.data; - switch (atoi(argv[1])) { - case 65: - cp->rate = DATA_CALL_RATE_V110_300; - break; - case 66: - cp->rate = DATA_CALL_RATE_V110_1200; - break; - case 68: - cp->rate = DATA_CALL_RATE_V110_2400; - break; - case 70: - cp->rate = DATA_CALL_RATE_V110_4800; - break; - case 71: - cp->rate = DATA_CALL_RATE_V110_9600; - break; - case 75: - cp->rate = DATA_CALL_RATE_V110_14400; - break; - default: /* should not happen */ - return CMD_WARNING; - } + val = atoi(argv[1]); + OSMO_ASSERT(get_value_string_or_null(data_type_rate_descs, val) != NULL); + cp->type_rate = (enum data_call_type_rate)val; return CMD_SUCCESS; } @@ -2879,6 +2868,17 @@ { int rc; + call_params_data_type_rate_cmd.string = + call_params_data_type_rate_cmd_string(NULL); + + call_params_data_type_rate_cmd.doc = + vty_cmd_string_from_valstr(NULL, + data_type_rate_descs, + CALL_PARAMS_DATA_CMD_DESC + "Type and rate (values like in AT+CBST; " + "see 3GPP TS 27.007, section 6.7)\n", + "\n", "", 0); + call_params_data_async_parity_cmd.string = vty_cmd_string_from_valstr(NULL, async_parity_names, @@ -2915,8 +2915,7 @@ install_element(ENABLE_NODE, &call_cmd); install_element(ENABLE_NODE, &call_retr_cmd); install_element(ENABLE_NODE, &call_dtmf_cmd); - install_element(ENABLE_NODE, &call_params_data_type_cmd); - install_element(ENABLE_NODE, &call_params_data_rate_cmd); + install_element(ENABLE_NODE, &call_params_data_type_rate_cmd); install_element(ENABLE_NODE, &call_params_data_ce_cmd); install_element(ENABLE_NODE, &call_params_data_sync_async_cmd); install_element(ENABLE_NODE, &call_params_data_async_nr_stop_bits_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35663?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I7393fce82613a57275033f5c47e16bbf708a3bfb Gerrit-Change-Number: 35663 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • ...
  • 156
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.